fix(compaction): remove hardcoded Claude model from compaction hooks

This commit is contained in:
YeonGyu-Kim
2026-02-06 17:49:26 +09:00
parent f1b2f6f3f7
commit 60bbeb7304
8 changed files with 119 additions and 114 deletions
+19
View File
@@ -0,0 +1,19 @@
import type { ToolDefinition } from "@opencode-ai/plugin"
export function filterDisabledTools(
tools: Record<string, ToolDefinition>,
disabledTools: readonly string[] | undefined
): Record<string, ToolDefinition> {
if (!disabledTools || disabledTools.length === 0) {
return tools
}
const disabledToolSet = new Set(disabledTools)
const filtered: Record<string, ToolDefinition> = {}
for (const [toolName, toolDefinition] of Object.entries(tools)) {
if (!disabledToolSet.has(toolName)) {
filtered[toolName] = toolDefinition
}
}
return filtered
}