fix(hooks): switch session.prompt to promptAsync in all hooks

This commit is contained in:
Peïo Thibault
2026-02-07 13:42:24 +01:00
parent 5f21ddf473
commit 46e02b9457
8 changed files with 190 additions and 44 deletions
+14 -14
View File
@@ -211,20 +211,20 @@ export async function executeSyncContinuation(
: undefined
}
await client.session.prompt({
path: { id: args.session_id! },
body: {
...(resumeAgent !== undefined ? { agent: resumeAgent } : {}),
...(resumeModel !== undefined ? { model: resumeModel } : {}),
tools: {
...(resumeAgent ? getAgentToolRestrictions(resumeAgent) : {}),
task: false,
call_omo_agent: true,
question: false,
},
parts: [{ type: "text", text: args.prompt }],
},
})
await client.session.promptAsync({
path: { id: args.session_id! },
body: {
...(resumeAgent !== undefined ? { agent: resumeAgent } : {}),
...(resumeModel !== undefined ? { model: resumeModel } : {}),
tools: {
...(resumeAgent ? getAgentToolRestrictions(resumeAgent) : {}),
task: false,
call_omo_agent: true,
question: false,
},
parts: [{ type: "text", text: args.prompt }],
},
})
} catch (promptError) {
if (toastManager) {
toastManager.removeTask(taskId)