mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-22 16:25:51 +00:00
fix: 修复穷鬼模式的写入问题
This commit is contained in:
@@ -25,6 +25,7 @@
|
|||||||
| Computer Use / Chrome Use | 截图、键鼠控制、浏览器操控 | [Computer Use](https://ccb.agent-aura.top/docs/features/computer-use)<br>[Chrome Use](https://ccb.agent-aura.top/docs/features/claude-in-chrome-mcp) |
|
| Computer Use / Chrome Use | 截图、键鼠控制、浏览器操控 | [Computer Use](https://ccb.agent-aura.top/docs/features/computer-use)<br>[Chrome Use](https://ccb.agent-aura.top/docs/features/claude-in-chrome-mcp) |
|
||||||
| Sentry / GrowthBook 企业监控 | 企业级错误追踪与特性开关 | [Sentry](https://ccb.agent-aura.top/docs/internals/sentry-setup)<br>[GrowthBook](https://ccb.agent-aura.top/docs/internals/growthbook-adapter) |
|
| Sentry / GrowthBook 企业监控 | 企业级错误追踪与特性开关 | [Sentry](https://ccb.agent-aura.top/docs/internals/sentry-setup)<br>[GrowthBook](https://ccb.agent-aura.top/docs/internals/growthbook-adapter) |
|
||||||
| Langfuse 监控 | LLM 调用/工具执行/多 Agent 全链路追踪 | [文档](https://ccb.agent-aura.top/docs/features/langfuse-monitoring) |
|
| Langfuse 监控 | LLM 调用/工具执行/多 Agent 全链路追踪 | [文档](https://ccb.agent-aura.top/docs/features/langfuse-monitoring) |
|
||||||
|
| Poor Mode | 穷鬼模式,关闭记忆提取和键入建议 | /poor 可以开关 |
|
||||||
|
|
||||||
|
|
||||||
- 🔮 [ ] V6 — 大规模重构石山代码,全面模块分包(全新分支,main 封存为历史版本)
|
- 🔮 [ ] V6 — 大规模重构石山代码,全面模块分包(全新分支,main 封存为历史版本)
|
||||||
|
|||||||
@@ -1,14 +1,24 @@
|
|||||||
/**
|
/**
|
||||||
* Poor mode state — when active, skips extract_memories and prompt_suggestion
|
* Poor mode state — when active, skips extract_memories and prompt_suggestion
|
||||||
* to reduce token consumption.
|
* to reduce token consumption.
|
||||||
|
*
|
||||||
|
* Persisted to settings.json so it survives session restarts.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
let poorModeActive = false
|
import { getInitialSettings, updateSettingsForSource } from '../../utils/settings/settings.js'
|
||||||
|
|
||||||
|
let poorModeActive: boolean | null = null
|
||||||
|
|
||||||
export function isPoorModeActive(): boolean {
|
export function isPoorModeActive(): boolean {
|
||||||
|
if (poorModeActive === null) {
|
||||||
|
poorModeActive = getInitialSettings().poorMode === true
|
||||||
|
}
|
||||||
return poorModeActive
|
return poorModeActive
|
||||||
}
|
}
|
||||||
|
|
||||||
export function setPoorMode(active: boolean): void {
|
export function setPoorMode(active: boolean): void {
|
||||||
poorModeActive = active
|
poorModeActive = active
|
||||||
|
updateSettingsForSource('userSettings', {
|
||||||
|
poorMode: active || undefined,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -470,6 +470,27 @@ export function Config({
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
: []),
|
: []),
|
||||||
|
...(feature('POOR')
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
id: 'poorMode',
|
||||||
|
label: 'Poor mode (save tokens)',
|
||||||
|
value: (() => {
|
||||||
|
const PoorMode = require('../../commands/poor/poorMode.js') as typeof import('../../commands/poor/poorMode.js')
|
||||||
|
return PoorMode.isPoorModeActive()
|
||||||
|
})(),
|
||||||
|
type: 'boolean' as const,
|
||||||
|
onChange(enabled: boolean) {
|
||||||
|
const PoorMode = require('../../commands/poor/poorMode.js') as typeof import('../../commands/poor/poorMode.js')
|
||||||
|
PoorMode.setPoorMode(enabled)
|
||||||
|
setAppState(prev => ({
|
||||||
|
...prev,
|
||||||
|
promptSuggestionEnabled: !enabled,
|
||||||
|
}))
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: []),
|
||||||
// Speculation toggle (ant-only)
|
// Speculation toggle (ant-only)
|
||||||
...(process.env.USER_TYPE === 'ant'
|
...(process.env.USER_TYPE === 'ant'
|
||||||
? [
|
? [
|
||||||
|
|||||||
@@ -739,6 +739,12 @@ export const SettingsSchema = lazySchema(() =>
|
|||||||
'When false, prompt suggestions are disabled. When absent or true, ' +
|
'When false, prompt suggestions are disabled. When absent or true, ' +
|
||||||
'prompt suggestions are enabled.',
|
'prompt suggestions are enabled.',
|
||||||
),
|
),
|
||||||
|
poorMode: z
|
||||||
|
.boolean()
|
||||||
|
.optional()
|
||||||
|
.describe(
|
||||||
|
'When true, poor mode is active — extract_memories and prompt_suggestion are disabled to save tokens.',
|
||||||
|
),
|
||||||
showClearContextOnPlanAccept: z
|
showClearContextOnPlanAccept: z
|
||||||
.boolean()
|
.boolean()
|
||||||
.optional()
|
.optional()
|
||||||
|
|||||||
Reference in New Issue
Block a user