storkit: merge 429_story_interactive_project_setup_wizard_for_new_storkit_projects
This commit is contained in:
@@ -21,6 +21,19 @@ export type WsRequest =
|
||||
config: ProviderConfig;
|
||||
};
|
||||
|
||||
export interface WizardStepInfo {
|
||||
step: string;
|
||||
label: string;
|
||||
status: string;
|
||||
content?: string;
|
||||
}
|
||||
|
||||
export interface WizardStateData {
|
||||
steps: WizardStepInfo[];
|
||||
current_step_index: number;
|
||||
completed: boolean;
|
||||
}
|
||||
|
||||
export interface AgentAssignment {
|
||||
agent_name: string;
|
||||
model: string | null;
|
||||
@@ -80,6 +93,13 @@ export type WsResponse =
|
||||
| { type: "pong" }
|
||||
/** Sent on connect when the project still needs onboarding (specs are placeholders). */
|
||||
| { type: "onboarding_status"; needs_onboarding: boolean }
|
||||
/** Sent on connect when a setup wizard is active. */
|
||||
| {
|
||||
type: "wizard_state";
|
||||
steps: WizardStepInfo[];
|
||||
current_step_index: number;
|
||||
completed: boolean;
|
||||
}
|
||||
/** Streaming thinking token from an extended-thinking block, separate from regular text. */
|
||||
| { type: "thinking_token"; content: string }
|
||||
/** Streaming token from a /btw side question response. */
|
||||
@@ -438,6 +458,7 @@ export class ChatWebSocket {
|
||||
private onAgentConfigChanged?: () => void;
|
||||
private onAgentStateChanged?: () => void;
|
||||
private onOnboardingStatus?: (needsOnboarding: boolean) => void;
|
||||
private onWizardState?: (state: WizardStateData) => void;
|
||||
private onSideQuestionToken?: (content: string) => void;
|
||||
private onSideQuestionDone?: (response: string) => void;
|
||||
private onLogEntry?: (
|
||||
@@ -528,6 +549,12 @@ export class ChatWebSocket {
|
||||
if (data.type === "agent_state_changed") this.onAgentStateChanged?.();
|
||||
if (data.type === "onboarding_status")
|
||||
this.onOnboardingStatus?.(data.needs_onboarding);
|
||||
if (data.type === "wizard_state")
|
||||
this.onWizardState?.({
|
||||
steps: data.steps,
|
||||
current_step_index: data.current_step_index,
|
||||
completed: data.completed,
|
||||
});
|
||||
if (data.type === "side_question_token")
|
||||
this.onSideQuestionToken?.(data.content);
|
||||
if (data.type === "side_question_done")
|
||||
@@ -587,6 +614,7 @@ export class ChatWebSocket {
|
||||
onAgentConfigChanged?: () => void;
|
||||
onAgentStateChanged?: () => void;
|
||||
onOnboardingStatus?: (needsOnboarding: boolean) => void;
|
||||
onWizardState?: (state: WizardStateData) => void;
|
||||
onSideQuestionToken?: (content: string) => void;
|
||||
onSideQuestionDone?: (response: string) => void;
|
||||
onLogEntry?: (timestamp: string, level: string, message: string) => void;
|
||||
@@ -606,6 +634,7 @@ export class ChatWebSocket {
|
||||
this.onAgentConfigChanged = handlers.onAgentConfigChanged;
|
||||
this.onAgentStateChanged = handlers.onAgentStateChanged;
|
||||
this.onOnboardingStatus = handlers.onOnboardingStatus;
|
||||
this.onWizardState = handlers.onWizardState;
|
||||
this.onSideQuestionToken = handlers.onSideQuestionToken;
|
||||
this.onSideQuestionDone = handlers.onSideQuestionDone;
|
||||
this.onLogEntry = handlers.onLogEntry;
|
||||
|
||||
Reference in New Issue
Block a user