Skip to content

Commit 394844e

Browse files
authored
Merge pull request #131 from Opencode-DCP/refactor/remove-unused-reason-param
refactor: remove unused reason parameter from buildAnalysisPrompt
2 parents 3259b34 + 51f4826 commit 394844e

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

lib/prompt.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,12 @@ export function buildAnalysisPrompt(
122122
unprunedToolCallIds: string[],
123123
messages: any[],
124124
alreadyPrunedIds?: string[],
125-
protectedToolCallIds?: string[],
126-
reason?: string
125+
protectedToolCallIds?: string[]
127126
): string {
128127
const minimizedMessages = minimizeMessages(messages, alreadyPrunedIds, protectedToolCallIds)
129128
const messagesJson = JSON.stringify(minimizedMessages, null, 2).replace(/\\n/g, '\n')
130129

131-
const reasonContext = reason
132-
? `\nContext: The AI has requested pruning with the following reason: "${reason}"\nUse this context to inform your decisions about what is most relevant to keep.`
133-
: ''
134-
135130
return loadPrompt("pruning", {
136-
reason_context: reasonContext,
137131
available_tool_call_ids: unprunedToolCallIds.join(", "),
138132
session_history: messagesJson
139133
})

lib/prompts/pruning.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
You are a conversation analyzer that identifies obsolete tool outputs in a coding session.
2-
{{reason_context}}
2+
33
Your task: Analyze the session history and identify tool call IDs whose outputs are NO LONGER RELEVANT to the current conversation context.
44

55
Guidelines for identifying obsolete tool calls:

0 commit comments

Comments
 (0)