feat(settings): accept collapsed as alias for default tool-collapse mode (#3256)#3695
Merged
Merged
Conversation
… mode Issue Hmbown#3256 proposes naming the default tool-call verbosity `collapsed` (opposite `expanded`). The implementation shipped the canonical name as `compact`, so a user following the issue/docs and setting `tool_collapse=collapsed` was stored verbatim and only worked by falling through to the default match arm. Accept `collapsed`/`collapse` as explicit aliases that normalize to the canonical `compact`, align the settings help text, and document the intent in ToolCollapseMode::from_setting. Backward compatible; adds round-trip coverage to the existing tool_collapse_mode_is_configurable test. Refs Hmbown#3256 Signed-off-by: findshan <224246733+findshan@users.noreply.github.com>
|
Thanks @findshan for taking the time to contribute. This repository is observing a maintainer-managed PR intake gate in dry-run mode, so this pull request is staying open. This note helps maintainers prepare the allowlist before any enforcement is considered. Please read |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Issue #3256 proposes that the default tool-call verbosity mode be named
collapsed(oppositeexpanded), and made configurable. The collapse/expand behavior, thetool_collapsesetting, the failure-auto-expand path, and theAlt+Vremoval already shipped — the canonical setting value iscompact. The one remaining gap: the issue's own proposed namecollapsedwas not a recognized value, sotool_collapse=collapsedwas stored verbatim and only behaved correctly by falling through to the default match arm (never round-tripping to a canonical name, and absent from the help text).This PR closes that vocabulary gap:
normalize_tool_collapse_modenow acceptscollapsed/collapseas aliases that normalize to the canonicalcompact.collapsed (alias compact).ToolCollapseMode::from_settingdocuments the intent.tool_collapse_mode_is_configurabletest.Backward compatible — existing
compact/expanded/calmconfigs are unchanged.Note on scope
I verified the rest of #3256 is already implemented on
main:crates/tui/src/tui/history.rs(should_collapse+ theFailed → Transcriptoverride).tool_collapsesetting +ToolCollapseMode(compact/expanded/calm).Alt+Vaffordance is already gone (replaced by the barevdetails key); no dead "Alt+V for details" hint remains.So this is intentionally a small alignment PR rather than a reimplementation. Happy to also fold in the batched-call rollup from the issue as a follow-up if useful.
Test
cargo test -p codewhale-tui --bin codewhale-tui settings::tests::tool_collapse_mode_is_configurablepasses;cargo fmt --all -- --checkandcargo clippy -p codewhale-tui --all-features --locked(CI flags) clean.Refs #3256