v1.3.11

v0.7.1 Release Notes

Released


v0.7.0 -> v0.7.1

Summary


Fix race conditions in all provider model fields by migrating from mutable package-level var to instance-level struct fields, and repair context propagation chain broken by context.Background() usage in tool execution.
翻譯修正所有 Provider 中因可變 package-level var 導致的 Race Condition(改為 struct 欄位存儲),並修復工具執行中因使用 context.Background() 造成的 Context 傳遞鏈斷裂。

Changes


FIX

  • Fix race condition in all providers (claude, compat, copilot, gemini, nvidia, openai): migrate defaultModel mutation to instance-level model field in struct
  • Fix context propagation: runCommand and moveToTrash now accept and propagate caller's context.Context instead of creating fresh context.Background()
  • Fix nil error wrapping in getSession: use fmt.Errorf with %w instead of fmt.Printf + bare return
  • Fix empty summary injection: guard input.Messages append with summary != "" check
  • Fix moveToTrash missing error check on os.MkdirAll and add ctx.Err() cancellation guard

翻譯
  • 修正所有 Provider(claude、compat、copilot、gemini、nvidia、openai)Race Condition:將 defaultModel 可變 package 變數改為 struct 實例欄位 model
  • 修正 Context 傳遞鏈:runCommand 與 moveToTrash 改為接收並傳遞呼叫方的 context.Context,不再自建 context.Background()
  • 修正 getSession 中的 nil error wrapping:改用 fmt.Errorf + %w 包裝
  • 修正空 summary 注入:以 summary != "" 守衛後才 append 到 input.Messages
  • 修正 moveToTrash 缺少 os.MkdirAll 錯誤處理,並加入 ctx.Err() 取消守衛


REFACTOR

  • Replace strconv.Unquote with json.Unmarshal in normalizeArgs for correct Unicode escape handling
  • Deduplicate time.Now() call in execute.go by caching to now
  • Convert mutable var blocks for API URLs and constants to const across all providers

翻譯
  • normalizeArgs 中以 json.Unmarshal 取代 strconv.Unquote,正確處理 Unicode 跳脫序列
  • execute.go 中快取 time.Now() 至 now 變數,消除重複呼叫
  • 將所有 Provider 中的 API URL 與常數由可變 var 改為 const




Files Changed


FileStatusTag
internal/agents/provider/claude/new.goModifiedFIX
internal/agents/provider/claude/send.goModifiedFIX / REFACTOR
internal/agents/provider/compat/new.goModifiedFIX
internal/agents/provider/compat/send.goModifiedFIX
internal/agents/provider/copilot/login.goModifiedREFACTOR
internal/agents/provider/copilot/new.goModifiedFIX
internal/agents/provider/copilot/refresh.goModifiedREFACTOR
internal/agents/provider/copilot/send.goModifiedFIX / REFACTOR
internal/agents/provider/gemini/new.goModifiedFIX
internal/agents/provider/gemini/send.goModifiedFIX / REFACTOR
internal/agents/provider/nvidia/new.goModifiedFIX
internal/agents/provider/nvidia/send.goModifiedFIX / REFACTOR
internal/agents/provider/openai/new.goModifiedFIX
internal/agents/provider/openai/send.goModifiedFIX / REFACTOR
internal/agents/exec/execute.goModifiedREFACTOR
internal/agents/exec/getSession.goModifiedFIX
internal/tools/executor.goModifiedREFACTOR
internal/tools/tools.goModifiedFIX



Generated by SKILL