合并 AI 设计多会话客户端
整合 Enter 发送与多会话交互,保留服务端持久 Conversation Session,并补齐迁移、回归、Electron E2E 与 canonical 文档。
This commit is contained in:
@@ -47,14 +47,28 @@ export type DesignMessage = {
|
||||
export type DesignWorkspaceSummary = {
|
||||
workspaceId: string;
|
||||
title: string;
|
||||
turnRevision: number;
|
||||
viewRevision: number;
|
||||
conversationCount: number;
|
||||
phase: DesignWorkspacePhase;
|
||||
brief: DesignBrief;
|
||||
updatedAt: string;
|
||||
};
|
||||
|
||||
export type DesignWorkspace = DesignWorkspaceSummary & {
|
||||
conversations: DesignConversationSummary[];
|
||||
};
|
||||
|
||||
export type DesignConversationSummary = {
|
||||
conversationId: string;
|
||||
workspaceId: string;
|
||||
title: string;
|
||||
turnRevision: number;
|
||||
phase: DesignWorkspacePhase;
|
||||
brief: DesignBrief;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
};
|
||||
|
||||
export type DesignConversation = DesignConversationSummary & {
|
||||
messages: DesignMessage[];
|
||||
};
|
||||
|
||||
@@ -86,6 +100,7 @@ export type DesignAssetUploadInput = {
|
||||
export type DesignGenerationTask = {
|
||||
taskId: string;
|
||||
workspaceId: string;
|
||||
conversationId: string | null;
|
||||
medium: DesignMedium;
|
||||
status: DesignTaskStatus;
|
||||
briefVersion: number;
|
||||
@@ -106,12 +121,13 @@ export type DesignGenerationTaskUpdatedEvent = {
|
||||
generationTask: DesignGenerationTask;
|
||||
};
|
||||
|
||||
export type DesignGenerationTasksSnapshotEvent = {
|
||||
export type DesignConversationSnapshotEvent = {
|
||||
id: string;
|
||||
type: 'design.generation_tasks.snapshot';
|
||||
type: 'design.conversation.snapshot';
|
||||
workspaceId: string;
|
||||
conversationId: string;
|
||||
workspaceViewRevision: number;
|
||||
workspace: DesignWorkspace;
|
||||
conversation: DesignConversation;
|
||||
generationTasks: DesignGenerationTask[];
|
||||
};
|
||||
|
||||
@@ -119,6 +135,7 @@ export type DesignAssistantDeltaEvent = {
|
||||
id: string;
|
||||
type: 'design.assistant.delta';
|
||||
workspaceId: string;
|
||||
conversationId: string;
|
||||
clientTurnId: string;
|
||||
turnRevision: number;
|
||||
chunkIndex: number;
|
||||
@@ -127,7 +144,7 @@ export type DesignAssistantDeltaEvent = {
|
||||
|
||||
export type DesignWorkspaceEvent =
|
||||
| DesignGenerationTaskUpdatedEvent
|
||||
| DesignGenerationTasksSnapshotEvent
|
||||
| DesignConversationSnapshotEvent
|
||||
| DesignAssistantDeltaEvent;
|
||||
|
||||
export type DesignWorkspaceBootstrap = {
|
||||
@@ -140,6 +157,12 @@ export type DesignCreateWorkspaceInput = {
|
||||
title: string;
|
||||
};
|
||||
|
||||
export type DesignCreateConversationInput = {
|
||||
workspaceId: string;
|
||||
clientConversationId: string;
|
||||
title: string;
|
||||
};
|
||||
|
||||
export type DesignRenameWorkspaceInput = {
|
||||
workspaceId: string;
|
||||
title: string;
|
||||
@@ -147,6 +170,7 @@ export type DesignRenameWorkspaceInput = {
|
||||
|
||||
export type DesignSubmitMessageInput = {
|
||||
workspaceId: string;
|
||||
conversationId: string;
|
||||
clientTurnId: string;
|
||||
expectedTurnRevision: number;
|
||||
message: string;
|
||||
@@ -155,6 +179,7 @@ export type DesignSubmitMessageInput = {
|
||||
|
||||
export type DesignConfirmGenerationInput = {
|
||||
workspaceId: string;
|
||||
conversationId: string;
|
||||
clientTurnId: string;
|
||||
expectedTurnRevision: number;
|
||||
quoteId: string;
|
||||
|
||||
Reference in New Issue
Block a user