feat(coding): add renderer conversation store
This commit is contained in:
77
src/types/coding-conversation.ts
Normal file
77
src/types/coding-conversation.ts
Normal file
@@ -0,0 +1,77 @@
|
||||
export type {
|
||||
CodingRuntimePublicError,
|
||||
ConversationMessageNode,
|
||||
ConversationModelState,
|
||||
ConversationNode,
|
||||
ConversationPatch,
|
||||
ConversationPatchEnvelope,
|
||||
ConversationQueueState,
|
||||
ConversationRunState,
|
||||
ConversationRunStatus,
|
||||
ConversationSnapshot,
|
||||
ConversationThinkingLevel,
|
||||
ProductModelRef,
|
||||
PromptAcceptance,
|
||||
PromptMode,
|
||||
PublicWorkerState,
|
||||
} from '../../shared/coding-conversation-contracts';
|
||||
|
||||
import type {
|
||||
ConversationPatchEnvelope,
|
||||
ConversationSnapshot,
|
||||
PromptMode,
|
||||
} from '../../shared/coding-conversation-contracts';
|
||||
|
||||
export interface CodingConversationSnapshotEvent {
|
||||
type: 'snapshot';
|
||||
conversationId: string;
|
||||
workerGeneration: number;
|
||||
seq: number;
|
||||
snapshot: ConversationSnapshot;
|
||||
}
|
||||
|
||||
export type CodingConversationPatchEvent = {
|
||||
type: 'patch';
|
||||
} & ConversationPatchEnvelope;
|
||||
|
||||
export type CodingConversationStreamEvent =
|
||||
| CodingConversationSnapshotEvent
|
||||
| CodingConversationPatchEvent;
|
||||
|
||||
export interface CodingDraftAttachment {
|
||||
attachmentId: string;
|
||||
mime: string;
|
||||
previewUrl?: string;
|
||||
}
|
||||
|
||||
export interface CodingConversationDraft {
|
||||
text: string;
|
||||
attachments: CodingDraftAttachment[];
|
||||
revision: number;
|
||||
}
|
||||
|
||||
export type CodingPromptRequestStatus =
|
||||
| 'pending'
|
||||
| 'accepted'
|
||||
| 'rejected'
|
||||
| 'uncertain';
|
||||
|
||||
export interface CodingPromptRequestState {
|
||||
clientRequestId: string;
|
||||
mode: PromptMode;
|
||||
nodeId?: string;
|
||||
status: CodingPromptRequestStatus;
|
||||
submittedDraft: CodingConversationDraft;
|
||||
errorCode?: string;
|
||||
errorMessage?: string;
|
||||
}
|
||||
|
||||
export interface CodingConversationSummary {
|
||||
conversationId: string;
|
||||
title: string;
|
||||
runStatus: ConversationSnapshot['run']['status'];
|
||||
runError: ConversationSnapshot['run']['error'] | null;
|
||||
workerStatus: ConversationSnapshot['worker']['status'];
|
||||
model: ConversationSnapshot['conversation']['model'];
|
||||
unread: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user