refactor: use ContextCollector for hook injection and remove unused background tools

Split changes:
- Replace injectHookMessage with ContextCollector.register() pattern for improved hook content injection
- Remove unused background task tools infrastructure (createBackgroundOutput, createBackgroundCancel)

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
YeonGyu-Kim
2026-01-06 17:02:16 +09:00
parent 5331a9f8c1
commit c074da0b93
3 changed files with 34 additions and 35 deletions
+3 -14
View File
@@ -35,25 +35,14 @@ export { createSkillTool } from "./skill"
export { getTmuxPath } from "./interactive-bash/utils"
export { createSkillMcpTool } from "./skill-mcp"
import {
createBackgroundOutput,
createBackgroundCancel,
} from "./background-task"
import type { PluginInput, ToolDefinition } from "@opencode-ai/plugin"
import type { BackgroundManager } from "../features/background-agent"
type OpencodeClient = PluginInput["client"]
import type { ToolDefinition } from "@opencode-ai/plugin"
export { createCallOmoAgent } from "./call-omo-agent"
export { createLookAt } from "./look-at"
export { createSisyphusTask, type SisyphusTaskToolOptions, DEFAULT_CATEGORIES, CATEGORY_PROMPT_APPENDS } from "./sisyphus-task"
export function createBackgroundTools(manager: BackgroundManager, client: OpencodeClient): Record<string, ToolDefinition> {
return {
background_output: createBackgroundOutput(manager, client),
background_cancel: createBackgroundCancel(manager, client),
}
export function createBackgroundTools(): Record<string, ToolDefinition> {
return {}
}
export const builtinTools: Record<string, ToolDefinition> = {