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
+10 -1
View File
@@ -25,6 +25,15 @@ type BabysitterContext = {
}
query?: { directory?: string }
}) => Promise<unknown>
promptAsync: (args: {
path: { id: string }
body: {
parts: Array<{ type: "text"; text: string }>
agent?: string
model?: { providerID: string; modelID: string }
}
query?: { directory?: string }
}) => Promise<unknown>
}
}
}
@@ -218,7 +227,7 @@ export function createUnstableAgentBabysitterHook(ctx: BabysitterContext, option
const { agent, model } = await resolveMainSessionTarget(ctx, mainSessionID)
try {
await ctx.client.session.prompt({
await ctx.client.session.promptAsync({
path: { id: mainSessionID },
body: {
...(agent ? { agent } : {}),