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:
@@ -196,13 +196,11 @@ export function createBackgroundCancel(manager: BackgroundManager, client: Openc
|
||||
Only running tasks can be cancelled.`
|
||||
}
|
||||
|
||||
const abortResult = await client.session.abort({
|
||||
// Fire-and-forget: abort 요청을 보내고 await 하지 않음
|
||||
// await 하면 메인 세션까지 abort 되는 문제 발생
|
||||
client.session.abort({
|
||||
path: { id: task.sessionID },
|
||||
})
|
||||
|
||||
if (abortResult.error) {
|
||||
return `❌ Failed to abort session: ${(abortResult.error as any).message || String(abortResult.error)}`
|
||||
}
|
||||
}).catch(() => {})
|
||||
|
||||
task.status = "cancelled"
|
||||
task.completedAt = new Date()
|
||||
|
||||
Reference in New Issue
Block a user