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 49b979b6b7
commit ed563d3cc9
8 changed files with 190 additions and 44 deletions
+2 -2
View File
@@ -75,7 +75,7 @@ function extractResumeConfig(userMessage: MessageData | undefined, sessionID: st
async function resumeSession(client: Client, config: ResumeConfig): Promise<boolean> {
try {
await client.session.prompt({
await client.session.promptAsync({
path: { id: config.sessionID },
body: {
parts: [{ type: "text", text: RECOVERY_RESUME_TEXT }],
@@ -185,7 +185,7 @@ async function recoverToolResultMissing(
}))
try {
await client.session.prompt({
await client.session.promptAsync({
path: { id: sessionID },
// @ts-expect-error - SDK types may not include tool_result parts
body: { parts: toolResultParts },