refactor(omo-task): rename to call_omo_agent with run_in_background parameter
- Rename omo-task to call-omo-agent with mandatory run_in_background parameter - Implement background mode using BackgroundManager (fire-and-forget abort) - Implement sync mode with existing subagent logic - Fix background_cancel: use fire-and-forget abort to prevent parent session interruption - Add call_omo_agent to tool disable list in explore/librarian agents - Add call_omo_agent to tool disable list in BackgroundManager 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
10
src/index.ts
10
src/index.ts
@@ -37,7 +37,7 @@ import {
|
||||
getCurrentSessionTitle,
|
||||
} from "./features/claude-code-session-state";
|
||||
import { updateTerminalTitle } from "./features/terminal";
|
||||
import { builtinTools, createOmoTask, createBackgroundTools } from "./tools";
|
||||
import { builtinTools, createCallOmoAgent, createBackgroundTools } from "./tools";
|
||||
import { BackgroundManager } from "./features/background-agent";
|
||||
import { createBuiltinMcps } from "./mcp";
|
||||
import { OhMyOpenCodeConfigSchema, type OhMyOpenCodeConfig } from "./config";
|
||||
@@ -169,13 +169,13 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
|
||||
const backgroundNotificationHook = createBackgroundNotificationHook(backgroundManager);
|
||||
const backgroundTools = createBackgroundTools(backgroundManager, ctx.client);
|
||||
|
||||
const omoTask = createOmoTask(ctx);
|
||||
const callOmoAgent = createCallOmoAgent(ctx, backgroundManager);
|
||||
|
||||
return {
|
||||
tool: {
|
||||
...builtinTools,
|
||||
...backgroundTools,
|
||||
omo_task: omoTask,
|
||||
call_omo_agent: callOmoAgent,
|
||||
},
|
||||
|
||||
"chat.message": async (input, output) => {
|
||||
@@ -205,13 +205,13 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
|
||||
if (config.agent.explore) {
|
||||
config.agent.explore.tools = {
|
||||
...config.agent.explore.tools,
|
||||
omo_task: false,
|
||||
call_omo_agent: false,
|
||||
};
|
||||
}
|
||||
if (config.agent.librarian) {
|
||||
config.agent.librarian.tools = {
|
||||
...config.agent.librarian.tools,
|
||||
omo_task: false,
|
||||
call_omo_agent: false,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user