清理:移除全部注入型消息(会话上下文/附件系统通知/开始执行指令)

- 会话上下文:删 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:
2026-09-10 08:12:56 +08:00
parent 775d92eb67
commit 4051fcdd5c
8 changed files with 22 additions and 148 deletions
+1 -2
View File
@@ -979,8 +979,7 @@ const ui = {
try {
await req('DELETE', '/api/sessions/' + id + '/messages');
toast('会话内容已清空,文件已保留');
// 服务端已把会话收尾为 completed 并清空消息(不再预置会话上下文):
// 重新拉取详情即为干净起点;选择模型或再次发言后服务端会注入当时的会话上下文
// 服务端已把会话收尾为 completed 并清空消息:重新拉取详情即为干净起点
const detail = await req('GET', '/api/sessions/' + id);
await renderDetail(detail);
loadSessions();