chore: remove poor mode

This commit is contained in:
James Feng 2026-06-07 02:34:25 +08:00
parent e2aafbb5b5
commit 987578b52a
9 changed files with 2 additions and 76 deletions

View File

@ -249,12 +249,6 @@ Feature flags control which functionality is enabled at runtime. 代码中统一
详见各兼容层的 docs 文档。 详见各兼容层的 docs 文档。
### 穷鬼模式Budget Mode
- 通过 `/poor` 命令切换,持久化到 `settings.json`
- 启用后跳过 `extract_memories`、`prompt_suggestion` 和 `verification_agent`,显著减少 token 消耗。
- 实现在 `src/commands/poor/poorMode.ts`
### Stubbed/Deleted Modules ### Stubbed/Deleted Modules
| Module | Status | | Module | Status |

View File

@ -23,7 +23,6 @@
| **Remote Control 私有部署** | Docker 自托管远程界面, 可以手机上看 CC | [文档](https://ccb.agent-aura.top/docs/features/remote-control-self-hosting) | | **Remote Control 私有部署** | Docker 自托管远程界面, 可以手机上看 CC | [文档](https://ccb.agent-aura.top/docs/features/remote-control-self-hosting) |
| **Langfuse 监控** | 企业级 Agent 监控, 可以清晰看到每次 agent loop 细节, 可以一键转化为数据集 | [文档](https://ccb.agent-aura.top/docs/features/langfuse-monitoring) | | **Langfuse 监控** | 企业级 Agent 监控, 可以清晰看到每次 agent loop 细节, 可以一键转化为数据集 | [文档](https://ccb.agent-aura.top/docs/features/langfuse-monitoring) |
| **Web Search** | 内置网页搜索工具, 支持 bing 和 brave 搜索 | [文档](https://ccb.agent-aura.top/docs/features/web-browser-tool) | | **Web Search** | 内置网页搜索工具, 支持 bing 和 brave 搜索 | [文档](https://ccb.agent-aura.top/docs/features/web-browser-tool) |
| **Poor Mode** | 穷鬼模式,关闭记忆提取和键入建议,大幅度减少并发请求 | /poor 可以开关 |
| **Channels 频道通知** | MCP 服务器推送外部消息到会话(飞书/Slack/Discord/微信等),`--channels plugin:name@marketplace` 启用 | [文档](https://ccb.agent-aura.top/docs/features/channels) | | **Channels 频道通知** | MCP 服务器推送外部消息到会话(飞书/Slack/Discord/微信等),`--channels plugin:name@marketplace` 启用 | [文档](https://ccb.agent-aura.top/docs/features/channels) |
| **自定义模型供应商** | OpenAI/Anthropic/Gemini/Grok 兼容 (`/login`) | [文档](https://ccb.agent-aura.top/docs/features/all-features-guide) | | **自定义模型供应商** | OpenAI/Anthropic/Gemini/Grok 兼容 (`/login`) | [文档](https://ccb.agent-aura.top/docs/features/all-features-guide) |
| Voice Mode | 语音输入,支持豆包语言输入(`/voice doubao` | [文档](https://ccb.agent-aura.top/docs/features/voice-mode) | | Voice Mode | 语音输入,支持豆包语言输入(`/voice doubao` | [文档](https://ccb.agent-aura.top/docs/features/voice-mode) |

View File

@ -88,8 +88,6 @@ export const DEFAULT_BUILD_FEATURES = [
'EXPERIMENTAL_SKILL_SEARCH', // 技能搜索bounded caches 已修复 overflow内存问题已解决 'EXPERIMENTAL_SKILL_SEARCH', // 技能搜索bounded caches 已修复 overflow内存问题已解决
'EXPERIMENTAL_SEARCH_EXTRA_TOOLS', // 工具搜索预取管道TF-IDF 索引 + inter-turn 异步预取) 'EXPERIMENTAL_SEARCH_EXTRA_TOOLS', // 工具搜索预取管道TF-IDF 索引 + inter-turn 异步预取)
// 'SKILL_LEARNING', // 'SKILL_LEARNING',
// P3: poor mode
'POOR', // 穷鬼模式,跳过 extract_memories/prompt_suggestion 减少消耗
// Team Memory // Team Memory
// 'TEAMMEM', // 已禁用:依赖 COORDINATOR_MODE邮箱文件无限增长 // 'TEAMMEM', // 已禁用:依赖 COORDINATOR_MODE邮箱文件无限增长
// SSH Remote // SSH Remote

View File

@ -1,27 +0,0 @@
/**
* Poor mode state when active, skips extract_memories and prompt_suggestion
* to reduce token consumption.
*
* Persisted to settings.json so it survives session restarts.
*/
import {
getInitialSettings,
updateSettingsForSource,
} from '../../utils/settings/settings.js'
let poorModeActive: boolean | null = null
export function isPoorModeActive(): boolean {
if (poorModeActive === null) {
poorModeActive = getInitialSettings().poorMode === true
}
return poorModeActive
}
export function setPoorMode(active: boolean): void {
poorModeActive = active
updateSettingsForSource('userSettings', {
poorMode: active || undefined,
})
}

View File

@ -440,29 +440,6 @@ 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'
? [ ? [

View File

@ -44,9 +44,6 @@ mock.module('src/constants/common.js', () => ({
mock.module('src/utils/settings/settings.js', () => ({ mock.module('src/utils/settings/settings.js', () => ({
getInitialSettings: () => ({ language: undefined }), getInitialSettings: () => ({ language: undefined }),
})) }))
mock.module('src/commands/poor/poorMode.js', () => ({
isPoorModeActive: () => false,
}))
mock.module('src/utils/env.js', () => ({ mock.module('src/utils/env.js', () => ({
env: { platform: 'linux' }, env: { platform: 'linux' },
})) }))

View File

@ -7,8 +7,6 @@ import { getIsNonInteractiveSession } from '../bootstrap/state.js'
import { getCurrentWorktreeSession } from '../utils/worktree.js' import { getCurrentWorktreeSession } from '../utils/worktree.js'
import { getSessionStartDate } from './common.js' import { getSessionStartDate } from './common.js'
import { getInitialSettings } from '../utils/settings/settings.js' import { getInitialSettings } from '../utils/settings/settings.js'
// Stub: poor mode removed from CCP
const isPoorModeActive = () => false
import { import {
AGENT_TOOL_NAME, AGENT_TOOL_NAME,
VERIFICATION_AGENT_TYPE, VERIFICATION_AGENT_TYPE,
@ -367,9 +365,7 @@ function getSessionSpecificGuidanceSection(
hasAgentTool && hasAgentTool &&
feature('VERIFICATION_AGENT') && feature('VERIFICATION_AGENT') &&
// 3P default: false — verification agent is ant-only A/B // 3P default: false — verification agent is ant-only A/B
getFeatureValue_CACHED_MAY_BE_STALE('tengu_hive_evidence', false) && getFeatureValue_CACHED_MAY_BE_STALE('tengu_hive_evidence', false)
// Poor mode: skip verification agent to save tokens
!isPoorModeActive()
? `The contract: when non-trivial implementation happens on your turn, independent adversarial verification must happen before you report completion \u2014 regardless of who did the implementing (you directly, a fork you spawned, or a subagent). You are the one reporting to the user; you own the gate. Non-trivial means: 3+ file edits, backend/API changes, or infrastructure changes. Spawn the ${AGENT_TOOL_NAME} tool with subagent_type="${VERIFICATION_AGENT_TYPE}". Your own checks, caveats, and a fork's self-checks do NOT substitute \u2014 only the verifier assigns a verdict; you cannot self-assign PARTIAL. Pass the original user request, all files changed (by anyone), the approach, and the plan file path if applicable. Flag concerns if you have them but do NOT share test results or claim things work. On FAIL: fix, resume the verifier with its findings plus your fix, repeat until PASS. On PASS: spot-check it \u2014 re-run 2-3 commands from its report, confirm every PASS has a Command run block with output that matches your re-run. If any PASS lacks a command block or diverges, resume the verifier with the specifics. On PARTIAL (from the verifier): report what passed and what could not be verified.` ? `The contract: when non-trivial implementation happens on your turn, independent adversarial verification must happen before you report completion \u2014 regardless of who did the implementing (you directly, a fork you spawned, or a subagent). You are the one reporting to the user; you own the gate. Non-trivial means: 3+ file edits, backend/API changes, or infrastructure changes. Spawn the ${AGENT_TOOL_NAME} tool with subagent_type="${VERIFICATION_AGENT_TYPE}". Your own checks, caveats, and a fork's self-checks do NOT substitute \u2014 only the verifier assigns a verdict; you cannot self-assign PARTIAL. Pass the original user request, all files changed (by anyone), the approach, and the plan file path if applicable. Flag concerns if you have them but do NOT share test results or claim things work. On FAIL: fix, resume the verifier with its findings plus your fix, repeat until PASS. On PASS: spot-check it \u2014 re-run 2-3 commands from its report, confirm every PASS has a Command run block with output that matches your re-run. If any PASS lacks a command block or diverges, resume the verifier with the specifics. On PARTIAL (from the verifier): report what passed and what could not be verified.`
: null, : null,
].filter(item => item !== null) ].filter(item => item !== null)

View File

@ -82,8 +82,6 @@ export async function* handleStopHooks(
StopHookResult StopHookResult
> { > {
const hookStartTime = Date.now() const hookStartTime = Date.now()
// CCP: poor mode module not present — always false
const poorMode = false
const stopHookContext: REPLHookContext = { const stopHookContext: REPLHookContext = {
messages: [...messagesForQuery, ...assistantMessages], messages: [...messagesForQuery, ...assistantMessages],
@ -157,7 +155,7 @@ export async function* handleStopHooks(
| undefined, | undefined,
) )
} }
if (!toolUseContext.agentId && !poorMode) { if (!toolUseContext.agentId) {
void executeAutoDream(stopHookContext, toolUseContext.appendSystemMessage) void executeAutoDream(stopHookContext, toolUseContext.appendSystemMessage)
} }
} }

View File

@ -281,12 +281,6 @@ const extractSessionMemory = sequential(async function (
return return
} }
// Poor mode: skip to reduce token consumption (stubbed — poor mode removed from CCP)
if (feature('POOR')) {
// isPoorModeActive stub — poor/poorMode.js not present in CCP
return
}
// Check gate lazily when hook runs (cached, non-blocking) // Check gate lazily when hook runs (cached, non-blocking)
if (!isSessionMemoryGateEnabled()) { if (!isSessionMemoryGateEnabled()) {
// Log gate failure once per session (ant-only) // Log gate failure once per session (ant-only)