fix: skip keyword injection for non-OMO agents (fixes #2024)

This commit is contained in:
YeonGyu-Kim
2026-03-23 18:10:44 +09:00
parent d886ac701f
commit de371be236
5 changed files with 125 additions and 2 deletions
@@ -23,6 +23,16 @@ export function isPlannerAgent(agentName?: string): boolean {
return /\bplan\b/.test(normalized)
}
/**
* Checks if agent is a non-OMO agent (e.g., OpenCode's built-in Builder/Plan).
* Non-OMO agents should not receive keyword injection (search-mode, analyze-mode, etc.).
*/
export function isNonOmoAgent(agentName?: string): boolean {
if (!agentName) return false
const lowerName = agentName.toLowerCase()
return lowerName.includes("builder") || lowerName === "plan"
}
export { isGptModel, isGeminiModel }
/** Ultrawork message source type */