mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-06-13 09:42:02 +08:00
feat(chat): unify session gateway with stable IDs and a single WS protocol
The frontend previously juggled placeholder IDs, provider-native IDs, and session_created handoffs, which caused race conditions and provider-specific branching. This introduces app-allocated session IDs, a chat run registry with event replay, delta sidebar updates, and one kind-based websocket contract so the UI can treat every provider the same while JSONL remains the source of truth.
This commit is contained in:
@@ -70,32 +70,10 @@ export interface Project {
|
||||
}
|
||||
|
||||
export interface LoadingProgress {
|
||||
type?: 'loading_progress';
|
||||
kind?: 'loading_progress';
|
||||
phase?: string;
|
||||
current: number;
|
||||
total: number;
|
||||
currentProject?: string;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export interface ProjectsUpdatedMessage {
|
||||
type: 'projects_updated';
|
||||
projects: Project[];
|
||||
updatedSessionId?: string;
|
||||
updatedSessionIds?: string[];
|
||||
watchProvider?: LLMProvider;
|
||||
watchProviders?: LLMProvider[];
|
||||
changeType?: 'add' | 'change';
|
||||
changeTypes?: Array<'add' | 'change'>;
|
||||
batched?: boolean;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export interface LoadingProgressMessage extends LoadingProgress {
|
||||
type: 'loading_progress';
|
||||
}
|
||||
|
||||
export type AppSocketMessage =
|
||||
| LoadingProgressMessage
|
||||
| ProjectsUpdatedMessage
|
||||
| { type?: string;[key: string]: unknown };
|
||||
|
||||
Reference in New Issue
Block a user