fix: remove redundant removeCodeBlocks call
Remove duplicate removeCodeBlocks() call in keyword-detector/index.ts. The detectKeywordsWithType() function already calls removeCodeBlocks() internally, so calling it before passing the text was redundant and caused unnecessary double processing.
This commit is contained in:
parent
08889b889a
commit
f68a6f7d1b
@ -36,7 +36,7 @@ export function createKeywordDetectorHook(ctx: PluginInput, collector?: ContextC
|
|||||||
// Remove system-reminder content to prevent automated system messages from triggering mode keywords
|
// Remove system-reminder content to prevent automated system messages from triggering mode keywords
|
||||||
const cleanText = removeSystemReminders(promptText)
|
const cleanText = removeSystemReminders(promptText)
|
||||||
const modelID = input.model?.modelID
|
const modelID = input.model?.modelID
|
||||||
let detectedKeywords = detectKeywordsWithType(removeCodeBlocks(cleanText), currentAgent, modelID)
|
let detectedKeywords = detectKeywordsWithType(cleanText, currentAgent, modelID)
|
||||||
|
|
||||||
if (isPlannerAgent(currentAgent)) {
|
if (isPlannerAgent(currentAgent)) {
|
||||||
detectedKeywords = detectedKeywords.filter((k) => k.type !== "ultrawork")
|
detectedKeywords = detectedKeywords.filter((k) => k.type !== "ultrawork")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user