feat: /config command with source attribution#184
Merged
Conversation
Shows the effective channel configuration as a table with a Source column indicating where each setting came from (defaults, config.json, dynamic channel, bot default, channel prefs, runtime, or active session). - resolveEffectiveConfig() merges all config layers with attribution - formatConfigTable() renders markdown table for chat - Provider prefix only applied when model source is channel prefs - Workspace/bot source correctly attributed across all value sources - 18 new tests covering resolver logic and formatting - Added to help text and bridge-docs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a new /config slash command to surface the effective (merged) channel configuration in chat as a markdown table, including a “Source” column indicating which layer supplied each value.
Changes:
- Added
resolveEffectiveConfig()to compute effective settings plus per-setting source attribution. - Added
formatConfigTable()and wired/configinto command dispatch and/helpoutput. - Added test coverage for resolver/formatter behavior and basic command integration; updated bridge docs to list
/config.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/core/command-handler.ts | Implements effective-config resolver + formatter and adds /config command + help text. |
| src/core/command-handler.test.ts | Adds unit/integration tests for /config, resolver attribution, and table formatting. |
| src/core/bridge-docs.ts | Documents the new /config slash command. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Prevents markdown injection from user-controlled channel pref values containing pipe characters, newlines, or backticks. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- agent: null in channel prefs now treated as explicit deselect (matches session-manager getEffectivePrefs logic) - Bot name resolved via getChannelBotName() to show platform default instead of literal 'default' - 2 new tests for both cases Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Adds a
/configslash command that displays the effective channel configuration as a table with source attribution, showing where each setting came from.What it does
Key changes
src/core/command-handler.ts:resolveEffectiveConfig(),formatConfigTable(),/configcasesrc/core/command-handler.test.ts: 18 new tests for resolver, formatter, and command integrationsrc/core/bridge-docs.ts: Added/configto commands topicExample output