Skip to content

Commit 2cc9a7d

Browse files
Revert "feat: 添加 /goal 命令,支持长时间运行任务的目标管理 (#1222)" (#1236)
This reverts commit d66a6f6.
1 parent d66a6f6 commit 2cc9a7d

10 files changed

Lines changed: 0 additions & 483 deletions

File tree

packages/builtin-tools/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export { AskUserQuestionTool } from './tools/AskUserQuestionTool/AskUserQuestion
1212
export { BashTool } from './tools/BashTool/BashTool.js'
1313
export { BriefTool } from './tools/BriefTool/BriefTool.js'
1414
export { ConfigTool } from './tools/ConfigTool/ConfigTool.js'
15-
export { GoalTool } from './tools/GoalTool/GoalTool.js'
1615
export { EnterPlanModeTool } from './tools/EnterPlanModeTool/EnterPlanModeTool.js'
1716
export { EnterWorktreeTool } from './tools/EnterWorktreeTool/EnterWorktreeTool.js'
1817
export { ExitPlanModeV2Tool } from './tools/ExitPlanModeTool/ExitPlanModeV2Tool.js'

packages/builtin-tools/src/tools/GoalTool/GoalTool.ts

Lines changed: 0 additions & 212 deletions
This file was deleted.

packages/builtin-tools/src/tools/GoalTool/prompt.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/commands.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ import thinkbackPlay from './commands/thinkback-play/index.js'
167167
import permissions from './commands/permissions/index.js'
168168
import plan from './commands/plan/index.js'
169169
import fast from './commands/fast/index.js'
170-
import goal from './commands/goal/index.js'
171170
import passes from './commands/passes/index.js'
172171
import privacySettings from './commands/privacy-settings/index.js'
173172
import hooks from './commands/hooks/index.js'
@@ -317,7 +316,6 @@ const COMMANDS = memoize((): Command[] => [
317316
exit,
318317
fast,
319318
files,
320-
goal,
321319
heapDump,
322320
help,
323321
ide,

src/commands/goal/goal.ts

Lines changed: 0 additions & 66 deletions
This file was deleted.

src/commands/goal/index.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/constants/prompts.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ import {
5757
resolveSystemPromptSections,
5858
} from './systemPromptSections.js'
5959
import { SLEEP_TOOL_NAME } from '@claude-code-best/builtin-tools/tools/SleepTool/prompt.js'
60-
import { getGoalContinuationPrompt } from '../services/goal/goalState.js'
6160
import { TICK_TAG } from './xml.js'
6261
import { logForDebugging } from '../utils/debug.js'
6362
import { loadMemoryPrompt } from '../memdir/memdir.js'
@@ -506,11 +505,6 @@ ${CYBER_RISK_INSTRUCTION}`,
506505
...(feature('KAIROS') || feature('KAIROS_BRIEF')
507506
? [systemPromptSection('brief', () => getBriefSection())]
508507
: []),
509-
DANGEROUS_uncachedSystemPromptSection(
510-
'goal_continuation',
511-
() => getGoalContinuationPrompt(),
512-
'Goal state changes between turns',
513-
),
514508
]
515509

516510
const resolvedDynamicSections =

src/query.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import type {
55
} from '@anthropic-ai/sdk/resources/index.mjs'
66
import type { CanUseToolFn } from './hooks/useCanUseTool.js'
77
import { FallbackTriggeredError } from './services/api/withRetry.js'
8-
import { updateGoalTokens } from './services/goal/goalState.js'
98
import {
109
calculateTokenWarningState,
1110
estimateMaxTurnGrowth,
@@ -1266,13 +1265,6 @@ async function* queryLoop(
12661265
if (warningInfo) {
12671266
yield createCacheWarningMessage(warningInfo)
12681267
}
1269-
1270-
// Update goal token usage
1271-
const totalTokens =
1272-
usage.input_tokens +
1273-
(usage.cache_creation_input_tokens ?? 0) +
1274-
(usage.cache_read_input_tokens ?? 0)
1275-
updateGoalTokens(totalTokens)
12761268
}
12771269
}
12781270

0 commit comments

Comments
 (0)