@aiquants/chat 0.2.0 → 0.4.0

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/README.md +234 -18
  3. package/dist/{ChatAnswerHtml-NBI6KBTM.js → ChatAnswerHtml-NAD7XPMQ.js} +1 -1
  4. package/dist/{chunk-NKHHXW42.js → chunk-44WLZMPZ.js} +1 -1
  5. package/dist/chunk-BTDHRYBO.js +1 -0
  6. package/dist/chunk-GSCTWGZT.js +1 -0
  7. package/dist/chunk-HC7HXC2K.js +1 -0
  8. package/dist/{chunk-PLNRET3Z.js → chunk-KNPMHSTQ.js} +1 -1
  9. package/dist/{chunk-7KWWXSGA.js → chunk-NWDLT2AZ.js} +1 -1
  10. package/dist/client.cjs +2 -2
  11. package/dist/client.d.cts +5 -5
  12. package/dist/client.d.ts +5 -5
  13. package/dist/client.js +1 -1
  14. package/dist/{httpTransport-BAaKwioS.d.ts → httpTransport-Cgj10OUn.d.ts} +1 -1
  15. package/dist/{httpTransport-D_JJABMq.d.cts → httpTransport-o7MkPUuY.d.cts} +1 -1
  16. package/dist/{index-iHWm67aF.d.cts → index-g-wjju1F.d.cts} +9518 -1785
  17. package/dist/{index-iHWm67aF.d.ts → index-g-wjju1F.d.ts} +9518 -1785
  18. package/dist/protocol.cjs +1 -1
  19. package/dist/protocol.d.cts +1 -1
  20. package/dist/protocol.d.ts +1 -1
  21. package/dist/protocol.js +1 -1
  22. package/dist/react.cjs +2 -2
  23. package/dist/react.d.cts +295 -56
  24. package/dist/react.d.ts +295 -56
  25. package/dist/react.js +2 -2
  26. package/dist/{runStream-7KHfaNOq.d.ts → runStream-Wn5F3RKe.d.ts} +1 -1
  27. package/dist/{runStream-CKisFztQ.d.cts → runStream-jp4rlkIw.d.cts} +1 -1
  28. package/dist/testing.cjs +6 -6
  29. package/dist/testing.d.cts +55 -4
  30. package/dist/testing.d.ts +55 -4
  31. package/dist/testing.js +6 -6
  32. package/dist/{transport-Clvkp7mW.d.ts → transport-CYd9hh42.d.cts} +23 -1
  33. package/dist/{transport-5ExGY_ti.d.cts → transport-DlhniH4C.d.ts} +23 -1
  34. package/package.json +7 -7
  35. package/dist/chunk-4NR4KSV6.js +0 -1
  36. package/dist/chunk-EEUIBWBF.js +0 -1
  37. package/dist/chunk-WGNEBS4H.js +0 -1
package/dist/react.d.cts CHANGED
@@ -1,11 +1,11 @@
1
- import { D as ChatBusinessError, U as ChatHostRefusalRole, I as ChatErrorBody, W as ChatLimitKey, T as ChatFailureCode, aB as chatFailureDetailSchemas, K as ChatEventData, ad as chatAttachmentFragments, u as ChatAttachment, x as ChatAttachmentKind, a9 as ChatVocabulary, F as ChatConversation, Z as ChatModelList, a3 as ChatSettings, a8 as ChatUserSettingsUpdate } from "./index-iHWm67aF.cjs";
1
+ import { L as ChatBusinessError, a2 as ChatHostRefusalRole, S as ChatErrorBody, a4 as ChatLimitKey, a1 as ChatFailureCode, aX as chatFailureDetailSchemas, U as ChatEventData, ax as chatAttachmentFragments, D as ChatAttachment, G as ChatAttachmentKind, aq as ChatVocabulary, N as ChatConversation, a7 as ChatModelList, aj as ChatSettings, a9 as ChatPolicy, ap as ChatUserSettingsUpdate } from "./index-g-wjju1F.cjs";
2
2
  import { z } from "zod";
3
3
  import * as react from "react";
4
4
  import { ReactNode, RefObject } from "react";
5
5
  import { MermaidDrawer } from "@aiquants/markdown";
6
6
  import { MarkdownConverter } from "@aiquants/markdown/converter";
7
- import { C as ChatStreamNotice, n as ChatStreamNoticeAction, e as ChatRunStreams } from "./runStream-CKisFztQ.cjs";
8
- import { e as ChatTransport } from "./transport-5ExGY_ti.cjs";
7
+ import { C as ChatStreamNotice, n as ChatStreamNoticeAction, e as ChatRunStreams } from "./runStream-jp4rlkIw.cjs";
8
+ import { e as ChatTransport } from "./transport-CYd9hh42.cjs";
9
9
  import { PagedState } from "@aiquants/console-ui";
10
10
  import "@aiquants/sse";
11
11
  import "@aiquants/sse/client";
@@ -249,38 +249,6 @@ type ChatComposerProblem = {
249
249
  } | {
250
250
  readonly cause: "incompatible";
251
251
  });
252
- type ChatComposerPhase = "ready" | "sending" | "running" | "stopping";
253
- type ChatComposerRestore = {
254
- readonly modelName: string;
255
- readonly onRestore: () => void;
256
- };
257
- type ChatComposerLimits = ChatAttachmentLimits & Readonly<Pick<Record<ChatLimitKey, number>, "CHAT_USER_MESSAGE_MAX_CHARS">>;
258
- type ChatComposerAttachments = {
259
- readonly items: readonly ChatComposerAttachment[];
260
- readonly model: ChatModelAttachmentFlags | null;
261
- readonly onAdd: (files: readonly File[]) => void;
262
- readonly onRemove: (key: string) => void;
263
- readonly onRetry: (key: string) => void;
264
- readonly onSaveAltText: ChatComposerSaveAltText;
265
- readonly restore: ChatComposerRestore | null;
266
- readonly microphone: ChatMicrophone | null;
267
- };
268
- type ChatComposerProps = {
269
- readonly value: string;
270
- readonly onValueChange: (value: string) => void;
271
- readonly phase: ChatComposerPhase;
272
- readonly onSend: (text: string) => void;
273
- readonly onStop: () => void;
274
- readonly notice: ChatStreamNotice | null;
275
- readonly onNoticeAction: (action: ChatStreamNoticeAction) => void;
276
- readonly problem: ChatComposerProblem | null;
277
- readonly attachments: ChatComposerAttachments;
278
- readonly limits: ChatComposerLimits;
279
- readonly sendKey: ChatVocabulary<"send_keys">;
280
- readonly contentBaseUrl: string;
281
- readonly testId: string;
282
- };
283
- declare const ChatComposer: (props: ChatComposerProps) => react.JSX.Element;
284
252
  type ChatTextLanguage = "ja" | "en" | "screen";
285
253
  type ChatMessageAuthor = {
286
254
  readonly role: "user";
@@ -294,11 +262,19 @@ type ChatListMessage = {
294
262
  readonly author: ChatMessageAuthor;
295
263
  readonly createdAt: string;
296
264
  readonly text: ChatMessageText;
265
+ readonly sourceText: string;
297
266
  readonly marks: number;
298
267
  readonly language: ChatTextLanguage;
299
268
  readonly contextCutBefore: boolean;
269
+ readonly branch: ChatMessageBranch | null;
270
+ };
271
+ type ChatMessageBranch = {
272
+ readonly position: number;
273
+ readonly count: number;
274
+ readonly previous: string | null;
275
+ readonly next: string | null;
300
276
  };
301
- type ChatMessageListLimits = Readonly<Pick<Record<ChatLimitKey, number>, "CHAT_RENDER_LIST_OVERSCAN_ROWS">>;
277
+ type ChatMessageListLimits = Readonly<Pick<Record<ChatLimitKey, number>, "CHAT_RENDER_LIST_OVERSCAN_ROWS" | "CHAT_USER_MESSAGE_MAX_CHARS">>;
302
278
  type ChatMessageListProps = {
303
279
  readonly messages: readonly ChatListMessage[];
304
280
  readonly notificationLevel: ChatVocabulary<"notification_levels">;
@@ -312,9 +288,24 @@ type ChatMessageListProps = {
312
288
  readonly onLoadOlder: () => void;
313
289
  readonly olderReading: boolean;
314
290
  readonly olderFailure: ChatOlderFailure | null;
291
+ readonly onSwitchBranch: (messageUid: string, siblingUid: string) => Promise<ChatBranchSwitchOutcome>;
292
+ readonly branchSwitch: ChatBranchSwitchState;
293
+ readonly onEditMessage: (messageUid: string, message: ChatSendMessage) => Promise<ChatRewriteOutcome>;
294
+ readonly onRegenerateMessage: (messageUid: string) => Promise<ChatRewriteOutcome>;
295
+ readonly rewrite: ChatRewriteState;
296
+ readonly messageActionsDisplay: ChatVocabulary<"message_actions_displays">;
297
+ readonly sendKey: ChatVocabulary<"send_keys">;
298
+ readonly landing: ChatMessageLanding | null;
299
+ readonly messageHrefOf: (messageUid: string) => string;
315
300
  readonly testId: string;
316
301
  };
317
- declare const ChatMessageList: ({ messages, notificationLevel, followScroll, reduceMotion, sentMessageUid, labelledBy, headingLevel, limits, older, onLoadOlder, olderReading, olderFailure, testId }: ChatMessageListProps) => react.JSX.Element;
302
+ type ChatMessageLanding = {
303
+ readonly messageUid: string;
304
+ readonly focus: boolean;
305
+ readonly marked: boolean;
306
+ readonly occurrence: number;
307
+ };
308
+ declare const ChatMessageList: ({ messages, notificationLevel, followScroll, reduceMotion, sentMessageUid, labelledBy, headingLevel, limits, older, onLoadOlder, olderReading, olderFailure, onSwitchBranch, branchSwitch, onEditMessage, onRegenerateMessage, rewrite, messageActionsDisplay, sendKey, landing, messageHrefOf, testId, }: ChatMessageListProps) => react.JSX.Element;
318
309
  type ChatConversationOptions = {
319
310
  readonly transport: ChatTransport;
320
311
  readonly streams: ChatRunStreams;
@@ -346,12 +337,174 @@ type ChatConversationWindow = {
346
337
  readonly loadOlder: () => void;
347
338
  readonly olderReading: boolean;
348
339
  readonly olderFailure: ChatOlderFailure | null;
340
+ readonly switchBranch: (messageUid: string, siblingUid: string) => Promise<ChatBranchSwitchOutcome>;
341
+ readonly branchSwitch: ChatBranchSwitchState;
342
+ readonly runElsewhere: boolean;
343
+ readonly path: ChatWindowPath;
344
+ readonly goTo: (messageUid: string, via: ChatGoToVia) => Promise<ChatGoToOutcome>;
345
+ readonly chooseBranch: () => Promise<boolean>;
346
+ readonly returnToChosen: () => Promise<boolean>;
347
+ readonly pathChange: ChatPathChangeState;
348
+ };
349
+ type ChatWindowPath = {
350
+ readonly kind: "chosen";
351
+ } | {
352
+ readonly kind: "branch";
353
+ readonly endMessageUid: string;
354
+ };
355
+ type ChatGoToVia = "link" | "screen";
356
+ type ChatGoToOutcome = "shown" | "missing" | "not-gone";
357
+ type ChatPathChangeState = {
358
+ readonly going: {
359
+ readonly messageUid: string;
360
+ } | null;
361
+ readonly choosing: boolean;
362
+ readonly returning: boolean;
363
+ readonly problem: ChatPathChangeProblem | null;
349
364
  };
365
+ type ChatPathChangeFailure = {
366
+ readonly cause: "unreached";
367
+ } | {
368
+ readonly cause: "refused";
369
+ readonly refusal: ChatRefusal;
370
+ } | {
371
+ readonly cause: "incompatible";
372
+ };
373
+ type ChatPathChangeProblem = ({
374
+ readonly change: "go-to";
375
+ readonly via: ChatGoToVia;
376
+ readonly occurrence: number;
377
+ } & ({
378
+ readonly cause: "missing";
379
+ } | ChatPathChangeFailure)) | ({
380
+ readonly change: "choose" | "return";
381
+ readonly occurrence: number;
382
+ } & ChatPathChangeFailure);
383
+ type ChatBranchSwitchState = {
384
+ readonly switching: {
385
+ readonly messageUid: string;
386
+ readonly siblingUid: string;
387
+ } | null;
388
+ readonly problem: ChatBranchSwitchProblem | null;
389
+ };
390
+ type ChatBranchSwitchProblem = {
391
+ readonly messageUid: string;
392
+ readonly occurrence: number;
393
+ } & ({
394
+ readonly cause: "unreached";
395
+ } | {
396
+ readonly cause: "refused";
397
+ readonly refusal: ChatRefusal;
398
+ } | {
399
+ readonly cause: "incompatible";
400
+ });
401
+ type ChatBranchSwitchOutcome = "switched" | "not-switched";
350
402
  type ChatOlderFailure = {
351
403
  readonly cause: "unreached" | "incompatible";
352
404
  readonly occurrence: number;
353
405
  };
354
406
  declare const useChatConversation: (options: ChatConversationOptions) => ChatConversationWindow;
407
+ type ChatSendOptions = {
408
+ readonly transport: ChatTransport;
409
+ readonly window: ChatConversationWindow;
410
+ readonly hostRefusalCodes: ChatHostRefusalCodes;
411
+ };
412
+ type ChatSendMessage = {
413
+ readonly text: string;
414
+ readonly attachmentIds: readonly string[];
415
+ };
416
+ type ChatSendOutcome = "accepted" | "not-sent";
417
+ type ChatSendPathBlock = "branch" | "going";
418
+ type ChatRewriteKind = "edit" | "regenerate";
419
+ type ChatRewriteOutcome = {
420
+ readonly kind: "accepted";
421
+ readonly siblingUid: string;
422
+ } | {
423
+ readonly kind: "not-sent";
424
+ };
425
+ type ChatRewriteProblem = {
426
+ readonly messageUid: string;
427
+ readonly kind: ChatRewriteKind;
428
+ readonly occurrence: number;
429
+ } & ({
430
+ readonly cause: "unreached";
431
+ } | {
432
+ readonly cause: "refused";
433
+ readonly refusal: ChatRefusal;
434
+ } | {
435
+ readonly cause: "incompatible";
436
+ });
437
+ type ChatRewriteState = {
438
+ readonly pending: {
439
+ readonly messageUid: string;
440
+ readonly kind: ChatRewriteKind;
441
+ } | null;
442
+ readonly accepted: {
443
+ readonly messageUid: string;
444
+ readonly kind: ChatRewriteKind;
445
+ readonly siblingUid: string;
446
+ } | null;
447
+ readonly problem: ChatRewriteProblem | null;
448
+ readonly block: "sending" | ChatSendPathBlock | "writing" | null;
449
+ };
450
+ type ChatSend = {
451
+ readonly phase: ChatComposerPhase;
452
+ readonly problem: ChatComposerProblem | null;
453
+ readonly runElsewhere: boolean;
454
+ readonly pathBlock: ChatSendPathBlock | null;
455
+ readonly sentMessageUid: string | null;
456
+ readonly send: (message: ChatSendMessage) => Promise<ChatSendOutcome>;
457
+ readonly edit: (messageUid: string, message: ChatSendMessage) => Promise<ChatRewriteOutcome>;
458
+ readonly regenerate: (messageUid: string) => Promise<ChatRewriteOutcome>;
459
+ readonly rewrite: ChatRewriteState;
460
+ readonly stop: () => void;
461
+ };
462
+ declare const useChatSend: (options: ChatSendOptions) => ChatSend;
463
+ type ChatComposerPhase = "ready" | "sending" | "running" | "stopping";
464
+ type ChatComposerRestore = {
465
+ readonly modelName: string;
466
+ readonly onRestore: () => void;
467
+ };
468
+ type ChatComposerLimits = ChatAttachmentLimits & Readonly<Pick<Record<ChatLimitKey, number>, "CHAT_USER_MESSAGE_MAX_CHARS">>;
469
+ type ChatComposerAttachments = {
470
+ readonly items: readonly ChatComposerAttachment[];
471
+ readonly model: ChatModelAttachmentFlags | null;
472
+ readonly onAdd: (files: readonly File[]) => void;
473
+ readonly onRemove: (key: string) => void;
474
+ readonly onRetry: (key: string) => void;
475
+ readonly onSaveAltText: ChatComposerSaveAltText;
476
+ readonly restore: ChatComposerRestore | null;
477
+ readonly microphone: ChatMicrophone | null;
478
+ };
479
+ type ChatComposerProps = {
480
+ readonly value: string;
481
+ readonly onValueChange: (value: string) => void;
482
+ readonly phase: ChatComposerPhase;
483
+ readonly runElsewhere: boolean;
484
+ readonly pathBlock: ChatSendPathBlock | null;
485
+ readonly onSend: (text: string) => void;
486
+ readonly onStop: () => void;
487
+ readonly notice: ChatStreamNotice | null;
488
+ readonly onNoticeAction: (action: ChatStreamNoticeAction) => void;
489
+ readonly problem: ChatComposerProblem | null;
490
+ readonly attachments: ChatComposerAttachments;
491
+ readonly limits: ChatComposerLimits;
492
+ readonly sendKey: ChatVocabulary<"send_keys">;
493
+ readonly contentBaseUrl: string;
494
+ readonly inputRef: RefObject<HTMLTextAreaElement | null> | null;
495
+ readonly testId: string;
496
+ };
497
+ declare const ChatComposer: (props: ChatComposerProps) => react.JSX.Element;
498
+ type ChatConsentConversationProps = {
499
+ readonly transport: ChatTransport;
500
+ readonly hostRefusalCodes: ChatHostRefusalCodes;
501
+ readonly conversationUid: string;
502
+ readonly onChanged: () => void;
503
+ readonly onDeleted: (conversation: ChatConversation) => void;
504
+ readonly headingLevel: 1 | 2 | 3;
505
+ readonly testId: string;
506
+ };
507
+ declare const ChatConsentConversation: (props: ChatConsentConversationProps) => ReactNode;
355
508
  type ChatConversationGateProps = {
356
509
  readonly conversation: ChatConversationWindow;
357
510
  readonly onReopen: () => void;
@@ -360,6 +513,45 @@ type ChatConversationGateProps = {
360
513
  readonly testId: string;
361
514
  };
362
515
  declare const ChatConversationGate: ({ conversation, onReopen, focusAfterOpen, children, testId }: ChatConversationGateProps) => ReactNode;
516
+ type ChatConversationActionsOptions = {
517
+ readonly transport: ChatTransport;
518
+ readonly window: ChatConversationWindow;
519
+ readonly hostRefusalCodes: ChatHostRefusalCodes;
520
+ readonly onChanged: () => void;
521
+ readonly onDeleted: (conversation: ChatConversation) => void;
522
+ };
523
+ type ChatConversationAction = "rename" | "pin" | "delete";
524
+ type ChatConversationActionPhase = "ready" | "renaming" | "pinning" | "stopping" | "deleting";
525
+ type ChatConversationActionProblem = {
526
+ readonly action: ChatConversationAction;
527
+ readonly occurrence: number;
528
+ } & ({
529
+ readonly cause: "unreached";
530
+ } | {
531
+ readonly cause: "refused";
532
+ readonly refusal: ChatRefusal;
533
+ } | {
534
+ readonly cause: "incompatible";
535
+ });
536
+ type ChatConversationActionOutcome = "done" | "not-done";
537
+ type ChatConversationActions = {
538
+ readonly phase: ChatConversationActionPhase;
539
+ readonly problem: ChatConversationActionProblem | null;
540
+ readonly landed: ChatConversation | null;
541
+ readonly rename: (title: string) => Promise<ChatConversationActionOutcome>;
542
+ readonly setPinned: (pinned: boolean) => Promise<ChatConversationActionOutcome>;
543
+ readonly remove: (signal: AbortSignal) => Promise<ChatConversationActionOutcome>;
544
+ };
545
+ declare const chatConversationShownRow: (row: ChatConversation, landed: ChatConversation | null) => ChatConversation;
546
+ declare const useChatConversationActions: (options: ChatConversationActionsOptions) => ChatConversationActions;
547
+ type ChatConversationHeadingProps = {
548
+ readonly conversation: ChatConversation;
549
+ readonly actions: ChatConversationActions;
550
+ readonly level: 1 | 2 | 3;
551
+ readonly labelId: string;
552
+ readonly testId: string;
553
+ };
554
+ declare const ChatConversationHeading: ({ conversation, actions, level, labelId, testId }: ChatConversationHeadingProps) => react.JSX.Element;
363
555
  type ChatConversationListLimits = {
364
556
  readonly CHAT_TITLE_SEARCH_PAUSE_MS: number;
365
557
  };
@@ -487,6 +679,64 @@ type ChatNewConversationChoicesProps = {
487
679
  readonly testId: string;
488
680
  };
489
681
  declare const ChatNewConversationChoices: ({ choice, phase, testId }: ChatNewConversationChoicesProps) => react.JSX.Element;
682
+ type ChatPolicyOptions = {
683
+ readonly transport: ChatTransport;
684
+ readonly hostRefusalCodes: ChatHostRefusalCodes;
685
+ };
686
+ type ChatPolicyState = {
687
+ readonly kind: "reading";
688
+ } | {
689
+ readonly kind: "consented";
690
+ readonly policy: Extract<ChatPolicy, {
691
+ readonly consent: "current";
692
+ }>;
693
+ } | {
694
+ readonly kind: "consent-needed";
695
+ readonly policy: Exclude<ChatPolicy, {
696
+ readonly consent: "current";
697
+ }>;
698
+ } | {
699
+ readonly kind: "not-published";
700
+ readonly retry: () => void;
701
+ } | {
702
+ readonly kind: "refused";
703
+ readonly refusal: ChatRefusal;
704
+ readonly retry: (() => void) | null;
705
+ } | {
706
+ readonly kind: "failed";
707
+ readonly cause: "unreached" | "incompatible";
708
+ readonly retry: () => void;
709
+ };
710
+ type ChatPolicyConsentProblem = {
711
+ readonly occurrence: number;
712
+ } & ({
713
+ readonly cause: "superseded";
714
+ } | {
715
+ readonly cause: "unreached";
716
+ } | {
717
+ readonly cause: "refused";
718
+ readonly refusal: ChatRefusal;
719
+ } | {
720
+ readonly cause: "incompatible";
721
+ });
722
+ type ChatPolicyConsentOutcome = "consented" | "not-consented";
723
+ type ChatPolicyAccess = {
724
+ readonly state: ChatPolicyState;
725
+ readonly consenting: boolean;
726
+ readonly problem: ChatPolicyConsentProblem | null;
727
+ readonly consent: () => Promise<ChatPolicyConsentOutcome>;
728
+ readonly transport: ChatTransport;
729
+ };
730
+ declare const useChatPolicy: (options: ChatPolicyOptions) => ChatPolicyAccess;
731
+ type ChatPolicyGateProps = {
732
+ readonly policy: ChatPolicyAccess;
733
+ readonly focusAfterConsent: RefObject<HTMLElement | null>;
734
+ readonly aside: ReactNode;
735
+ readonly children: () => ReactNode;
736
+ readonly headingLevel: 1 | 2 | 3;
737
+ readonly testId: string;
738
+ };
739
+ declare const ChatPolicyGate: ({ policy, focusAfterConsent, aside, children, headingLevel, testId }: ChatPolicyGateProps) => ReactNode;
490
740
  type ChatSettingsOptions = {
491
741
  readonly transport: ChatTransport;
492
742
  readonly hostRefusalCodes: ChatHostRefusalCodes;
@@ -537,6 +787,12 @@ type ChatSettingsGateProps = {
537
787
  readonly testId: string;
538
788
  };
539
789
  declare const ChatSettingsGate: ({ settings, focusAfterOpen, children, testId }: ChatSettingsGateProps) => ReactNode;
790
+ type ChatShownBranchBandProps = {
791
+ readonly window: Pick<ChatConversationWindow, "path" | "pathChange" | "branchSwitch" | "chooseBranch" | "returnToChosen">;
792
+ readonly focusAfterChange: RefObject<HTMLElement | null>;
793
+ readonly testId: string;
794
+ };
795
+ declare const ChatShownBranchBand: ({ window: conversationWindow, focusAfterChange, testId }: ChatShownBranchBandProps) => react.JSX.Element | null;
540
796
  type ChatTalkFlowProps = {
541
797
  readonly children: ReactNode;
542
798
  readonly testId: string;
@@ -581,22 +837,5 @@ type ChatComposerAttachmentsState = {
581
837
  };
582
838
  declare const useChatComposerAttachments: (options: ChatComposerAttachmentsOptions) => ChatComposerAttachmentsState;
583
839
  declare const useChatConversationCreatedAnnouncer: () => (() => void);
584
- type ChatSendOptions = {
585
- readonly transport: ChatTransport;
586
- readonly window: ChatConversationWindow;
587
- readonly hostRefusalCodes: ChatHostRefusalCodes;
588
- };
589
- type ChatSendMessage = {
590
- readonly text: string;
591
- readonly attachmentIds: readonly string[];
592
- };
593
- type ChatSendOutcome = "accepted" | "not-sent";
594
- type ChatSend = {
595
- readonly phase: ChatComposerPhase;
596
- readonly problem: ChatComposerProblem | null;
597
- readonly sentMessageUid: string | null;
598
- readonly send: (message: ChatSendMessage) => Promise<ChatSendOutcome>;
599
- readonly stop: () => void;
600
- };
601
- declare const useChatSend: (options: ChatSendOptions) => ChatSend;
602
- export { CHAT_LAYOUT, type ChatAnswerRenderLimits, ChatAnswerRendering, type ChatAnswerRenderingProps, type ChatAnswerStatus, type ChatAttachmentLimits, type ChatAttachmentPrecheckRefusal, type ChatChoosableModel, ChatComposer, type ChatComposerAltTextOutcome, type ChatComposerAttachment, type ChatComposerAttachments, type ChatComposerAttachmentsLimits, type ChatComposerAttachmentsOptions, type ChatComposerAttachmentsState, type ChatComposerLimits, type ChatComposerPhase, type ChatComposerProblem, type ChatComposerProps, type ChatComposerRestore, type ChatComposerSaveAltText, ChatConversationGate, type ChatConversationGateProps, type ChatConversationLimits, ChatConversationList, type ChatConversationListLimits, type ChatConversationListOptions, type ChatConversationListProps, type ChatConversationListState, type ChatConversationListViewLimits, type ChatConversationOptions, type ChatConversationSection, type ChatConversationState, type ChatConversationWindow, type ChatConversionLimits, type ChatConverterTimeouts, type ChatDiagramFileContext, type ChatDiagramFormat, ChatFrame, type ChatFrameProps, type ChatHostRefusalCodes, type ChatLayoutColumn, type ChatLayoutColumns, type ChatLayoutPlan, type ChatLayoutRule, type ChatListMessage, type ChatMarkdownConverterFactory, type ChatMediaRecorderLike, type ChatMediaStreamLike, type ChatMessageAuthor, ChatMessageList, type ChatMessageListLimits, type ChatMessageListProps, type ChatMessageText, type ChatMicrophone, type ChatMicrophoneProblem, type ChatMicrophoneScope, type ChatModelAttachmentFlags, type ChatModels, type ChatModelsOptions, type ChatModelsQuery, type ChatModelsState, type ChatNewConversation, type ChatNewConversationChoice, type ChatNewConversationChoiceOptions, ChatNewConversationChoices, type ChatNewConversationChoicesProps, type ChatNewConversationMessage, type ChatNewConversationOptions, type ChatNewConversationOutcome, type ChatOlderFailure, type ChatPinnedSide, type ChatRecording, type ChatRecordingListener, type ChatRecordingRequest, type ChatRecordingStart, type ChatRefusal, type ChatRefusalStatusClass, type ChatSend, type ChatSendMessage, type ChatSendOptions, type ChatSendOutcome, type ChatSettingsAccess, ChatSettingsForm, type ChatSettingsFormProps, ChatSettingsGate, type ChatSettingsGateProps, type ChatSettingsOptions, type ChatSettingsProblem, type ChatSettingsSaveOutcome, type ChatSettingsState, ChatTalkFlow, type ChatTalkFlowProps, ChatTalkHeading, type ChatTalkHeadingProps, assertValidChatHostRefusalCodes, chatAttachmentHasUnreadText, chatAttachmentsRefusedByModel, chatBrowserMicrophone, chatDeclaredAttachmentKind, chatFilePickerAccept, chatFrameBlockSizePx, chatLayoutPlan, chatLayoutRule, chatModelAttachmentKinds, chatModelTakesKind, chatRefusal, diagramFileName, precheckChatAttachment, useChatComposerAttachments, useChatConversation, useChatConversationCreatedAnnouncer, useChatConversationList, useChatModels, useChatNewConversation, useChatNewConversationChoice, useChatSend, useChatSettings };
840
+ declare const useChatConversationDeletedAnnouncer: () => ((conversation: Pick<ChatConversation, "title">) => void);
841
+ export { CHAT_LAYOUT, type ChatAnswerRenderLimits, ChatAnswerRendering, type ChatAnswerRenderingProps, type ChatAnswerStatus, type ChatAttachmentLimits, type ChatAttachmentPrecheckRefusal, type ChatBranchSwitchOutcome, type ChatBranchSwitchProblem, type ChatBranchSwitchState, type ChatChoosableModel, ChatComposer, type ChatComposerAltTextOutcome, type ChatComposerAttachment, type ChatComposerAttachments, type ChatComposerAttachmentsLimits, type ChatComposerAttachmentsOptions, type ChatComposerAttachmentsState, type ChatComposerLimits, type ChatComposerPhase, type ChatComposerProblem, type ChatComposerProps, type ChatComposerRestore, type ChatComposerSaveAltText, ChatConsentConversation, type ChatConsentConversationProps, type ChatConversationAction, type ChatConversationActionOutcome, type ChatConversationActionPhase, type ChatConversationActionProblem, type ChatConversationActions, type ChatConversationActionsOptions, ChatConversationGate, type ChatConversationGateProps, ChatConversationHeading, type ChatConversationHeadingProps, type ChatConversationLimits, ChatConversationList, type ChatConversationListLimits, type ChatConversationListOptions, type ChatConversationListProps, type ChatConversationListState, type ChatConversationListViewLimits, type ChatConversationOptions, type ChatConversationSection, type ChatConversationState, type ChatConversationWindow, type ChatConversionLimits, type ChatConverterTimeouts, type ChatDiagramFileContext, type ChatDiagramFormat, ChatFrame, type ChatFrameProps, type ChatGoToOutcome, type ChatGoToVia, type ChatHostRefusalCodes, type ChatLayoutColumn, type ChatLayoutColumns, type ChatLayoutPlan, type ChatLayoutRule, type ChatListMessage, type ChatMarkdownConverterFactory, type ChatMediaRecorderLike, type ChatMediaStreamLike, type ChatMessageAuthor, type ChatMessageBranch, type ChatMessageLanding, ChatMessageList, type ChatMessageListLimits, type ChatMessageListProps, type ChatMessageText, type ChatMicrophone, type ChatMicrophoneProblem, type ChatMicrophoneScope, type ChatModelAttachmentFlags, type ChatModels, type ChatModelsOptions, type ChatModelsQuery, type ChatModelsState, type ChatNewConversation, type ChatNewConversationChoice, type ChatNewConversationChoiceOptions, ChatNewConversationChoices, type ChatNewConversationChoicesProps, type ChatNewConversationMessage, type ChatNewConversationOptions, type ChatNewConversationOutcome, type ChatOlderFailure, type ChatPathChangeFailure, type ChatPathChangeProblem, type ChatPathChangeState, type ChatPinnedSide, type ChatPolicyAccess, type ChatPolicyConsentOutcome, type ChatPolicyConsentProblem, ChatPolicyGate, type ChatPolicyGateProps, type ChatPolicyOptions, type ChatPolicyState, type ChatRecording, type ChatRecordingListener, type ChatRecordingRequest, type ChatRecordingStart, type ChatRefusal, type ChatRefusalStatusClass, type ChatRewriteKind, type ChatRewriteOutcome, type ChatRewriteProblem, type ChatRewriteState, type ChatSend, type ChatSendMessage, type ChatSendOptions, type ChatSendOutcome, type ChatSendPathBlock, type ChatSettingsAccess, ChatSettingsForm, type ChatSettingsFormProps, ChatSettingsGate, type ChatSettingsGateProps, type ChatSettingsOptions, type ChatSettingsProblem, type ChatSettingsSaveOutcome, type ChatSettingsState, ChatShownBranchBand, type ChatShownBranchBandProps, ChatTalkFlow, type ChatTalkFlowProps, ChatTalkHeading, type ChatTalkHeadingProps, type ChatWindowPath, assertValidChatHostRefusalCodes, chatAttachmentHasUnreadText, chatAttachmentsRefusedByModel, chatBrowserMicrophone, chatConversationShownRow, chatDeclaredAttachmentKind, chatFilePickerAccept, chatFrameBlockSizePx, chatLayoutPlan, chatLayoutRule, chatModelAttachmentKinds, chatModelTakesKind, chatRefusal, diagramFileName, precheckChatAttachment, useChatComposerAttachments, useChatConversation, useChatConversationActions, useChatConversationCreatedAnnouncer, useChatConversationDeletedAnnouncer, useChatConversationList, useChatModels, useChatNewConversation, useChatNewConversationChoice, useChatPolicy, useChatSend, useChatSettings };