feat: channels config in settings — inject --channels into new sessions - #52
Merged
Conversation
Add a `channels` field to AppSettings and a Channels section in the Settings panel that lets users toggle channel plugins (Telegram, Discord, autonomOS) on/off. Enabled channels are persisted to settings.json and automatically injected as `--channels` args when spawning any new Claude Code session. Changes: - `settings.ts`: add `channels?: string[]` to AppSettings interface; treat empty arrays the same as empty strings on save (remove the key) - `routes/settings.ts`: expose `channels` in masked response; accept and validate `channels` array in PUT body - `sessions.ts`: read `channels` from settings and append `--channels …` to the spawn args; add a debug log line showing the full spawn command - `SettingsStatusBarItem.tsx`: add AVAILABLE_CHANNELS registry (Telegram, Discord, autonomOS), ChannelToggle component, pendingChannels state, and wire everything into the save flow - `Codicon.tsx`: export CodiconName type (needed by ChannelToggle) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
aterrylu
force-pushed
the
terry/channels-config
branch
from
March 24, 2026 03:27
5a16a3e to
38bca05
Compare
nox-0x
approved these changes
Mar 24, 2026
nox-0x
left a comment
Collaborator
There was a problem hiding this comment.
Channels config is clean end-to-end — settings persistence, masked GET response, validated PUT, and UI toggle state all look right. One minor nit: the debug console.log on session spawn should be guarded or removed before merge.
nox-0x
reviewed
Mar 24, 2026
| args.push("--", options.prompt); | ||
| } | ||
|
|
||
| console.log(`[session] spawning: ${binary} ${args.join(" ")}`); |
Collaborator
There was a problem hiding this comment.
🟢 Suggestion — This console.log prints the full spawn command on every session. Fine for debugging but worth guarding with a DEBUG_SESSIONS env flag before shipping to avoid log noise.
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
channelsfield toAppSettingsfor persisting enabled channel plugins--channelsargs on every new Claude Code session spawn (requires Claude Code v2.1.80+)Changes
settings.ts:channels?: string[]added to interface; empty arrays cleaned up on saveroutes/settings.ts:channelsexposed in masked GET response; validated in PUT bodysessions.ts: channels read from settings and appended to spawn args; debug log addedSettingsStatusBarItem.tsx:AVAILABLE_CHANNELSregistry,ChannelTogglecomponent,pendingChannelsstate wired into save flowCodicon.tsx: exportsCodiconNametype (used byChannelToggle)Testing
--channelsappears in the server console logchannelskey is removed from settings.json (not stored as empty array)