From b46f58651cf515a21717a300218696a0b0f4fd5b Mon Sep 17 00:00:00 2001 From: CNlaojing <154053522+CNlaojing@users.noreply.github.com> Date: Wed, 5 Mar 2025 05:23:40 +0800 Subject: [PATCH] Update generation_handlers.py --- ui/generation_handlers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/generation_handlers.py b/ui/generation_handlers.py index db6a6ba..abf111b 100644 --- a/ui/generation_handlers.py +++ b/ui/generation_handlers.py @@ -192,7 +192,7 @@ def generate_chapter_draft_ui(self): file_path = os.path.join(root, file) try: with open(file_path, 'r', encoding='utf-8') as f: - role_contents.append(f"{os.path.splitext(file)[0]}:\n{f.read()}\n") + role_contents.append(f.read().strip()) # 直接使用文件内容,不添加重复名字 except Exception as e: self.safe_log(f"读取角色文件 {file} 失败: {str(e)}")