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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user