feat: add independent conversation branching

Local conversations can now continue in a new branch after stable content is persisted. Each branch uses new conversation and message IDs, keeps its source visible, and remains independent without copying Tasks, queue items, runs, memories, or artifact ownership.

Conversation Task rows are also denser, align status markers at the right edge, and use an accessible checked success marker without redundant completion text.

Release note: 本地会话现在可从“在新会话中继续”创建独立分支并显示来源;Task 子项布局更紧凑,状态统一显示在右侧。
This commit is contained in:
mesalogo
2026-08-20 17:13:57 +08:00
parent 65c3ab9ab0
commit aa339a73d6
25 changed files with 1392 additions and 67 deletions
+19
View File
@@ -346,6 +346,24 @@ export type ConversationContextCompressionState = z.infer<
typeof conversationContextCompressionStateSchema
>
export const conversationBranchInputSchema = z
.object({
sourceConversationId: assistantIdSchema,
title: z.string().trim().min(1).max(200)
})
.strict()
export type ConversationBranchInput = z.infer<
typeof conversationBranchInputSchema
>
export const conversationBranchSchema = z
.object({
sourceConversationId: assistantIdSchema,
sourceTitle: z.string().trim().min(1).max(200)
})
.strict()
export const conversationSnapshotSchema = z
.object({
id: assistantIdSchema,
@@ -363,6 +381,7 @@ export const conversationSnapshotSchema = z
})
.strict()
.optional(),
branch: conversationBranchSchema.optional(),
title: z.string().trim().min(1).max(200),
updatedAt: z.number().int().nonnegative(),
messages: z