@marketrix.ai/widget 3.8.462 → 3.8.464
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -26,7 +26,15 @@ type ProgressStatus = 'in_progress' | 'completed' | 'failed';
|
|
|
26
26
|
export declare function reduceToolProgress(state: SseState, browserToolName: string, explanation: string, status: ProgressStatus, currentMode: InstructionType, error?: string): SseState;
|
|
27
27
|
export declare function reduceToolDone(state: SseState, currentMode: InstructionType): SseState;
|
|
28
28
|
export declare function reduceStop(state: SseState, currentMode: InstructionType): SseState;
|
|
29
|
+
declare const TASK_STATUS: {
|
|
30
|
+
readonly completed: "done";
|
|
31
|
+
readonly failed: "failed";
|
|
32
|
+
readonly stopped: "stopped";
|
|
33
|
+
};
|
|
34
|
+
export declare const isTerminalTaskStatus: (status: string) => status is keyof typeof TASK_STATUS;
|
|
29
35
|
/** Settles a pending message into a plain error bubble — the one shape for both a failed POST and a chat/error. */
|
|
30
36
|
export declare function reduceError(state: SseState, messageId: string, text: string): SseState;
|
|
37
|
+
/** The transport gave up, so no id-bearing event is coming for whatever is still pending. */
|
|
38
|
+
export declare function reduceTransportFailure(state: SseState, text: string): SseState;
|
|
31
39
|
export declare function reduceSse(state: SseState, event: WidgetEvent, currentMode: InstructionType): ReduceResult;
|
|
32
40
|
export {};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { type WidgetCommand, type WidgetEvent } from '../sdk';
|
|
2
2
|
export type StreamStatus = 'disconnected' | 'connecting' | 'connected' | 'registered' | 'error';
|
|
3
|
+
/** The stream has stopped retrying, so nothing further will arrive for anything still in flight. */
|
|
4
|
+
export declare class StreamGaveUpError extends Error {
|
|
5
|
+
}
|
|
3
6
|
export interface StreamClientCallbacks {
|
|
4
7
|
onMessage?: (event: WidgetEvent) => void;
|
|
5
8
|
onError?: (error: Error) => void;
|