Skip to content

v1.3.166

Choose a tag to compare

@topcheer topcheer released this 19 Jul 12:43

ggcode v1.3.166

Highlights

Config save: merge/patch semantics (no more clobbering)

All config save paths now use deep-merge instead of full overwrite:

  • Save(): When the config file already exists, the current config is overlaid onto the existing file content via recursive map merge. Only when the file does NOT exist (first write) is a full overwrite used. This prevents one process from clobbering fields that another process added concurrently.
  • SaveInstance(): The computed delta is deep-merged onto the existing instance file, preventing concurrent saves from different features within the same workspace from overwriting each other.
  • IM adapter methods (SetIMAdapterEnabled, AddIMAdapter, RemoveIMAdapter, SetIMAdapterExtra, AddIMTarget): switched from SaveScoped to patchConfigFile to correctly persist zero values (e.g. enabled: false) that were previously lost due to omitempty YAML tags.

New helpers:

  • deepMergeYAMLMaps(dst, src) — recursive map merge, scalar/slice overwrite
  • cleanZeroYAMLValues(m) — strips nil/empty-string/empty-slice/int-0 so they don't overwrite real values during merge
  • PatchIMAdapter(name, patch) — exported helper for IM adapter-level raw YAML patching

TUI: fix subcommand hints lingering after submit

When a slash command with subcommands (e.g. /harness, /knight, /tmux) was submitted without arguments, the <subcommand> hint would remain visible below the input box. All autocomplete and hint state is now cleared on Enter before processing the submission.

Fixes and improvements

  • fix: run_command description now mentions background job follow-up tools (read_command_output, wait_command), satisfying the TestToolDescriptions_OptimizedForLLM test requirement
  • fix: Two marshalGlobalOnly tests replaced with Save() merge-semantics tests that verify instance field exclusion end-to-end
  • fix: Two new merge-protection tests verify cross-process config preservation and unknown YAML field forward-compatibility

Upgrade notes

No breaking changes. No config migration needed. Existing config files are automatically preserved on next save.

Compare

v1.3.165...v1.3.166