v0.5.0 -> v0.6.0
Summary
Introduces a summary-based persistent memory system that compresses conversation state into structured JSON and injects it across sessions, enabling the agent to recall prior conclusions without replaying full history. Includes a centralized config path utility and refactors scattered path construction logic.
翻譯
新增概要式持久記憶機制,將對話狀態壓縮為結構化 JSON 並跨 Session 注入,使 Agent 無需重播完整歷史即可引用先前結論。同時抽離集中式配置路徑工具,重構散落各處的路徑組合邏輯。Changes
FEAT
- Add summary-based persistent memory: agent outputs structured JSON summary (
<!--SUMMARY_START-->...<!--SUMMARY_END-->) at end of each response; summary is parsed, stored assummary.json, and injected into subsequent sessions viasummaryPrompt.md - Add session history persistence: conversation turns (excluding tool-call messages) saved to
history.json; last 4 non-tool turns replayed per request to bound context size - Add
utils.ConfigDir()helper returningConfigDirData{Home, Work}with auto-MkdirAll, replacing scatteredos.UserHomeDir()/filepath.Joincalls across the codebase - Inject current datetime into user message at call time rather than baking it into the static system prompt template
- Add tool action logging: each tool execution (including user-skipped ones) is recorded with tool name and result, saved to
{configDir.Work}/{sessionID}/{timestamp}.json
翻譯
- 新增概要式持久記憶:Agent 每次回應結尾輸出結構化 JSON 摘要,解析後儲存為
summary.json,並透過summaryPrompt.md注入後續 Session - 新增 Session 歷史持久化:非 tool-call 的對話輪次儲存至
history.json;每次請求重播最近 4 輪,限制 Context 膨脹 - 新增
utils.ConfigDir()輔助函式,回傳含Home、Work的ConfigDirData並自動MkdirAll,取代散落各處的路徑組合邏輯 - 將當前時間注入至 user message,移除 system prompt 模板中的
{{.Date}}佔位符 - 新增 Tool Action 記錄:每次工具執行(含使用者跳過)均記錄工具名稱與結果,儲存至
{configDir.Work}/{sessionID}/{timestamp}.json
REFACTOR
- Replace manual
os.UserHomeDir()+filepath.Joinwithutils.ConfigDir()incopilot/new.go,browser/load.go, andtools/executor.go - Fix
executor.goAPI toolbox loading: correctly loads from bothconfigDir.HomeandconfigDir.Work
翻譯
- 在
copilot/new.go、browser/load.go、tools/executor.go中以utils.ConfigDir()取代手動路徑組合 - 修正
executor.goAPI Toolbox 載入邏輯:正確同時載入configDir.Home與configDir.Work
Files Changed
| File | Status | Tag |
|---|---|---|
internal/agents/exec.go |
Modified | FEAT |
internal/utils/utils.go |
Modified | FEAT |
internal/agents/prompt/summaryPrompt.md |
Added | FEAT |
internal/agents/prompt/sysPrompt.md |
Modified | FEAT |
internal/agents/prompt/sysPromptBase.md |
Modified | FEAT |
internal/agents/provider/copilot/new.go |
Modified | REFACTOR |
internal/tools/browser/load.go |
Modified | REFACTOR |
internal/tools/executor.go |
Modified | REFACTOR |
doc.md |
Modified | DOC |
doc.zh.md |
Modified | DOC |
internal/agents/provider/copilot/login.go |
Modified | STYLE |
internal/tools/apiAdapter/execute.go |
Modified | STYLE |
internal/tools/apiAdapter/send.go |
Modified | STYLE |
internal/skill/scanner.go |
Modified | STYLE |
cmd/cli/main.go |
Modified | STYLE |
Generated by SKILL