fix: preserve complete remote tool details

Managed SSH Runtime events could complete successfully and then fail local conversation persistence when tool details exceeded a second, smaller renderer-to-Main schema limit. Conversation persistence now stores the complete tool details already accepted from the Runtime, so long remote results no longer leave the final assistant message stuck in a streaming state.

Release note: 修复远程项目工具结果较长时会话持久化失败的问题;Runtime 已返回的工具详情现在会完整保存到本地会话。
This commit is contained in:
mesalogo
2026-08-30 09:29:28 +08:00
parent 29639ff516
commit 0804f5ccd2
5 changed files with 75 additions and 7 deletions
+6 -6
View File
@@ -133,8 +133,8 @@ export type ConversationQueueItem = z.infer<
export const conversationToolActivitySchema = z
.object({
callId: z.string().max(256).optional(),
name: z.string().max(200),
callId: z.string().optional(),
name: z.string(),
state: z.enum([
'pending',
'running',
@@ -144,10 +144,10 @@ export const conversationToolActivitySchema = z
'cancelled',
'interrupted'
]),
summary: z.string().max(2_000),
input: z.string().max(4_000).optional(),
output: z.string().max(16_000).optional(),
error: z.string().max(2_000).optional()
summary: z.string(),
input: z.string().optional(),
output: z.string().optional(),
error: z.string().optional()
})
.strict()