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:
+3
-14
@@ -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> = {
|
||||
|
||||
Reference in New Issue
Block a user