refactor(background-task): remove session_id parameter, use toolContext

Session ID is now automatically detected from toolContext.sessionID

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
YeonGyu-Kim
2025-12-11 17:31:44 +09:00
parent 24a7f333a2
commit e140dc74c6
2 changed files with 2 additions and 4 deletions

View File

@@ -27,7 +27,6 @@ export function createBackgroundTask(manager: BackgroundManager) {
description: tool.schema.string().describe("Short task description (shown in status)"),
prompt: tool.schema.string().describe("Full detailed prompt for the agent"),
agent: tool.schema.string().describe("Agent type to use (any agent allowed)"),
session_id: tool.schema.string().describe("Parent session ID (auto-detected if omitted)").optional(),
},
async execute(args: BackgroundTaskArgs, toolContext) {
try {
@@ -35,8 +34,8 @@ export function createBackgroundTask(manager: BackgroundManager) {
description: args.description,
prompt: args.prompt,
agent: args.agent,
parentSessionID: args.session_id ?? toolContext.sessionID,
parentMessageID: toolContext.messageID ?? "unknown",
parentSessionID: toolContext.sessionID,
parentMessageID: toolContext.messageID,
})
return `✅ Background task launched successfully!

View File

@@ -2,7 +2,6 @@ export interface BackgroundTaskArgs {
description: string
prompt: string
agent: string
session_id?: string
}
export interface BackgroundStatusArgs {