diff --git a/src/constants/prompts.ts b/src/constants/prompts.ts index 66390a046..49755d8a7 100644 --- a/src/constants/prompts.ts +++ b/src/constants/prompts.ts @@ -67,12 +67,6 @@ import { getCurrentMode } from 'src/modes/store.js' // Dead code elimination: conditional imports for feature-gated modules /* eslint-disable @typescript-eslint/no-require-imports */ -const getCachedMCConfigForFRC = feature('CACHED_MICROCOMPACT') - ? ( - require('../services/compact/cachedMCConfig.js') as typeof import('../services/compact/cachedMCConfig.js') - ).getCachedMCConfig - : null - const proactiveModule = feature('PROACTIVE') || feature('KAIROS') ? require('../proactive/index.js') @@ -454,7 +448,6 @@ ${CYBER_RISK_INSTRUCTION}`, ? null : getMcpInstructionsSection(mcpClients), getScratchpadInstructions(), - getFunctionResultClearingSection(model), SUMMARIZE_TOOL_RESULTS_SECTION, getProactiveSection(), ].filter(s => s !== null) @@ -492,7 +485,6 @@ ${CYBER_RISK_INSTRUCTION}`, 'MCP servers connect/disconnect between turns', ), systemPromptSection('scratchpad', () => getScratchpadInstructions()), - systemPromptSection('frc', () => getFunctionResultClearingSection(model)), systemPromptSection( 'summarize_tool_results', () => SUMMARIZE_TOOL_RESULTS_SECTION, @@ -781,26 +773,6 @@ Only use \`/tmp\` if the user explicitly requests it. The scratchpad directory is session-specific, isolated from the user's project, and can be used freely without permission prompts.` } -function getFunctionResultClearingSection(model: string): string | null { - if (!feature('CACHED_MICROCOMPACT') || !getCachedMCConfigForFRC) { - return null - } - const config = getCachedMCConfigForFRC() - const isModelSupported = config.supportedModels?.some(pattern => - model.includes(pattern), - ) - if ( - !config.enabled || - !config.systemPromptSuggestSummaries || - !isModelSupported - ) { - return null - } - return `# Function Result Clearing - -Old tool results will be automatically cleared from context to free up space. The ${config.keepRecent} most recent results are always kept.` -} - const SUMMARIZE_TOOL_RESULTS_SECTION = `When working with tool results, write down any important information you might need later in your response, as the original tool result may be cleared later.` function getBriefSection(): string | null { diff --git a/src/services/compact/cachedMCConfig.ts b/src/services/compact/cachedMCConfig.ts deleted file mode 100644 index 3279fcc07..000000000 --- a/src/services/compact/cachedMCConfig.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Auto-generated stub — replace with real implementation -export {} -export const getCachedMCConfig: () => { - enabled?: boolean - systemPromptSuggestSummaries?: boolean - supportedModels?: string[] - [key: string]: unknown -} = () => ({})