清理:移除全部注入型消息(会话上下文/附件系统通知/开始执行指令)
- 会话上下文:删 sessionContextContent/ensureSessionContext/loadHistoryForModel/modelDisplayName 及 bindToSession、runLoopInner、createSession 三处注入;存档/hasUserSince/hasPendingUser 去掉 session_context 特判;SSE 请求历史改用 loadHistory 直取;server.js prompt dump 去掉第 3 部分 - 附件通知:删 routes/messages.js 的 composeWithAttachments/fmtSize 与 POST 路由的 attachments 拼接,正文原样入库、content 必填;前端 send() 不再随 body 传 attachments,无文字时拦截并提示(附件仅上传任务目录);parseUploadNotice 保留兼容旧库行 - 开始执行:删 START_EXECUTION_MESSAGE、engine.startExecution、POST /:id/start 路由与导出(v2 前端本无入口) - 注释与 README 同步清理
This commit is contained in:
@@ -47,7 +47,6 @@ npm test # 启动 mock 上游 + 真实 server 的端到端冒烟测
|
||||
## 提示词与工具 schema
|
||||
|
||||
System prompt 完全静态(所有会话共用,利于上游前缀缓存),在 `server/templates/system-prompt.txt` 直接编辑;工具定义在 `server/tools/definitions.json`。改完重启服务。
|
||||
动态会话信息(日期、任务目录、模型显示名)不拼入 prompt,而是新建会话时作为首条 user 消息自动发送(带 `session_context` 标记,不会单独触发模型回复),见 `engine.js` 的 `sessionContextContent`。
|
||||
|
||||
## 关键行为速查
|
||||
|
||||
|
||||
Reference in New Issue
Block a user