fix(session-recovery): improve error detection and add continue prompt
- Enhance error type detection for thinking block order issues - Add continue prompt after successful session recovery - Improve error message matching logic
This commit is contained in:
10
src/index.ts
10
src/index.ts
@@ -136,7 +136,15 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
|
||||
sessionID,
|
||||
error,
|
||||
}
|
||||
await sessionRecovery.handleSessionRecovery(messageInfo)
|
||||
const recovered = await sessionRecovery.handleSessionRecovery(messageInfo)
|
||||
|
||||
if (recovered && sessionID && sessionID === mainSessionID) {
|
||||
await ctx.client.session.prompt({
|
||||
path: { id: sessionID },
|
||||
body: { parts: [{ type: "text", text: "continue" }] },
|
||||
query: { directory: ctx.directory },
|
||||
}).catch(() => {})
|
||||
}
|
||||
}
|
||||
|
||||
if (sessionID && sessionID === mainSessionID) {
|
||||
|
||||
Reference in New Issue
Block a user