MCPcopy Create free account
hub / github.com/T-Lab-CUHKSZ/claude-code / writeFeatureFlags

Function writeFeatureFlags

config-ui/server.ts:143–188  ·  view source on GitHub ↗
(flags: Record<string, boolean>)

Source from the content-addressed store, hash-verified

141}
142
143function writeFeatureFlags(flags: Record<string, boolean>) {
144 const descriptions: Record<string, string> = {
145 KAIROS: 'Assistant / daily-log mode',
146 PROACTIVE: 'Proactive autonomous mode',
147 BRIDGE_MODE: 'VS Code / JetBrains IDE bridge',
148 VOICE_MODE: 'Voice input via native audio capture',
149 COORDINATOR_MODE: 'Multi-agent swarm coordinator',
150 TRANSCRIPT_CLASSIFIER: 'Auto-mode permission classifier',
151 BASH_CLASSIFIER: 'Bash command safety classifier',
152 BUDDY: 'Companion sprite animation',
153 WEB_BROWSER_TOOL: 'In-process web browser tool',
154 CHICAGO_MCP: 'Computer Use (screen control)',
155 AGENT_TRIGGERS: 'Scheduled cron agents',
156 ULTRAPLAN: 'Ultra-detailed planning mode',
157 MONITOR_TOOL: 'MCP server monitoring',
158 TEAMMEM: 'Shared team memory',
159 EXTRACT_MEMORIES: 'Background memory extraction agent',
160 MCP_SKILLS: 'Skills from MCP servers',
161 REVIEW_ARTIFACT: 'Review artifact tool',
162 CONNECTOR_TEXT: 'Connector text blocks',
163 DOWNLOAD_USER_SETTINGS: 'Remote settings sync',
164 MESSAGE_ACTIONS: 'Message action buttons',
165 KAIROS_CHANNELS: 'Channel notifications',
166 KAIROS_GITHUB_WEBHOOKS: 'GitHub webhook integration',
167 }
168
169 const lines = Object.entries(flags).map(([flag, enabled]) => {
170 const desc = descriptions[flag] || flag
171 return enabled
172 ? ` '${flag}', // ${desc}`
173 : ` // '${flag}', // ${desc}`
174 })
175
176 const content = `// Runtime polyfill for bun:bundle feature() function
177// Managed by Claude Code Config UI
178
179const ENABLED_FEATURES = new Set([
180${lines.join('\n')}
181])
182
183module.exports.feature = function feature(name) {
184 return ENABLED_FEATURES.has(name)
185}
186`
187 writeTextSafe(getBundlePolyfillPath(), content)
188}
189
190// --- API Router ---
191

Callers 1

handleAPIFunction · 0.85

Calls 3

writeTextSafeFunction · 0.85
getBundlePolyfillPathFunction · 0.85
entriesMethod · 0.80

Tested by

no test coverage detected