@admin-layout/demo-perplexity-browser 12.2.4-alpha.4 → 12.2.4-alpha.40
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.
- package/lib/state/chatMachine.d.ts +24 -430
- package/lib/state/chatMachine.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -106,221 +106,18 @@ export declare function createChatMachine(platformServices?: IPlatformServices):
|
|
|
106
106
|
src: "sendToAI";
|
|
107
107
|
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
108
108
|
id: string;
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
readonly context: ({ input }: {
|
|
122
|
-
spawn: {
|
|
123
|
-
<TSrc extends "sendToAI">(logic: TSrc, ...[options]: {
|
|
124
|
-
src: "sendToAI";
|
|
125
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
126
|
-
id: string;
|
|
127
|
-
} extends infer T ? T extends {
|
|
128
|
-
src: "sendToAI";
|
|
129
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
130
|
-
id: string;
|
|
131
|
-
} ? T extends {
|
|
132
|
-
src: TSrc;
|
|
133
|
-
} ? import("xstate").ConditionalRequired<[options?: {
|
|
134
|
-
id?: T["id"];
|
|
135
|
-
systemId?: string;
|
|
136
|
-
input?: import("xstate").InputFrom<T["logic"]>;
|
|
137
|
-
syncSnapshot?: boolean;
|
|
138
|
-
} & { [K in import("xstate").RequiredActorOptions<T>]: unknown; }], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T>>> : never : never : never): import("xstate").ActorRefFromLogic<import("xstate").GetConcreteByKey<{
|
|
139
|
-
src: "sendToAI";
|
|
140
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
141
|
-
id: string;
|
|
142
|
-
}, "src", TSrc>["logic"]>;
|
|
143
|
-
<TLogic extends import("xstate").AnyActorLogic>(src: TLogic, ...[options]: import("xstate").ConditionalRequired<[options?: {
|
|
144
|
-
id?: never;
|
|
145
|
-
systemId?: string;
|
|
146
|
-
input?: import("xstate").InputFrom<TLogic>;
|
|
147
|
-
syncSnapshot?: boolean;
|
|
148
|
-
} & { [K in import("xstate").RequiredLogicInput<TLogic>]: unknown; }], import("xstate").IsNotNever<import("xstate").RequiredLogicInput<TLogic>>>): import("xstate").ActorRefFromLogic<TLogic>;
|
|
149
|
-
};
|
|
150
|
-
input: ChatInput;
|
|
151
|
-
self: import("xstate").ActorRef<import("xstate").MachineSnapshot<ChatContext, ChatEvent, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, ChatEvent, import("xstate").AnyEventObject>;
|
|
152
|
-
}) => {
|
|
153
|
-
storageService: IStorageService;
|
|
154
|
-
systemPrompt: string;
|
|
155
|
-
screenshot: any;
|
|
156
|
-
attachedFiles: any[];
|
|
157
|
-
messages: any[];
|
|
158
|
-
response: string;
|
|
159
|
-
isStreaming: false;
|
|
160
|
-
error: any;
|
|
161
|
-
};
|
|
162
|
-
readonly states: {
|
|
163
|
-
readonly idle: {
|
|
164
|
-
readonly on: {
|
|
165
|
-
readonly LOAD_MESSAGES: {
|
|
166
|
-
readonly actions: import("xstate").ActionFunction<ChatContext, {
|
|
167
|
-
type: "LOAD_MESSAGES";
|
|
168
|
-
messages: Message[];
|
|
169
|
-
}, ChatEvent, undefined, {
|
|
170
|
-
src: "sendToAI";
|
|
171
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
172
|
-
id: string;
|
|
173
|
-
}, never, never, never, never>;
|
|
174
|
-
};
|
|
175
|
-
readonly INPUT_SYSTEMPROMPT: {
|
|
176
|
-
readonly actions: import("xstate").ActionFunction<ChatContext, {
|
|
177
|
-
type: "INPUT_SYSTEMPROMPT";
|
|
178
|
-
value: string;
|
|
179
|
-
}, ChatEvent, undefined, {
|
|
180
|
-
src: "sendToAI";
|
|
181
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
182
|
-
id: string;
|
|
183
|
-
}, never, never, never, never>;
|
|
184
|
-
};
|
|
185
|
-
readonly INPUT_SCREENSHOT: {
|
|
186
|
-
readonly actions: import("xstate").ActionFunction<ChatContext, {
|
|
187
|
-
type: "INPUT_SCREENSHOT";
|
|
188
|
-
value: string | null;
|
|
189
|
-
}, ChatEvent, undefined, {
|
|
190
|
-
src: "sendToAI";
|
|
191
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
192
|
-
id: string;
|
|
193
|
-
}, never, never, never, never>;
|
|
194
|
-
};
|
|
195
|
-
readonly SCREENSHOT_CAPTURED: {
|
|
196
|
-
readonly actions: import("xstate").ActionFunction<ChatContext, {
|
|
197
|
-
type: "SCREENSHOT_CAPTURED";
|
|
198
|
-
base64: string;
|
|
199
|
-
dataUrl: string;
|
|
200
|
-
}, ChatEvent, undefined, {
|
|
201
|
-
src: "sendToAI";
|
|
202
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
203
|
-
id: string;
|
|
204
|
-
}, never, never, never, never>;
|
|
205
|
-
};
|
|
206
|
-
readonly INPUT_FILES: {
|
|
207
|
-
readonly actions: import("xstate").ActionFunction<ChatContext, {
|
|
208
|
-
type: "INPUT_FILES";
|
|
209
|
-
value: AttachedFile[];
|
|
210
|
-
}, ChatEvent, undefined, {
|
|
211
|
-
src: "sendToAI";
|
|
212
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
213
|
-
id: string;
|
|
214
|
-
}, never, never, never, never>;
|
|
215
|
-
};
|
|
216
|
-
readonly SEND_MESSAGE: {
|
|
217
|
-
readonly target: "sending";
|
|
218
|
-
readonly actions: import("xstate").ActionFunction<ChatContext, {
|
|
219
|
-
type: "SEND_MESSAGE";
|
|
220
|
-
content: string;
|
|
221
|
-
attachments?: MessageAttachment[];
|
|
222
|
-
}, ChatEvent, undefined, {
|
|
223
|
-
src: "sendToAI";
|
|
224
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
225
|
-
id: string;
|
|
226
|
-
}, never, never, never, never>;
|
|
227
|
-
};
|
|
228
|
-
readonly CLEAR_MESSAGES: {
|
|
229
|
-
readonly actions: readonly [import("xstate").ActionFunction<ChatContext, {
|
|
230
|
-
type: "CLEAR_MESSAGES";
|
|
231
|
-
}, ChatEvent, undefined, {
|
|
232
|
-
src: "sendToAI";
|
|
233
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
234
|
-
id: string;
|
|
235
|
-
}, never, never, never, never>, "clearStoredChat"];
|
|
236
|
-
};
|
|
237
|
-
readonly CLEAR_ATTACHMENTS: {
|
|
238
|
-
readonly actions: import("xstate").ActionFunction<ChatContext, {
|
|
239
|
-
type: "CLEAR_ATTACHMENTS";
|
|
240
|
-
}, ChatEvent, undefined, {
|
|
241
|
-
src: "sendToAI";
|
|
242
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
243
|
-
id: string;
|
|
244
|
-
}, never, never, never, never>;
|
|
245
|
-
};
|
|
246
|
-
};
|
|
247
|
-
};
|
|
248
|
-
readonly sending: {
|
|
249
|
-
readonly entry: import("xstate").ActionFunction<ChatContext, ChatEvent, ChatEvent, undefined, {
|
|
250
|
-
src: "sendToAI";
|
|
251
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
252
|
-
id: string;
|
|
253
|
-
}, never, never, never, never>;
|
|
254
|
-
readonly invoke: {
|
|
255
|
-
readonly src: "sendToAI";
|
|
256
|
-
readonly input: ({ context }: {
|
|
257
|
-
context: ChatContext;
|
|
258
|
-
event: ChatEvent;
|
|
259
|
-
self: import("xstate").ActorRef<import("xstate").MachineSnapshot<ChatContext, ChatEvent, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, ChatEvent, import("xstate").AnyEventObject>;
|
|
260
|
-
}) => ChatContext;
|
|
261
|
-
};
|
|
262
|
-
readonly on: {
|
|
263
|
-
readonly STREAM_CHUNK: {
|
|
264
|
-
readonly actions: import("xstate").ActionFunction<ChatContext, {
|
|
265
|
-
type: "STREAM_CHUNK";
|
|
266
|
-
chunk: string;
|
|
267
|
-
}, ChatEvent, undefined, {
|
|
268
|
-
src: "sendToAI";
|
|
269
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
270
|
-
id: string;
|
|
271
|
-
}, never, never, never, never>;
|
|
272
|
-
};
|
|
273
|
-
readonly STREAM_COMPLETE: {
|
|
274
|
-
readonly target: "idle";
|
|
275
|
-
readonly actions: readonly [import("xstate").ActionFunction<ChatContext, {
|
|
276
|
-
type: "STREAM_COMPLETE";
|
|
277
|
-
response: string;
|
|
278
|
-
}, ChatEvent, undefined, {
|
|
279
|
-
src: "sendToAI";
|
|
280
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
281
|
-
id: string;
|
|
282
|
-
}, never, never, never, never>];
|
|
283
|
-
};
|
|
284
|
-
readonly STREAM_ERROR: {
|
|
285
|
-
readonly target: "error";
|
|
286
|
-
readonly actions: import("xstate").ActionFunction<ChatContext, {
|
|
287
|
-
type: "STREAM_ERROR";
|
|
288
|
-
error: string;
|
|
289
|
-
}, ChatEvent, undefined, {
|
|
290
|
-
src: "sendToAI";
|
|
291
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
292
|
-
id: string;
|
|
293
|
-
}, never, never, never, never>;
|
|
294
|
-
};
|
|
295
|
-
};
|
|
296
|
-
};
|
|
297
|
-
readonly error: {
|
|
298
|
-
readonly on: {
|
|
299
|
-
readonly RETRY: "sending";
|
|
300
|
-
readonly CLEAR_MESSAGES: {
|
|
301
|
-
readonly target: "idle";
|
|
302
|
-
readonly actions: readonly [import("xstate").ActionFunction<ChatContext, {
|
|
303
|
-
type: "CLEAR_MESSAGES";
|
|
304
|
-
}, ChatEvent, undefined, {
|
|
305
|
-
src: "sendToAI";
|
|
306
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
307
|
-
id: string;
|
|
308
|
-
}, never, never, never, never>, "clearStoredChat"];
|
|
309
|
-
};
|
|
310
|
-
readonly SEND_MESSAGE: {
|
|
311
|
-
readonly target: "sending";
|
|
312
|
-
readonly actions: import("xstate").ActionFunction<ChatContext, {
|
|
313
|
-
type: "SEND_MESSAGE";
|
|
314
|
-
content: string;
|
|
315
|
-
attachments?: MessageAttachment[];
|
|
316
|
-
}, ChatEvent, undefined, {
|
|
317
|
-
src: "sendToAI";
|
|
318
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
319
|
-
id: string;
|
|
320
|
-
}, never, never, never, never>;
|
|
321
|
-
};
|
|
322
|
-
};
|
|
323
|
-
};
|
|
109
|
+
}, {
|
|
110
|
+
type: "persistMessages";
|
|
111
|
+
params: unknown;
|
|
112
|
+
} | {
|
|
113
|
+
type: "clearStoredChat";
|
|
114
|
+
params: unknown;
|
|
115
|
+
}, never, never, "error" | "idle" | "sending", string, ChatInput, {}, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
116
|
+
id: "chat";
|
|
117
|
+
states: {
|
|
118
|
+
readonly idle: {};
|
|
119
|
+
readonly sending: {};
|
|
120
|
+
readonly error: {};
|
|
324
121
|
};
|
|
325
122
|
}>;
|
|
326
123
|
/**
|
|
@@ -333,221 +130,18 @@ export declare const chatMachine: import("xstate").StateMachine<ChatContext, Cha
|
|
|
333
130
|
src: "sendToAI";
|
|
334
131
|
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
335
132
|
id: string;
|
|
336
|
-
},
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
readonly context: ({ input }: {
|
|
349
|
-
spawn: {
|
|
350
|
-
<TSrc extends "sendToAI">(logic: TSrc, ...[options]: {
|
|
351
|
-
src: "sendToAI";
|
|
352
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
353
|
-
id: string;
|
|
354
|
-
} extends infer T ? T extends {
|
|
355
|
-
src: "sendToAI";
|
|
356
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
357
|
-
id: string;
|
|
358
|
-
} ? T extends {
|
|
359
|
-
src: TSrc;
|
|
360
|
-
} ? import("xstate").ConditionalRequired<[options?: {
|
|
361
|
-
id?: T["id"];
|
|
362
|
-
systemId?: string;
|
|
363
|
-
input?: import("xstate").InputFrom<T["logic"]>;
|
|
364
|
-
syncSnapshot?: boolean;
|
|
365
|
-
} & { [K in import("xstate").RequiredActorOptions<T>]: unknown; }], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T>>> : never : never : never): import("xstate").ActorRefFromLogic<import("xstate").GetConcreteByKey<{
|
|
366
|
-
src: "sendToAI";
|
|
367
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
368
|
-
id: string;
|
|
369
|
-
}, "src", TSrc>["logic"]>;
|
|
370
|
-
<TLogic extends import("xstate").AnyActorLogic>(src: TLogic, ...[options]: import("xstate").ConditionalRequired<[options?: {
|
|
371
|
-
id?: never;
|
|
372
|
-
systemId?: string;
|
|
373
|
-
input?: import("xstate").InputFrom<TLogic>;
|
|
374
|
-
syncSnapshot?: boolean;
|
|
375
|
-
} & { [K in import("xstate").RequiredLogicInput<TLogic>]: unknown; }], import("xstate").IsNotNever<import("xstate").RequiredLogicInput<TLogic>>>): import("xstate").ActorRefFromLogic<TLogic>;
|
|
376
|
-
};
|
|
377
|
-
input: ChatInput;
|
|
378
|
-
self: import("xstate").ActorRef<import("xstate").MachineSnapshot<ChatContext, ChatEvent, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, ChatEvent, import("xstate").AnyEventObject>;
|
|
379
|
-
}) => {
|
|
380
|
-
storageService: IStorageService;
|
|
381
|
-
systemPrompt: string;
|
|
382
|
-
screenshot: any;
|
|
383
|
-
attachedFiles: any[];
|
|
384
|
-
messages: any[];
|
|
385
|
-
response: string;
|
|
386
|
-
isStreaming: false;
|
|
387
|
-
error: any;
|
|
388
|
-
};
|
|
389
|
-
readonly states: {
|
|
390
|
-
readonly idle: {
|
|
391
|
-
readonly on: {
|
|
392
|
-
readonly LOAD_MESSAGES: {
|
|
393
|
-
readonly actions: import("xstate").ActionFunction<ChatContext, {
|
|
394
|
-
type: "LOAD_MESSAGES";
|
|
395
|
-
messages: Message[];
|
|
396
|
-
}, ChatEvent, undefined, {
|
|
397
|
-
src: "sendToAI";
|
|
398
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
399
|
-
id: string;
|
|
400
|
-
}, never, never, never, never>;
|
|
401
|
-
};
|
|
402
|
-
readonly INPUT_SYSTEMPROMPT: {
|
|
403
|
-
readonly actions: import("xstate").ActionFunction<ChatContext, {
|
|
404
|
-
type: "INPUT_SYSTEMPROMPT";
|
|
405
|
-
value: string;
|
|
406
|
-
}, ChatEvent, undefined, {
|
|
407
|
-
src: "sendToAI";
|
|
408
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
409
|
-
id: string;
|
|
410
|
-
}, never, never, never, never>;
|
|
411
|
-
};
|
|
412
|
-
readonly INPUT_SCREENSHOT: {
|
|
413
|
-
readonly actions: import("xstate").ActionFunction<ChatContext, {
|
|
414
|
-
type: "INPUT_SCREENSHOT";
|
|
415
|
-
value: string | null;
|
|
416
|
-
}, ChatEvent, undefined, {
|
|
417
|
-
src: "sendToAI";
|
|
418
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
419
|
-
id: string;
|
|
420
|
-
}, never, never, never, never>;
|
|
421
|
-
};
|
|
422
|
-
readonly SCREENSHOT_CAPTURED: {
|
|
423
|
-
readonly actions: import("xstate").ActionFunction<ChatContext, {
|
|
424
|
-
type: "SCREENSHOT_CAPTURED";
|
|
425
|
-
base64: string;
|
|
426
|
-
dataUrl: string;
|
|
427
|
-
}, ChatEvent, undefined, {
|
|
428
|
-
src: "sendToAI";
|
|
429
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
430
|
-
id: string;
|
|
431
|
-
}, never, never, never, never>;
|
|
432
|
-
};
|
|
433
|
-
readonly INPUT_FILES: {
|
|
434
|
-
readonly actions: import("xstate").ActionFunction<ChatContext, {
|
|
435
|
-
type: "INPUT_FILES";
|
|
436
|
-
value: AttachedFile[];
|
|
437
|
-
}, ChatEvent, undefined, {
|
|
438
|
-
src: "sendToAI";
|
|
439
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
440
|
-
id: string;
|
|
441
|
-
}, never, never, never, never>;
|
|
442
|
-
};
|
|
443
|
-
readonly SEND_MESSAGE: {
|
|
444
|
-
readonly target: "sending";
|
|
445
|
-
readonly actions: import("xstate").ActionFunction<ChatContext, {
|
|
446
|
-
type: "SEND_MESSAGE";
|
|
447
|
-
content: string;
|
|
448
|
-
attachments?: MessageAttachment[];
|
|
449
|
-
}, ChatEvent, undefined, {
|
|
450
|
-
src: "sendToAI";
|
|
451
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
452
|
-
id: string;
|
|
453
|
-
}, never, never, never, never>;
|
|
454
|
-
};
|
|
455
|
-
readonly CLEAR_MESSAGES: {
|
|
456
|
-
readonly actions: readonly [import("xstate").ActionFunction<ChatContext, {
|
|
457
|
-
type: "CLEAR_MESSAGES";
|
|
458
|
-
}, ChatEvent, undefined, {
|
|
459
|
-
src: "sendToAI";
|
|
460
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
461
|
-
id: string;
|
|
462
|
-
}, never, never, never, never>, "clearStoredChat"];
|
|
463
|
-
};
|
|
464
|
-
readonly CLEAR_ATTACHMENTS: {
|
|
465
|
-
readonly actions: import("xstate").ActionFunction<ChatContext, {
|
|
466
|
-
type: "CLEAR_ATTACHMENTS";
|
|
467
|
-
}, ChatEvent, undefined, {
|
|
468
|
-
src: "sendToAI";
|
|
469
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
470
|
-
id: string;
|
|
471
|
-
}, never, never, never, never>;
|
|
472
|
-
};
|
|
473
|
-
};
|
|
474
|
-
};
|
|
475
|
-
readonly sending: {
|
|
476
|
-
readonly entry: import("xstate").ActionFunction<ChatContext, ChatEvent, ChatEvent, undefined, {
|
|
477
|
-
src: "sendToAI";
|
|
478
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
479
|
-
id: string;
|
|
480
|
-
}, never, never, never, never>;
|
|
481
|
-
readonly invoke: {
|
|
482
|
-
readonly src: "sendToAI";
|
|
483
|
-
readonly input: ({ context }: {
|
|
484
|
-
context: ChatContext;
|
|
485
|
-
event: ChatEvent;
|
|
486
|
-
self: import("xstate").ActorRef<import("xstate").MachineSnapshot<ChatContext, ChatEvent, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, ChatEvent, import("xstate").AnyEventObject>;
|
|
487
|
-
}) => ChatContext;
|
|
488
|
-
};
|
|
489
|
-
readonly on: {
|
|
490
|
-
readonly STREAM_CHUNK: {
|
|
491
|
-
readonly actions: import("xstate").ActionFunction<ChatContext, {
|
|
492
|
-
type: "STREAM_CHUNK";
|
|
493
|
-
chunk: string;
|
|
494
|
-
}, ChatEvent, undefined, {
|
|
495
|
-
src: "sendToAI";
|
|
496
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
497
|
-
id: string;
|
|
498
|
-
}, never, never, never, never>;
|
|
499
|
-
};
|
|
500
|
-
readonly STREAM_COMPLETE: {
|
|
501
|
-
readonly target: "idle";
|
|
502
|
-
readonly actions: readonly [import("xstate").ActionFunction<ChatContext, {
|
|
503
|
-
type: "STREAM_COMPLETE";
|
|
504
|
-
response: string;
|
|
505
|
-
}, ChatEvent, undefined, {
|
|
506
|
-
src: "sendToAI";
|
|
507
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
508
|
-
id: string;
|
|
509
|
-
}, never, never, never, never>];
|
|
510
|
-
};
|
|
511
|
-
readonly STREAM_ERROR: {
|
|
512
|
-
readonly target: "error";
|
|
513
|
-
readonly actions: import("xstate").ActionFunction<ChatContext, {
|
|
514
|
-
type: "STREAM_ERROR";
|
|
515
|
-
error: string;
|
|
516
|
-
}, ChatEvent, undefined, {
|
|
517
|
-
src: "sendToAI";
|
|
518
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
519
|
-
id: string;
|
|
520
|
-
}, never, never, never, never>;
|
|
521
|
-
};
|
|
522
|
-
};
|
|
523
|
-
};
|
|
524
|
-
readonly error: {
|
|
525
|
-
readonly on: {
|
|
526
|
-
readonly RETRY: "sending";
|
|
527
|
-
readonly CLEAR_MESSAGES: {
|
|
528
|
-
readonly target: "idle";
|
|
529
|
-
readonly actions: readonly [import("xstate").ActionFunction<ChatContext, {
|
|
530
|
-
type: "CLEAR_MESSAGES";
|
|
531
|
-
}, ChatEvent, undefined, {
|
|
532
|
-
src: "sendToAI";
|
|
533
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
534
|
-
id: string;
|
|
535
|
-
}, never, never, never, never>, "clearStoredChat"];
|
|
536
|
-
};
|
|
537
|
-
readonly SEND_MESSAGE: {
|
|
538
|
-
readonly target: "sending";
|
|
539
|
-
readonly actions: import("xstate").ActionFunction<ChatContext, {
|
|
540
|
-
type: "SEND_MESSAGE";
|
|
541
|
-
content: string;
|
|
542
|
-
attachments?: MessageAttachment[];
|
|
543
|
-
}, ChatEvent, undefined, {
|
|
544
|
-
src: "sendToAI";
|
|
545
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, ChatContext, import("xstate").EventObject>;
|
|
546
|
-
id: string;
|
|
547
|
-
}, never, never, never, never>;
|
|
548
|
-
};
|
|
549
|
-
};
|
|
550
|
-
};
|
|
133
|
+
}, {
|
|
134
|
+
type: "persistMessages";
|
|
135
|
+
params: unknown;
|
|
136
|
+
} | {
|
|
137
|
+
type: "clearStoredChat";
|
|
138
|
+
params: unknown;
|
|
139
|
+
}, never, never, "error" | "idle" | "sending", string, ChatInput, {}, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
140
|
+
id: "chat";
|
|
141
|
+
states: {
|
|
142
|
+
readonly idle: {};
|
|
143
|
+
readonly sending: {};
|
|
144
|
+
readonly error: {};
|
|
551
145
|
};
|
|
552
146
|
}>;
|
|
553
147
|
export type { ChatMessage };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatMachine.d.ts","sourceRoot":"","sources":["../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AAgB,CAAA;CAAE,GAC1B;IAAE,IAAI,EAAE,oBAAoB,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,GACrD;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjD,MAAM,MAAM,SAAS,GAAG;IACpB,cAAc,CAAC,EAAE,eAAe,CAAC;CACpC,CAAC;AAsDF;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,gBAAgB,CAAC,EAAE,iBAAiB;;;;;;;;;;;;;;;;;;;GA2YrE;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;EAAsB,CAAC;AAM/C,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@admin-layout/demo-perplexity-browser",
|
|
3
|
-
"version": "12.2.4-alpha.
|
|
3
|
+
"version": "12.2.4-alpha.40",
|
|
4
4
|
"description": "Sample core for higher packages to depend on",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"watch": "yarn build:lib:watch"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@admin-layout/assets": "12.2.4-alpha.
|
|
25
|
-
"@admin-layout/tailwind-design-pro": "12.2.4-alpha.
|
|
26
|
-
"@admin-layout/tailwind-ui": "12.2.4-alpha.
|
|
24
|
+
"@admin-layout/assets": "12.2.4-alpha.37",
|
|
25
|
+
"@admin-layout/tailwind-design-pro": "12.2.4-alpha.40",
|
|
26
|
+
"@admin-layout/tailwind-ui": "12.2.4-alpha.37",
|
|
27
27
|
"@pubngo-stack/icons": "8.0.7",
|
|
28
28
|
"@react-icons/all-files": "^4.1.0",
|
|
29
29
|
"@tauri-apps/plugin-http": "^2.5.0",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"typescript": {
|
|
58
58
|
"definition": "lib/index.d.ts"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "7b980dc331b185c046086a3eb333093337159a40"
|
|
61
61
|
}
|