feat(config): per-project [projects.display] override#792
Open
Cigarrr wants to merge 1 commit intochenhg5:mainfrom
Open
feat(config): per-project [projects.display] override#792Cigarrr wants to merge 1 commit intochenhg5:mainfrom
Cigarrr wants to merge 1 commit intochenhg5:mainfrom
Conversation
Add a `Display *DisplayConfig` field to ProjectConfig so each project can override the global [display] block on a per-field basis. Useful when one project should run quiet while others stay verbose, or vice versa. Schema: [display] thinking_messages = true tool_messages = true [[projects]] name = "noisy-project" [projects.display] thinking_messages = false tool_messages = false Resolution order for each field in EffectiveDisplay: 1. [projects.display].<field> (highest precedence) 2. [display].<field> 3. built-in default All four DisplayConfig fields (ThinkingMessages, ToolMessages, ThinkingMaxLen, ToolMaxLen) participate. Legacy `quiet` behavior is preserved: if quiet is in effect AND neither layer set thinking_messages / tool_messages, they default to off (existing semantics, just extended to honor project-level overrides). Includes 7 new test cases covering project-overrides-global, fallback chain, max-len overrides, quiet interaction, and nil project display.
chenhg5
approved these changes
Apr 27, 2026
Owner
chenhg5
left a comment
There was a problem hiding this comment.
Review Summary
Clean implementation of per-project [projects.display] override. The per-field resolution logic is well-designed and backward-compatible.
✅ Good:
-
Per-field resolution:
pickBool/pickInthelpers cleanly implement the precedence: project → global → default. -
Legacy quiet preserved: When
quiet=trueAND neither layer explicitly setsthinking_messages/tool_messages, they default to false. Project-level[projects.display]takes precedence over both global display and quiet. -
Comprehensive tests: 7 test cases in
TestEffectiveDisplay_ProjectOverridecover all resolution paths. -
Documentation: Clear config example showing the per-field override pattern.
LGTM. CI green.
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.
Summary
Allow each
[[projects]]entry to override individual fields of the global[display]block, on a per-field basis. Useful when you want one project to run quiet while others stay verbose, or vice versa, without splitting into separate cc-connect instances.Schema
Each sub-field is independently optional; unset fields fall back to the global
[display]value, then to the built-in default.Resolution order (per field)
[projects.display].<field>— highest precedence[display].<field>All four
DisplayConfigfields participate (ThinkingMessages,ToolMessages,ThinkingMaxLen,ToolMaxLen).Backward compatibility
[projects.display]block see no behavior change.quiet(root or per-project) is preserved: if quiet is in effect AND neither layer setthinking_messages/tool_messages, they default tofalse— same as before, just extended to honor project-level overrides when present.Tests
7 new sub-tests in
TestEffectiveDisplay_ProjectOverridecover:go test ./...passes (the 4 pre-existing failures onmain—TestProcessInteractiveEvents_AppendsReplyFooterWhenEnabled,TestProcessInteractiveEvents_ReplyFooterPrefersSessionRuntimeState,TestResolveLocalDirPath_AcceptsSubdir,TestGetModelAndReasoningEffort_FromRuntimeConfigWhenUnset— are unrelated to this change).Docs
config.example.tomlupdated with a commented-out[projects.display]example next to the global[display]section.