prompt-copilot-cli 0.2.8__tar.gz → 0.2.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. {prompt_copilot_cli-0.2.8/prompt_copilot_cli.egg-info → prompt_copilot_cli-0.2.9}/PKG-INFO +1 -1
  2. {prompt_copilot_cli-0.2.8 → prompt_copilot_cli-0.2.9}/main.py +84 -107
  3. {prompt_copilot_cli-0.2.8 → prompt_copilot_cli-0.2.9/prompt_copilot_cli.egg-info}/PKG-INFO +1 -1
  4. {prompt_copilot_cli-0.2.8 → prompt_copilot_cli-0.2.9}/pyproject.toml +1 -1
  5. {prompt_copilot_cli-0.2.8 → prompt_copilot_cli-0.2.9}/tests/test_cli_args.py +10 -0
  6. {prompt_copilot_cli-0.2.8 → prompt_copilot_cli-0.2.9}/LICENSE +0 -0
  7. {prompt_copilot_cli-0.2.8 → prompt_copilot_cli-0.2.9}/MANIFEST.in +0 -0
  8. {prompt_copilot_cli-0.2.8 → prompt_copilot_cli-0.2.9}/README.md +0 -0
  9. {prompt_copilot_cli-0.2.8 → prompt_copilot_cli-0.2.9}/README.zh-CN.md +0 -0
  10. {prompt_copilot_cli-0.2.8 → prompt_copilot_cli-0.2.9}/prompt_copilot_cli.egg-info/SOURCES.txt +0 -0
  11. {prompt_copilot_cli-0.2.8 → prompt_copilot_cli-0.2.9}/prompt_copilot_cli.egg-info/dependency_links.txt +0 -0
  12. {prompt_copilot_cli-0.2.8 → prompt_copilot_cli-0.2.9}/prompt_copilot_cli.egg-info/entry_points.txt +0 -0
  13. {prompt_copilot_cli-0.2.8 → prompt_copilot_cli-0.2.9}/prompt_copilot_cli.egg-info/requires.txt +0 -0
  14. {prompt_copilot_cli-0.2.8 → prompt_copilot_cli-0.2.9}/prompt_copilot_cli.egg-info/top_level.txt +0 -0
  15. {prompt_copilot_cli-0.2.8 → prompt_copilot_cli-0.2.9}/requirements.txt +0 -0
  16. {prompt_copilot_cli-0.2.8 → prompt_copilot_cli-0.2.9}/setup.cfg +0 -0
  17. {prompt_copilot_cli-0.2.8 → prompt_copilot_cli-0.2.9}/tests/test_command_timeout.py +0 -0
  18. {prompt_copilot_cli-0.2.8 → prompt_copilot_cli-0.2.9}/tests/test_file_tools.py +0 -0
  19. {prompt_copilot_cli-0.2.8 → prompt_copilot_cli-0.2.9}/tests/test_image_tool.py +0 -0
  20. {prompt_copilot_cli-0.2.8 → prompt_copilot_cli-0.2.9}/tests/test_mcp_transport.py +0 -0
  21. {prompt_copilot_cli-0.2.8 → prompt_copilot_cli-0.2.9}/tests/test_multimodal_messages.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: prompt-copilot-cli
3
- Version: 0.2.8
3
+ Version: 0.2.9
4
4
  Summary: A lightweight terminal-based coding agent with file tools, command execution, multimodal image support, and MCP integration.
5
5
  Author: Jason Li
6
6
  License-Expression: MIT
@@ -88,122 +88,59 @@ def format_cumulative_token_summary() -> str:
88
88
  )
89
89
 
90
90
 
91
- def build_bottom_toolbar_text() -> str:
92
- base = t("toolbar_help")
93
- token_summary = format_cumulative_token_summary()
94
- return f"{token_summary} | {base}"
95
-
96
-
97
-
98
-
99
- DEFAULT_SYSTEM_WORKING_PRINCIPLES_ZH = """工作原则:
100
- 1、先检查工作目录并理解需求。
101
- 2、优先使用网络搜索类工具搜索网络实时信息,例如:天气、新闻、资讯等等。
102
- 3、所有代码文件生成、编辑、删除等操作均在工作目录中执行。如果用户没有指定具体目录,默认工作目录为工程的根目录。
103
- 4、如果需要,输出简洁的说明与下一步建议。
104
- 5、若涉及删除系统文件或执行危险命令,必须先向用户确认后方可执行。
105
- 6、当用户输入指令:/task-start 的时候,直接回复:请输入你的第一条初始提示。
106
- 7、遇到信息盲区时,严禁主观臆测,请优先使用搜索工具补齐信息缺口,确保回答精准有据。
107
- 8、如果用户想“读取/识别其他二进制文件”,你必须明确告知:我无法直接读取或理解通用二进制文件内容。
108
- 9、如果用户想“查看图片内容”,应优先调用图片读取工具将图片转成 base64 或视觉消息格式,再将其发送给支持多模态的模型。
109
- 10、对于图片类任务,优先使用图片工具而不是尝试直接读取二进制原始内容。
110
- 11、当用户输入一条任务指令时,如果是详细的任务清单,你就理解用户要求逐步完成工作,同时执行每个步骤的时候明确说明当前环节与进度,实时反馈任务状态。
111
- 12、使用 execute_python_script 时必须在脚本内自行管理进程生命周期:若是 ls、pytest、build 等短命令用 subprocess.run 显式设置 timeout,若是 npm run dev、flask run 等常驻服务用 subprocess.Popen 脱离终端启动并在脚本内轮询健康检查 URL,确认就绪后打印 PID 并立即 sys.exit() 退出以防触发 360 秒强制超时。
112
- 13、无法调用官方联网检索工具而通过脚本抓取网络内容时需区分数据类型处理,抓取普通网页文本需剔除 HTML 标签、样式代码、广告碎片、无效注释、多余空行等冗余内容,仅留存有效正文且文本超出 8000 字符则截断,文本输出上限为 8000 字符,抓取程序源代码则无需过滤,完整保留原始代码、自带注释、缩进换行与原有格式,代码输出无字符数量限制。
113
- 14、脱离终端启动常驻服务时务必兼顾跨平台兼容:Linux/Mac 环境设置 start_new_session=True,Windows 环境设置 creationflags=subprocess.CREATE_NEW_PROCESS_GROUP。
114
- 15、凡耗时不可控的超长任务(如大文件下载、模型训练、全量测试、复杂构建等),严禁在脚本内同步阻塞,必须用 subprocess.Popen 跨平台脱离终端启动并将进度心跳写入本地日志文件,打印 PID 后立即 sys.exit(),工具 timeout_seconds 设为 15 秒仅验证启动;后续须通过检查日志监控进度,若发现任务完成或长时间无心跳更新,必须主动调用系统命令(如 kill -9 PID)清理后台进程以防孤儿进程耗尽资源;仅在任务自身支持超时参数或耗时可预估时,方可在脚本内同步执行并设合理 timeout_seconds。
115
- 16、如果需要搜索互联网信息时候优先使用中国国内搜索引擎优先,例如:bing、百度等。
116
- """
117
-
118
- DEFAULT_SYSTEM_WORKING_PRINCIPLES_EN = """Working principles:
119
- 1. First inspect the working directory and understand the requirement.
120
- 2. Prefer using network search tools for real-time information, such as weather, news, or other current topics.
121
- 3. All code file creation, editing, and deletion operations are performed in the working directory. If the user does not specify a directory, the project root is used by default.
122
- 4. If needed, provide concise explanations and next-step suggestions.
123
- 5. If the task involves deleting system files or executing dangerous commands, you must ask for confirmation first.
124
- 6. When the user enters /task-start, respond with: Please enter your first initial prompt.
125
- 7. When information is missing, do not speculate; prefer using search tools to fill the gap and keep the answer precise and evidence-based.
126
- 8. If the user wants to read or recognize other binary files, you must clearly state that you cannot directly read or understand generic binary file contents.
127
- 9. If the user wants to inspect image content, you should first use the image-reading tool to convert the image into base64 or a visual-message format and then send it to a multimodal-capable model.
128
- 10. For image-related tasks, prefer the image tool rather than trying to read the raw binary contents directly.
129
- 11. When the user inputs a task instruction, if it is a detailed task list, understand the user's requirements and execute the tasks step by step, providing real-time feedback on the current status and progress.
130
- 12. When using the execute_python_script tool, manage the process lifecycle within the script: for short commands like ls, pytest, and build, use subprocess.run with an explicit timeout; for persistent commands like npm run dev and flask run, use subprocess.Popen to start them in the background and poll a health check URL to confirm they are ready before printing the PID and exiting immediately to avoid triggering the 360-second timeout.
131
- 13. When official network retrieval tools are unavailable and network content is crawled via scripts, differentiated processing shall be performed according to data types: for regular webpage texts, remove redundant contents including HTML tags, style codes, advertising fragments, invalid comments and redundant blank lines, retain only valid main texts and truncate the content if it exceeds 8000 characters with a strict upper limit of 8000 characters for text output; for program source codes, no filtering or cleaning is required, keep the original codes, built-in comments, indentations, line breaks and original formats completely with no character limit on code output.
132
- 14. When starting a persistent service in the background, ensure cross-platform compatibility: set start_new_session=True for Linux/Mac environments and creationflags=subprocess.CREATE_NEW_PROCESS_GROUP for Windows environments.
133
- 15. For long-running tasks with unpredictable durations (such as large file downloads, model training, full tests, complex builds, etc.), synchronous blocking execution within the script is strictly prohibited. Instead, use subprocess.Popen to start the task in the background across platforms and write progress heartbeats to a local log file. After printing the PID, immediately call sys.exit() and set the tool's timeout_seconds to 15 seconds for startup verification only. Subsequently, monitor progress by checking the log file. If the task completes or there is no heartbeat update for an extended period, proactively call system commands (like kill -9 PID) to clean up background processes and prevent orphan processes from consuming resources. Only when the task itself supports timeout parameters or has a predictable duration can synchronous execution be performed within the script with a reasonable timeout_seconds setting.
134
- 16. When searching the internet for information, prioritize domestic Chinese search engines such as Bing or Baidu.
135
- """
136
-
137
- TASK_END_GUIDANCE_ZH = """你是提示词优化专家,负责将对话记录整理为更清晰、可执行的最终任务提示词。
138
-
139
- 请与默认系统提示词保持一致的工作原则与约束条件:
140
- {principles}
141
-
142
- 生成最终提示词时,请严格遵循以下约束:
143
- 1. 只输出最终改进后的提示词文本,不要添加任何解释、元信息或注释。
144
- 2. 保留用户原始目标、关键上下文、澄清或变更后的要求、待执行步骤与预期产物。
145
- 3. 语言必须清晰、可执行、步骤化,适合直接给后续执行器使用。
146
- 4. 如果上下文中存在不确定信息,应显式写成“待确认”或“需验证”的约束项。
147
- 5. 输出长度控制在 18000 字符以内。"""
148
-
149
- TASK_END_GUIDANCE_EN = """You are a prompt-optimization expert responsible for turning conversation history into a clearer and more actionable final task prompt.
91
+ def clear_task_memory_file() -> None:
92
+ MEMORY_FILE_PATH.parent.mkdir(parents=True, exist_ok=True)
93
+ MEMORY_FILE_PATH.write_text("# Task Execution Memory\n\n", encoding="utf-8")
150
94
 
151
- Please follow the same working principles and constraints as the default system prompt:
152
- {principles}
153
-
154
- When generating the final prompt, strictly follow these constraints:
155
- 1. Return only the improved final prompt text. Do not add explanations, metadata, or comments.
156
- 2. Preserve the user's original goal, key context, clarified or changed requirements, pending steps, and expected deliverables.
157
- 3. Use clear, executable, step-by-step language suitable for direct use by a downstream executor.
158
- 4. If the context contains uncertain information, make it explicit as a "to confirm" or "to verify" constraint.
159
- 5. Keep the output within 18000 characters."""
160
-
161
- ZH_SYSTEM_PROMPT = f"""
162
- 你是一个基于 CLI 的编程 Agent,你的名字是 Jason Li,专注于使用文件、命令、Python 脚本等工具完成开发任务。
163
-
164
- {DEFAULT_SYSTEM_WORKING_PRINCIPLES_ZH}
165
-
166
- """
167
-
168
- EN_SYSTEM_PROMPT = f"""
169
- You are a CLI-based coding agent named Jason Li, focused on completing development tasks by using files, commands, Python scripts, and other tools.
170
-
171
- {DEFAULT_SYSTEM_WORKING_PRINCIPLES_EN}
172
-
173
- """
174
95
 
96
+ def append_task_memory_entry(text: str) -> None:
97
+ MEMORY_FILE_PATH.parent.mkdir(parents=True, exist_ok=True)
98
+ with MEMORY_FILE_PATH.open("a", encoding="utf-8") as f:
99
+ f.write(text)
100
+ if not text.endswith("\n"):
101
+ f.write("\n")
175
102
 
176
- PLANNING_PROMPT = f"""
177
- 你是一个基于 CLI 的编程 Agent,你的名字是 Jason Li,能够通过使用文件、命令、Python 脚本等工具完成开发任务,当前你只能够生成任务执行计划。
178
103
 
179
- 注意:你的输出只能是“任务执行计划”的文本说明。绝对不能真实执行任何命令、脚本、文件修改或调用任何工具方法。你是在“规划”而非“动手”。
104
+ def summarize_memory_value(value: Any, max_len: int = 240) -> str:
105
+ if isinstance(value, str):
106
+ if len(value) > max_len:
107
+ return value[: max_len - 20] + f"... (truncated, len={len(value)})"
108
+ return value
180
109
 
181
- 在生成任务执行计划时,请遵循以下{DEFAULT_SYSTEM_WORKING_PRINCIPLES_ZH}
110
+ if isinstance(value, (dict, list)):
111
+ try:
112
+ serialized = json.dumps(value, ensure_ascii=False)
113
+ except Exception:
114
+ serialized = str(value)
115
+ if len(serialized) > max_len:
116
+ return serialized[: max_len - 20] + f"... (truncated, len={len(serialized)})"
117
+ return serialized
182
118
 
119
+ return str(value)
183
120
 
184
- 请严格按照以下格式输出结果:
185
121
 
186
- 用户原始指令:......
122
+ def summarize_tool_result(result: Any) -> str:
123
+ if isinstance(result, dict):
124
+ status = result.get("status")
125
+ content = result.get("content")
126
+ content_summary = summarize_memory_value(content, max_len=200)
127
+ extra_items = [
128
+ f"{k}={summarize_memory_value(v, max_len=80)}"
129
+ for k, v in result.items()
130
+ if k not in {"status", "content"}
131
+ ]
132
+ extra_text = f" | {", ".join(extra_items)}" if extra_items else ""
133
+ return f"status={status}{extra_text}\nContent: {content_summary}"
134
+ return summarize_memory_value(result)
187
135
 
188
- 结合上下文得到用户的完整意图:.....
189
136
 
190
- 接下来按照这个步骤逐步执行完成任务:
191
- 1、第一步:......
192
- 2、第二步:......
193
- ......
194
-
195
- """
137
+ def build_bottom_toolbar_text() -> str:
138
+ base = t("toolbar_help")
139
+ token_summary = format_cumulative_token_summary()
140
+ return f"{token_summary} | {base}"
196
141
 
197
142
 
198
143
  TRANSLATIONS = {
199
- "system_prompt": {
200
- "zh": ZH_SYSTEM_PROMPT,
201
- "en": EN_SYSTEM_PROMPT,
202
- },
203
- "task_end_system_prompt": {
204
- "zh": TASK_END_GUIDANCE_ZH.format(principles=DEFAULT_SYSTEM_WORKING_PRINCIPLES_ZH),
205
- "en": TASK_END_GUIDANCE_EN.format(principles=DEFAULT_SYSTEM_WORKING_PRINCIPLES_EN),
206
- },
207
144
  "config_field_model": {"zh": "模型名称,例如 qwen2.5-7b-instruct", "en": "Model name, for example qwen2.5-7b-instruct"},
208
145
  "config_field_base_url": {"zh": "OpenAI 兼容接口地址,例如 http://127.0.0.1:11434/v1", "en": "OpenAI-compatible base URL, for example http://127.0.0.1:11434/v1"},
209
146
  "config_field_api_key": {"zh": "API Key;若是本地模型可填写任意非空字符串", "en": "API key; for a local model you can enter any non-empty string"},
@@ -326,14 +263,37 @@ def t(key: str, **kwargs: Any) -> str:
326
263
  return text.format(**kwargs)
327
264
  return text
328
265
 
266
+ MEMORY_FILE_PATH = ROOT / "memory.md"
267
+
268
+ DEFAULT_SYSTEM_PROMPT = f"""
269
+ 你是一个基于 CLI 的编程 Agent,你的名字是 Jason Li,专注于使用文件、命令、Python 脚本等工具完成开发任务。
270
+
271
+ 工作原则:
272
+ 1、先检查工作目录并理解需求。
273
+ 2、优先使用网络搜索类工具搜索网络实时信息,例如:天气、新闻、资讯等等。
274
+ 3、所有代码文件生成、编辑、删除等操作均在工作目录中执行。如果用户没有指定具体目录,默认工作目录为工程的根目录。
275
+ 4、如果需要,输出简洁的说明与下一步建议。
276
+ 5、若涉及删除系统文件或执行危险命令,必须先向用户确认后方可执行。
277
+ 6、当用户输入指令:/task-start 的时候,直接回复:请输入你的第一条初始提示。
278
+ 7、遇到信息盲区时,严禁主观臆测,请优先使用搜索工具补齐信息缺口,确保回答精准有据。
279
+ 8、在任务处理中,工具调用会产生大量中间信息,而对话只保存有限几轮上下文,在生成最终结果或者是某些步骤需要回溯前面缺失的历史信息的时候可以读取记忆文件:{MEMORY_FILE_PATH}。
280
+ 9、如果用户想“读取/识别其他二进制文件”,你必须明确告知:我无法直接读取或理解通用二进制文件内容。
281
+ 10、如果用户想“查看图片内容”,应优先调用图片读取工具。
282
+ 11、当用户输入一条任务指令时,如果是详细的任务清单,你就理解用户要求逐步完成工作,同时执行每个步骤的时候明确说明当前环节与进度,实时反馈任务状态。
283
+ 12、使用 execute_python_script 时必须在脚本内自行管理进程生命周期:若是 ls、pytest、build 等短命令用 subprocess.run 显式设置 timeout,若是 npm run dev、flask run 等常驻服务用 subprocess.Popen 脱离终端启动并在脚本内轮询健康检查 URL,确认就绪后打印 PID 并立即 sys.exit() 退出以防触发 360 秒强制超时。
284
+ 13、无法调用官方联网检索工具而通过脚本抓取网络内容时需区分数据类型处理,抓取普通网页文本需剔除 HTML 标签、样式代码、广告碎片、无效注释、多余空行等冗余内容,仅留存有效正文且文本超出 8000 字符则截断,文本输出上限为 8000 字符,抓取程序源代码则无需过滤,完整保留原始代码、自带注释、缩进换行与原有格式,代码输出无字符数量限制。
285
+ 14、脱离终端启动常驻服务时务必兼顾跨平台兼容:Linux/Mac 环境设置 start_new_session=True,Windows 环境设置 creationflags=subprocess.CREATE_NEW_PROCESS_GROUP。
286
+ 15、凡耗时不可控的超长任务(如大文件下载、模型训练、全量测试、复杂构建等),严禁在脚本内同步阻塞,必须用 subprocess.Popen 跨平台脱离终端启动并将进度心跳写入本地日志文件,打印 PID 后立即 sys.exit(),工具 timeout_seconds 设为 15 秒仅验证启动;后续须通过检查日志监控进度,若发现任务完成或长时间无心跳更新,必须主动调用系统命令(如 kill -9 PID)清理后台进程以防孤儿进程耗尽资源;仅在任务自身支持超时参数或耗时可预估时,方可在脚本内同步执行并设合理 timeout_seconds。
287
+ 16、如果需要搜索互联网信息时候优先使用中国国内搜索引擎优先,例如:bing、百度等。
288
+
289
+ """
329
290
 
330
291
  UI_SYSTEM_LANGUAGE = "en"
331
- APPLICATION_VERSION = "0.2.8"
332
- DEFAULT_SYSTEM_PROMPT = t("system_prompt")
292
+ APPLICATION_VERSION = "0.2.9"
333
293
  WORKSPACE_DIR = ROOT / "workspace"
334
294
  LOG_DIR = ROOT / "logs"
335
295
  LOG_FILE = LOG_DIR / "agent_runtime.log"
336
- DEFAULT_MAX_CHAT_COUNT = 7
296
+ DEFAULT_MAX_CHAT_COUNT = 6
337
297
  CHAT_MESSAGE_MAX_COUNT = 8
338
298
  CONFIG_SAVE_FILE_PATH = ROOT / "config.json"
339
299
  RE_ACTION_DELAY = 1 # unit: seconds
@@ -2046,6 +2006,7 @@ def plan_user_request(client: OpenAI, model: str, history: list[dict[str, Any]],
2046
2006
 
2047
2007
  planning_prompt = f"""
2048
2008
  你是一个编程行业需求分析专家,你能够通过历史上下文和用户的输入分析出用户的真实意图,能够拆分步骤,并且能够生成任务执行清单。
2009
+ 在任务处理中,工具调用会产生大量中间信息,而对话只保存有限几轮上下文,在生成最终结果或者是某些步骤需要回溯前面缺失的历史信息的时候可以读取记忆文件:{MEMORY_FILE_PATH}。
2049
2010
 
2050
2011
  ### 请严格按照以下格式输出任务清单:
2051
2012
 
@@ -2089,6 +2050,9 @@ def is_special_command(user_text: str) -> bool:
2089
2050
 
2090
2051
  def run_agent(client: OpenAI, model: str, system_prompt: str, session_store: SessionStore, user_text: str, debug_enabled: bool = False, recorder: ConversationRecorder | None = None) -> None:
2091
2052
  reset_interruption_state()
2053
+ clear_task_memory_file()
2054
+ append_task_memory_entry(f"## Task started\n\nUser request: {summarize_memory_value(user_text, max_len=240)}\n\n")
2055
+
2092
2056
  history = session_store.load()
2093
2057
  planned_user_text = user_text
2094
2058
  if not is_special_command(user_text):
@@ -2097,6 +2061,8 @@ def run_agent(client: OpenAI, model: str, system_prompt: str, session_store: Ses
2097
2061
  except Exception:
2098
2062
  logger.exception("Planning step failed; continuing with original user input")
2099
2063
 
2064
+ append_task_memory_entry("## Task checklist\n\n" + summarize_memory_value(planned_user_text, max_len=10000) + "\n\n")
2065
+
2100
2066
  first_task_prompt = {"role": "user", "content": planned_user_text}
2101
2067
  history.append(first_task_prompt)
2102
2068
  session_store.save(history)
@@ -2172,6 +2138,12 @@ def run_agent(client: OpenAI, model: str, system_prompt: str, session_store: Ses
2172
2138
  result = execute_tool_call(tc)
2173
2139
  messages.append({"role": "tool", "tool_call_id": tc.id, "content": json.dumps(result, ensure_ascii=False)})
2174
2140
  show_tool_result(tc, result)
2141
+ append_task_memory_entry(
2142
+ "### Tool invocation\n\n"
2143
+ f"Tool: {tc.function.name}\n\n"
2144
+ f"Arguments: {summarize_memory_value(tc.function.arguments, max_len=1200)}\n\n"
2145
+ f"Result: {summarize_tool_result(result)}\n\n"
2146
+ )
2175
2147
  # end_calling_tips = f"tool={tc.function.name}\nresult={json.dumps(result, ensure_ascii=False)}"
2176
2148
  # show_stage(t("tool_call_finished"), end_calling_tips[:80])
2177
2149
 
@@ -2201,6 +2173,12 @@ def run_agent(client: OpenAI, model: str, system_prompt: str, session_store: Ses
2201
2173
  error_payload = {"status": "error", "content": traceback.format_exc()}
2202
2174
  messages.append({"role": "tool", "tool_call_id": tc.id, "content": json.dumps(error_payload, ensure_ascii=False)})
2203
2175
  console.print(Panel.fit(traceback.format_exc(), title=t("tool_execution_error")))
2176
+ append_task_memory_entry(
2177
+ "### Tool invocation\n\n"
2178
+ f"Tool: {tc.function.name}\n\n"
2179
+ f"Arguments: {summarize_memory_value(tc.function.arguments, max_len=1200)}\n\n"
2180
+ f"Result: ERROR\n{summarize_tool_result(error_payload)}\n\n"
2181
+ )
2204
2182
  # if recorder:
2205
2183
  # recorder.record_error(traceback.format_exc())
2206
2184
 
@@ -2417,7 +2395,6 @@ def main() -> None:
2417
2395
 
2418
2396
  # Set localization language
2419
2397
  UI_SYSTEM_LANGUAGE = args.lang
2420
- DEFAULT_SYSTEM_PROMPT = t("system_prompt")
2421
2398
 
2422
2399
  # set up workspace directory
2423
2400
  WORKSPACE_DIR = Path(args.workdir)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: prompt-copilot-cli
3
- Version: 0.2.8
3
+ Version: 0.2.9
4
4
  Summary: A lightweight terminal-based coding agent with file tools, command execution, multimodal image support, and MCP integration.
5
5
  Author: Jason Li
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "prompt-copilot-cli"
7
- version = "0.2.8"
7
+ version = "0.2.9"
8
8
  description = "A lightweight terminal-based coding agent with file tools, command execution, multimodal image support, and MCP integration."
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -56,6 +56,16 @@ class CLITests(unittest.TestCase):
56
56
  self.assertIn("短时命令", joined)
57
57
  self.assertIn("持久命令", joined)
58
58
 
59
+ def test_system_prompt_includes_notebook_memory_guidance(self) -> None:
60
+ self.assertIn(
61
+ "记事本方式",
62
+ main.DEFAULT_SYSTEM_WORKING_PRINCIPLES_ZH,
63
+ )
64
+ self.assertIn(
65
+ "notebook-style",
66
+ main.DEFAULT_SYSTEM_WORKING_PRINCIPLES_EN,
67
+ )
68
+
59
69
  def test_special_commands_skip_planning(self) -> None:
60
70
  called = {"value": False}
61
71