feat: 完成管理端聊天工作台收口

- 新增管理端聊天工作台与会话级额外知识库持久化

- 补齐发布态聊天、历史会话只读判断与答案版本切换

- 新增 chat_round 热数据与主线消息读取支撑
This commit is contained in:
2026-05-14 20:22:46 +08:00
parent 2ad8935a61
commit 47c2bad839
63 changed files with 8609 additions and 136 deletions

View File

@@ -2,14 +2,31 @@ type ChatTimeTimelineRole = 'assistant' | 'tool' | 'user';
type ChatTimeToolStatus = 'TOOL_CALL' | 'TOOL_RESULT';
type ChatTimeThinkingStatus = 'end' | 'thinking';
interface ChatTimeRoundMeta {
messageKind?: string;
roundId?: number | string;
roundNo?: number;
selectedVariantIndex?: number;
switchable?: boolean;
variantCount?: number;
variantIndex?: number;
}
interface ChatTimeTimelineItemBase {
created: number | string;
id: string;
loading?: boolean;
messageKind?: string;
placement: 'end' | 'start';
roundId?: string;
roundNo?: number;
role: ChatTimeTimelineRole;
selectedVariantIndex?: number;
senderName?: string;
switchable?: boolean;
typing?: boolean;
variantCount?: number;
variantIndex?: number;
}
interface ChatTimeAssistantThinkingSegment {
@@ -66,14 +83,22 @@ interface ChatTimeHistoryRecord {
loading?: boolean;
placement?: 'end' | 'start';
role?: string;
roundId?: number | string;
roundNo?: number;
selectedVariantIndex?: number;
senderName?: string;
senderRole?: string;
switchable?: boolean;
typing?: boolean;
variantCount?: number;
variantIndex?: number;
messageKind?: string;
}
interface ChatTimeToolMutationPayload {
interface ChatTimeToolMutationPayload extends ChatTimeRoundMeta {
created?: number | string;
name?: string;
regenerate?: boolean;
result?: any;
toolCallId?: string;
value?: any;
@@ -85,6 +110,7 @@ export type {
ChatTimeAssistantTextSegment,
ChatTimeAssistantThinkingSegment,
ChatTimeHistoryRecord,
ChatTimeRoundMeta,
ChatTimeThinkingStatus,
ChatTimeTimelineItem,
ChatTimeTimelineItemBase,