refactor: 后端模块拆分 (types + session→agent) #77
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refactor/types-split"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
改动
1. types.go 拆分(纯文件重组,零逻辑变更)
internal/types/types.go(526行)拆为 4 个领域文件:
2. CompactPrompt 迁移(职责归位)
Session.CompactPrompt() 从 session/session.go 移至 agent/compact_prompt.go,改为独立函数 buildCompactPrompt(messages []types.Message)。
该方法只在 agent/compact.go 被调用,本质是给 compaction LLM 构建 prompt 的逻辑,属于 agent 职责。