fix(background-agent): use promptAsync to avoid response parsing errors
session.prompt() fails due to response Zod validation. promptAsync is fire-and-forget, no response parsing. 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
@@ -244,7 +244,7 @@ export class BackgroundManager {
|
||||
|
||||
setTimeout(async () => {
|
||||
try {
|
||||
await this.client.session.prompt({
|
||||
await this.client.session.promptAsync({
|
||||
path: { id: mainSessionID },
|
||||
body: {
|
||||
parts: [{ type: "text", text: message }],
|
||||
@@ -252,9 +252,9 @@ export class BackgroundManager {
|
||||
query: { directory: this.directory },
|
||||
})
|
||||
this.clearNotificationsForTask(task.id)
|
||||
log("[background-agent] Successfully sent to main session")
|
||||
log("[background-agent] Successfully sent promptAsync to main session")
|
||||
} catch (error) {
|
||||
log("[background-agent] session.prompt failed:", String(error))
|
||||
log("[background-agent] promptAsync failed:", String(error))
|
||||
}
|
||||
}, 200)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user