mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-15 12:55:51 +00:00
- 从 DEFAULT_BUILD_FEATURES 注释掉 DAEMON(内存占用过高)
- remoteControlServer 命令门控从 feature('DAEMON') && feature('BRIDGE_MODE')
改为仅 feature('BRIDGE_MODE'),bridge 不再依赖 daemon
- --daemon-worker 快速路径改为运行时检测,未启用时输出明确错误提示
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
32 lines
851 B
TypeScript
32 lines
851 B
TypeScript
import { feature } from 'bun:bundle'
|
|
import { isBridgeEnabled } from '../../bridge/bridgeEnabled.js'
|
|
import type { Command } from '../../commands.js'
|
|
|
|
function isEnabled(): boolean {
|
|
if (!feature('BRIDGE_MODE')) {
|
|
return false
|
|
}
|
|
if (feature('DAEMON')) {
|
|
return isBridgeEnabled()
|
|
}
|
|
// DAEMON feature disabled — still allow the command but warn at runtime
|
|
// that headless/daemon worker mode is unavailable.
|
|
return isBridgeEnabled()
|
|
}
|
|
|
|
const remoteControlServer = {
|
|
type: 'local-jsx',
|
|
name: 'remote-control-server',
|
|
aliases: ['rcs'],
|
|
description:
|
|
'Start a persistent Remote Control server (daemon) that accepts multiple sessions',
|
|
isEnabled,
|
|
get isHidden() {
|
|
return !isEnabled()
|
|
},
|
|
immediate: true,
|
|
load: () => import('./remoteControlServer.js'),
|
|
} satisfies Command
|
|
|
|
export default remoteControlServer
|