Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

types.ts

57 lines1.8 KB

1import type {
2 ChatImageAttachment as ContractChatImageAttachment,
3 OrchestrationCheckpointFile,
4 OrchestrationCheckpointSummary,
5 OrchestrationLatestTurn,
6 OrchestrationMessage,
7 OrchestrationProposedPlan,
8 OrchestrationSession,
9 ProjectScript as ContractProjectScript,
10 ProviderInteractionMode,
11 RuntimeMode,
12} from "@t3tools/contracts";
13import type {
14 EnvironmentProject,
15 EnvironmentThread,
16 EnvironmentThreadShell,
17} from "@t3tools/client-runtime/state/shell";
18​
19export type SessionPhase = "disconnected" | "connecting" | "ready" | "running";
20export const DEFAULT_RUNTIME_MODE: RuntimeMode = "full-access";
21​
22export const DEFAULT_INTERACTION_MODE: ProviderInteractionMode = "default";
23export const DEFAULT_THREAD_TERMINAL_HEIGHT = 280;
24export const DEFAULT_THREAD_TERMINAL_ID = "term-1";
25export const MAX_TERMINALS_PER_GROUP = 4;
26export type ProjectScript = ContractProjectScript;
27​
28export interface ThreadTerminalGroup {
29 id: string;
30 terminalIds: string[];
31 splitDirection?: "horizontal" | "vertical";
33​
34export interface ChatImageAttachment extends ContractChatImageAttachment {
35 readonly previewUrl?: string;
37​
38export type ChatAttachment = ChatImageAttachment;
39​
40export interface ChatMessage extends Omit<OrchestrationMessage, "attachments"> {
41 readonly attachments?: ReadonlyArray<ChatAttachment> | undefined;
43​
44export type ProposedPlan = OrchestrationProposedPlan;
45export type TurnDiffFileChange = OrchestrationCheckpointFile;
46export type TurnDiffSummary = OrchestrationCheckpointSummary;
47​
48export type Project = EnvironmentProject;
49export type Thread = EnvironmentThread;
50export type ThreadShell = EnvironmentThreadShell;
51​
52export interface ThreadTurnState {
53 latestTurn: OrchestrationLatestTurn | null;
55​
56export type SidebarThreadSummary = EnvironmentThreadShell;
57export type ThreadSession = OrchestrationSession;