@aiquants/chat 0.2.0 → 0.3.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 +66 -0
  2. package/README.md +195 -16
  3. package/dist/{ChatAnswerHtml-NBI6KBTM.js → ChatAnswerHtml-UNWOOMYK.js} +1 -1
  4. package/dist/{chunk-NKHHXW42.js → chunk-44WLZMPZ.js} +1 -1
  5. package/dist/chunk-5MWD2PSY.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 +207 -24
  24. package/dist/react.d.ts +207 -24
  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 +5 -5
  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";
@@ -269,6 +269,7 @@ type ChatComposerProps = {
269
269
  readonly value: string;
270
270
  readonly onValueChange: (value: string) => void;
271
271
  readonly phase: ChatComposerPhase;
272
+ readonly runElsewhere: boolean;
272
273
  readonly onSend: (text: string) => void;
273
274
  readonly onStop: () => void;
274
275
  readonly notice: ChatStreamNotice | null;
@@ -278,9 +279,20 @@ type ChatComposerProps = {
278
279
  readonly limits: ChatComposerLimits;
279
280
  readonly sendKey: ChatVocabulary<"send_keys">;
280
281
  readonly contentBaseUrl: string;
282
+ readonly inputRef: RefObject<HTMLTextAreaElement | null> | null;
281
283
  readonly testId: string;
282
284
  };
283
285
  declare const ChatComposer: (props: ChatComposerProps) => react.JSX.Element;
286
+ type ChatConsentConversationProps = {
287
+ readonly transport: ChatTransport;
288
+ readonly hostRefusalCodes: ChatHostRefusalCodes;
289
+ readonly conversationUid: string;
290
+ readonly onChanged: () => void;
291
+ readonly onDeleted: (conversation: ChatConversation) => void;
292
+ readonly headingLevel: 1 | 2 | 3;
293
+ readonly testId: string;
294
+ };
295
+ declare const ChatConsentConversation: (props: ChatConsentConversationProps) => ReactNode;
284
296
  type ChatTextLanguage = "ja" | "en" | "screen";
285
297
  type ChatMessageAuthor = {
286
298
  readonly role: "user";
@@ -289,16 +301,78 @@ type ChatMessageAuthor = {
289
301
  readonly model: string | null;
290
302
  readonly status: ChatAnswerStatus;
291
303
  };
304
+ type ChatSendOptions = {
305
+ readonly transport: ChatTransport;
306
+ readonly window: ChatConversationWindow;
307
+ readonly hostRefusalCodes: ChatHostRefusalCodes;
308
+ };
309
+ type ChatSendMessage = {
310
+ readonly text: string;
311
+ readonly attachmentIds: readonly string[];
312
+ };
313
+ type ChatSendOutcome = "accepted" | "not-sent";
314
+ type ChatRewriteKind = "edit" | "regenerate";
315
+ type ChatRewriteOutcome = {
316
+ readonly kind: "accepted";
317
+ readonly siblingUid: string;
318
+ } | {
319
+ readonly kind: "not-sent";
320
+ };
321
+ type ChatRewriteProblem = {
322
+ readonly messageUid: string;
323
+ readonly kind: ChatRewriteKind;
324
+ readonly occurrence: number;
325
+ } & ({
326
+ readonly cause: "unreached";
327
+ } | {
328
+ readonly cause: "refused";
329
+ readonly refusal: ChatRefusal;
330
+ } | {
331
+ readonly cause: "incompatible";
332
+ });
333
+ type ChatRewriteState = {
334
+ readonly pending: {
335
+ readonly messageUid: string;
336
+ readonly kind: ChatRewriteKind;
337
+ } | null;
338
+ readonly accepted: {
339
+ readonly messageUid: string;
340
+ readonly kind: ChatRewriteKind;
341
+ readonly siblingUid: string;
342
+ } | null;
343
+ readonly problem: ChatRewriteProblem | null;
344
+ readonly block: "sending" | "writing" | null;
345
+ };
346
+ type ChatSend = {
347
+ readonly phase: ChatComposerPhase;
348
+ readonly problem: ChatComposerProblem | null;
349
+ readonly runElsewhere: boolean;
350
+ readonly sentMessageUid: string | null;
351
+ readonly send: (message: ChatSendMessage) => Promise<ChatSendOutcome>;
352
+ readonly edit: (messageUid: string, message: ChatSendMessage) => Promise<ChatRewriteOutcome>;
353
+ readonly regenerate: (messageUid: string) => Promise<ChatRewriteOutcome>;
354
+ readonly rewrite: ChatRewriteState;
355
+ readonly stop: () => void;
356
+ };
357
+ declare const useChatSend: (options: ChatSendOptions) => ChatSend;
292
358
  type ChatListMessage = {
293
359
  readonly messageUid: string;
294
360
  readonly author: ChatMessageAuthor;
295
361
  readonly createdAt: string;
296
362
  readonly text: ChatMessageText;
363
+ readonly sourceText: string;
297
364
  readonly marks: number;
298
365
  readonly language: ChatTextLanguage;
299
366
  readonly contextCutBefore: boolean;
367
+ readonly branch: ChatMessageBranch | null;
300
368
  };
301
- type ChatMessageListLimits = Readonly<Pick<Record<ChatLimitKey, number>, "CHAT_RENDER_LIST_OVERSCAN_ROWS">>;
369
+ type ChatMessageBranch = {
370
+ readonly position: number;
371
+ readonly count: number;
372
+ readonly previous: string | null;
373
+ readonly next: string | null;
374
+ };
375
+ type ChatMessageListLimits = Readonly<Pick<Record<ChatLimitKey, number>, "CHAT_RENDER_LIST_OVERSCAN_ROWS" | "CHAT_USER_MESSAGE_MAX_CHARS">>;
302
376
  type ChatMessageListProps = {
303
377
  readonly messages: readonly ChatListMessage[];
304
378
  readonly notificationLevel: ChatVocabulary<"notification_levels">;
@@ -312,9 +386,16 @@ type ChatMessageListProps = {
312
386
  readonly onLoadOlder: () => void;
313
387
  readonly olderReading: boolean;
314
388
  readonly olderFailure: ChatOlderFailure | null;
389
+ readonly onSwitchBranch: (messageUid: string, siblingUid: string) => Promise<ChatBranchSwitchOutcome>;
390
+ readonly branchSwitch: ChatBranchSwitchState;
391
+ readonly onEditMessage: (messageUid: string, message: ChatSendMessage) => Promise<ChatRewriteOutcome>;
392
+ readonly onRegenerateMessage: (messageUid: string) => Promise<ChatRewriteOutcome>;
393
+ readonly rewrite: ChatRewriteState;
394
+ readonly messageActionsDisplay: ChatVocabulary<"message_actions_displays">;
395
+ readonly sendKey: ChatVocabulary<"send_keys">;
315
396
  readonly testId: string;
316
397
  };
317
- declare const ChatMessageList: ({ messages, notificationLevel, followScroll, reduceMotion, sentMessageUid, labelledBy, headingLevel, limits, older, onLoadOlder, olderReading, olderFailure, testId }: ChatMessageListProps) => react.JSX.Element;
398
+ declare const ChatMessageList: ({ messages, notificationLevel, followScroll, reduceMotion, sentMessageUid, labelledBy, headingLevel, limits, older, onLoadOlder, olderReading, olderFailure, onSwitchBranch, branchSwitch, onEditMessage, onRegenerateMessage, rewrite, messageActionsDisplay, sendKey, testId, }: ChatMessageListProps) => react.JSX.Element;
318
399
  type ChatConversationOptions = {
319
400
  readonly transport: ChatTransport;
320
401
  readonly streams: ChatRunStreams;
@@ -346,7 +427,29 @@ type ChatConversationWindow = {
346
427
  readonly loadOlder: () => void;
347
428
  readonly olderReading: boolean;
348
429
  readonly olderFailure: ChatOlderFailure | null;
430
+ readonly switchBranch: (messageUid: string, siblingUid: string) => Promise<ChatBranchSwitchOutcome>;
431
+ readonly branchSwitch: ChatBranchSwitchState;
432
+ readonly runElsewhere: boolean;
433
+ };
434
+ type ChatBranchSwitchState = {
435
+ readonly switching: {
436
+ readonly messageUid: string;
437
+ readonly siblingUid: string;
438
+ } | null;
439
+ readonly problem: ChatBranchSwitchProblem | null;
349
440
  };
441
+ type ChatBranchSwitchProblem = {
442
+ readonly messageUid: string;
443
+ readonly occurrence: number;
444
+ } & ({
445
+ readonly cause: "unreached";
446
+ } | {
447
+ readonly cause: "refused";
448
+ readonly refusal: ChatRefusal;
449
+ } | {
450
+ readonly cause: "incompatible";
451
+ });
452
+ type ChatBranchSwitchOutcome = "switched" | "not-switched";
350
453
  type ChatOlderFailure = {
351
454
  readonly cause: "unreached" | "incompatible";
352
455
  readonly occurrence: number;
@@ -360,6 +463,45 @@ type ChatConversationGateProps = {
360
463
  readonly testId: string;
361
464
  };
362
465
  declare const ChatConversationGate: ({ conversation, onReopen, focusAfterOpen, children, testId }: ChatConversationGateProps) => ReactNode;
466
+ type ChatConversationActionsOptions = {
467
+ readonly transport: ChatTransport;
468
+ readonly window: ChatConversationWindow;
469
+ readonly hostRefusalCodes: ChatHostRefusalCodes;
470
+ readonly onChanged: () => void;
471
+ readonly onDeleted: (conversation: ChatConversation) => void;
472
+ };
473
+ type ChatConversationAction = "rename" | "pin" | "delete";
474
+ type ChatConversationActionPhase = "ready" | "renaming" | "pinning" | "stopping" | "deleting";
475
+ type ChatConversationActionProblem = {
476
+ readonly action: ChatConversationAction;
477
+ readonly occurrence: number;
478
+ } & ({
479
+ readonly cause: "unreached";
480
+ } | {
481
+ readonly cause: "refused";
482
+ readonly refusal: ChatRefusal;
483
+ } | {
484
+ readonly cause: "incompatible";
485
+ });
486
+ type ChatConversationActionOutcome = "done" | "not-done";
487
+ type ChatConversationActions = {
488
+ readonly phase: ChatConversationActionPhase;
489
+ readonly problem: ChatConversationActionProblem | null;
490
+ readonly landed: ChatConversation | null;
491
+ readonly rename: (title: string) => Promise<ChatConversationActionOutcome>;
492
+ readonly setPinned: (pinned: boolean) => Promise<ChatConversationActionOutcome>;
493
+ readonly remove: (signal: AbortSignal) => Promise<ChatConversationActionOutcome>;
494
+ };
495
+ declare const chatConversationShownRow: (row: ChatConversation, landed: ChatConversation | null) => ChatConversation;
496
+ declare const useChatConversationActions: (options: ChatConversationActionsOptions) => ChatConversationActions;
497
+ type ChatConversationHeadingProps = {
498
+ readonly conversation: ChatConversation;
499
+ readonly actions: ChatConversationActions;
500
+ readonly level: 1 | 2 | 3;
501
+ readonly labelId: string;
502
+ readonly testId: string;
503
+ };
504
+ declare const ChatConversationHeading: ({ conversation, actions, level, labelId, testId }: ChatConversationHeadingProps) => react.JSX.Element;
363
505
  type ChatConversationListLimits = {
364
506
  readonly CHAT_TITLE_SEARCH_PAUSE_MS: number;
365
507
  };
@@ -487,6 +629,64 @@ type ChatNewConversationChoicesProps = {
487
629
  readonly testId: string;
488
630
  };
489
631
  declare const ChatNewConversationChoices: ({ choice, phase, testId }: ChatNewConversationChoicesProps) => react.JSX.Element;
632
+ type ChatPolicyOptions = {
633
+ readonly transport: ChatTransport;
634
+ readonly hostRefusalCodes: ChatHostRefusalCodes;
635
+ };
636
+ type ChatPolicyState = {
637
+ readonly kind: "reading";
638
+ } | {
639
+ readonly kind: "consented";
640
+ readonly policy: Extract<ChatPolicy, {
641
+ readonly consent: "current";
642
+ }>;
643
+ } | {
644
+ readonly kind: "consent-needed";
645
+ readonly policy: Exclude<ChatPolicy, {
646
+ readonly consent: "current";
647
+ }>;
648
+ } | {
649
+ readonly kind: "not-published";
650
+ readonly retry: () => void;
651
+ } | {
652
+ readonly kind: "refused";
653
+ readonly refusal: ChatRefusal;
654
+ readonly retry: (() => void) | null;
655
+ } | {
656
+ readonly kind: "failed";
657
+ readonly cause: "unreached" | "incompatible";
658
+ readonly retry: () => void;
659
+ };
660
+ type ChatPolicyConsentProblem = {
661
+ readonly occurrence: number;
662
+ } & ({
663
+ readonly cause: "superseded";
664
+ } | {
665
+ readonly cause: "unreached";
666
+ } | {
667
+ readonly cause: "refused";
668
+ readonly refusal: ChatRefusal;
669
+ } | {
670
+ readonly cause: "incompatible";
671
+ });
672
+ type ChatPolicyConsentOutcome = "consented" | "not-consented";
673
+ type ChatPolicyAccess = {
674
+ readonly state: ChatPolicyState;
675
+ readonly consenting: boolean;
676
+ readonly problem: ChatPolicyConsentProblem | null;
677
+ readonly consent: () => Promise<ChatPolicyConsentOutcome>;
678
+ readonly transport: ChatTransport;
679
+ };
680
+ declare const useChatPolicy: (options: ChatPolicyOptions) => ChatPolicyAccess;
681
+ type ChatPolicyGateProps = {
682
+ readonly policy: ChatPolicyAccess;
683
+ readonly focusAfterConsent: RefObject<HTMLElement | null>;
684
+ readonly aside: ReactNode;
685
+ readonly children: () => ReactNode;
686
+ readonly headingLevel: 1 | 2 | 3;
687
+ readonly testId: string;
688
+ };
689
+ declare const ChatPolicyGate: ({ policy, focusAfterConsent, aside, children, headingLevel, testId }: ChatPolicyGateProps) => ReactNode;
490
690
  type ChatSettingsOptions = {
491
691
  readonly transport: ChatTransport;
492
692
  readonly hostRefusalCodes: ChatHostRefusalCodes;
@@ -581,22 +781,5 @@ type ChatComposerAttachmentsState = {
581
781
  };
582
782
  declare const useChatComposerAttachments: (options: ChatComposerAttachmentsOptions) => ChatComposerAttachmentsState;
583
783
  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 };
784
+ declare const useChatConversationDeletedAnnouncer: () => ((conversation: Pick<ChatConversation, "title">) => void);
785
+ 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 ChatHostRefusalCodes, type ChatLayoutColumn, type ChatLayoutColumns, type ChatLayoutPlan, type ChatLayoutRule, type ChatListMessage, type ChatMarkdownConverterFactory, type ChatMediaRecorderLike, type ChatMediaStreamLike, type ChatMessageAuthor, type ChatMessageBranch, 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 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 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, chatConversationShownRow, chatDeclaredAttachmentKind, chatFilePickerAccept, chatFrameBlockSizePx, chatLayoutPlan, chatLayoutRule, chatModelAttachmentKinds, chatModelTakesKind, chatRefusal, diagramFileName, precheckChatAttachment, useChatComposerAttachments, useChatConversation, useChatConversationActions, useChatConversationCreatedAnnouncer, useChatConversationDeletedAnnouncer, useChatConversationList, useChatModels, useChatNewConversation, useChatNewConversationChoice, useChatPolicy, useChatSend, useChatSettings };
package/dist/react.d.ts 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.js";
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.js";
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-7KHfaNOq.js";
8
- import { e as ChatTransport } from "./transport-Clvkp7mW.js";
7
+ import { C as ChatStreamNotice, n as ChatStreamNoticeAction, e as ChatRunStreams } from "./runStream-Wn5F3RKe.js";
8
+ import { e as ChatTransport } from "./transport-DlhniH4C.js";
9
9
  import { PagedState } from "@aiquants/console-ui";
10
10
  import "@aiquants/sse";
11
11
  import "@aiquants/sse/client";
@@ -269,6 +269,7 @@ type ChatComposerProps = {
269
269
  readonly value: string;
270
270
  readonly onValueChange: (value: string) => void;
271
271
  readonly phase: ChatComposerPhase;
272
+ readonly runElsewhere: boolean;
272
273
  readonly onSend: (text: string) => void;
273
274
  readonly onStop: () => void;
274
275
  readonly notice: ChatStreamNotice | null;
@@ -278,9 +279,20 @@ type ChatComposerProps = {
278
279
  readonly limits: ChatComposerLimits;
279
280
  readonly sendKey: ChatVocabulary<"send_keys">;
280
281
  readonly contentBaseUrl: string;
282
+ readonly inputRef: RefObject<HTMLTextAreaElement | null> | null;
281
283
  readonly testId: string;
282
284
  };
283
285
  declare const ChatComposer: (props: ChatComposerProps) => react.JSX.Element;
286
+ type ChatConsentConversationProps = {
287
+ readonly transport: ChatTransport;
288
+ readonly hostRefusalCodes: ChatHostRefusalCodes;
289
+ readonly conversationUid: string;
290
+ readonly onChanged: () => void;
291
+ readonly onDeleted: (conversation: ChatConversation) => void;
292
+ readonly headingLevel: 1 | 2 | 3;
293
+ readonly testId: string;
294
+ };
295
+ declare const ChatConsentConversation: (props: ChatConsentConversationProps) => ReactNode;
284
296
  type ChatTextLanguage = "ja" | "en" | "screen";
285
297
  type ChatMessageAuthor = {
286
298
  readonly role: "user";
@@ -289,16 +301,78 @@ type ChatMessageAuthor = {
289
301
  readonly model: string | null;
290
302
  readonly status: ChatAnswerStatus;
291
303
  };
304
+ type ChatSendOptions = {
305
+ readonly transport: ChatTransport;
306
+ readonly window: ChatConversationWindow;
307
+ readonly hostRefusalCodes: ChatHostRefusalCodes;
308
+ };
309
+ type ChatSendMessage = {
310
+ readonly text: string;
311
+ readonly attachmentIds: readonly string[];
312
+ };
313
+ type ChatSendOutcome = "accepted" | "not-sent";
314
+ type ChatRewriteKind = "edit" | "regenerate";
315
+ type ChatRewriteOutcome = {
316
+ readonly kind: "accepted";
317
+ readonly siblingUid: string;
318
+ } | {
319
+ readonly kind: "not-sent";
320
+ };
321
+ type ChatRewriteProblem = {
322
+ readonly messageUid: string;
323
+ readonly kind: ChatRewriteKind;
324
+ readonly occurrence: number;
325
+ } & ({
326
+ readonly cause: "unreached";
327
+ } | {
328
+ readonly cause: "refused";
329
+ readonly refusal: ChatRefusal;
330
+ } | {
331
+ readonly cause: "incompatible";
332
+ });
333
+ type ChatRewriteState = {
334
+ readonly pending: {
335
+ readonly messageUid: string;
336
+ readonly kind: ChatRewriteKind;
337
+ } | null;
338
+ readonly accepted: {
339
+ readonly messageUid: string;
340
+ readonly kind: ChatRewriteKind;
341
+ readonly siblingUid: string;
342
+ } | null;
343
+ readonly problem: ChatRewriteProblem | null;
344
+ readonly block: "sending" | "writing" | null;
345
+ };
346
+ type ChatSend = {
347
+ readonly phase: ChatComposerPhase;
348
+ readonly problem: ChatComposerProblem | null;
349
+ readonly runElsewhere: boolean;
350
+ readonly sentMessageUid: string | null;
351
+ readonly send: (message: ChatSendMessage) => Promise<ChatSendOutcome>;
352
+ readonly edit: (messageUid: string, message: ChatSendMessage) => Promise<ChatRewriteOutcome>;
353
+ readonly regenerate: (messageUid: string) => Promise<ChatRewriteOutcome>;
354
+ readonly rewrite: ChatRewriteState;
355
+ readonly stop: () => void;
356
+ };
357
+ declare const useChatSend: (options: ChatSendOptions) => ChatSend;
292
358
  type ChatListMessage = {
293
359
  readonly messageUid: string;
294
360
  readonly author: ChatMessageAuthor;
295
361
  readonly createdAt: string;
296
362
  readonly text: ChatMessageText;
363
+ readonly sourceText: string;
297
364
  readonly marks: number;
298
365
  readonly language: ChatTextLanguage;
299
366
  readonly contextCutBefore: boolean;
367
+ readonly branch: ChatMessageBranch | null;
300
368
  };
301
- type ChatMessageListLimits = Readonly<Pick<Record<ChatLimitKey, number>, "CHAT_RENDER_LIST_OVERSCAN_ROWS">>;
369
+ type ChatMessageBranch = {
370
+ readonly position: number;
371
+ readonly count: number;
372
+ readonly previous: string | null;
373
+ readonly next: string | null;
374
+ };
375
+ type ChatMessageListLimits = Readonly<Pick<Record<ChatLimitKey, number>, "CHAT_RENDER_LIST_OVERSCAN_ROWS" | "CHAT_USER_MESSAGE_MAX_CHARS">>;
302
376
  type ChatMessageListProps = {
303
377
  readonly messages: readonly ChatListMessage[];
304
378
  readonly notificationLevel: ChatVocabulary<"notification_levels">;
@@ -312,9 +386,16 @@ type ChatMessageListProps = {
312
386
  readonly onLoadOlder: () => void;
313
387
  readonly olderReading: boolean;
314
388
  readonly olderFailure: ChatOlderFailure | null;
389
+ readonly onSwitchBranch: (messageUid: string, siblingUid: string) => Promise<ChatBranchSwitchOutcome>;
390
+ readonly branchSwitch: ChatBranchSwitchState;
391
+ readonly onEditMessage: (messageUid: string, message: ChatSendMessage) => Promise<ChatRewriteOutcome>;
392
+ readonly onRegenerateMessage: (messageUid: string) => Promise<ChatRewriteOutcome>;
393
+ readonly rewrite: ChatRewriteState;
394
+ readonly messageActionsDisplay: ChatVocabulary<"message_actions_displays">;
395
+ readonly sendKey: ChatVocabulary<"send_keys">;
315
396
  readonly testId: string;
316
397
  };
317
- declare const ChatMessageList: ({ messages, notificationLevel, followScroll, reduceMotion, sentMessageUid, labelledBy, headingLevel, limits, older, onLoadOlder, olderReading, olderFailure, testId }: ChatMessageListProps) => react.JSX.Element;
398
+ declare const ChatMessageList: ({ messages, notificationLevel, followScroll, reduceMotion, sentMessageUid, labelledBy, headingLevel, limits, older, onLoadOlder, olderReading, olderFailure, onSwitchBranch, branchSwitch, onEditMessage, onRegenerateMessage, rewrite, messageActionsDisplay, sendKey, testId, }: ChatMessageListProps) => react.JSX.Element;
318
399
  type ChatConversationOptions = {
319
400
  readonly transport: ChatTransport;
320
401
  readonly streams: ChatRunStreams;
@@ -346,7 +427,29 @@ type ChatConversationWindow = {
346
427
  readonly loadOlder: () => void;
347
428
  readonly olderReading: boolean;
348
429
  readonly olderFailure: ChatOlderFailure | null;
430
+ readonly switchBranch: (messageUid: string, siblingUid: string) => Promise<ChatBranchSwitchOutcome>;
431
+ readonly branchSwitch: ChatBranchSwitchState;
432
+ readonly runElsewhere: boolean;
433
+ };
434
+ type ChatBranchSwitchState = {
435
+ readonly switching: {
436
+ readonly messageUid: string;
437
+ readonly siblingUid: string;
438
+ } | null;
439
+ readonly problem: ChatBranchSwitchProblem | null;
349
440
  };
441
+ type ChatBranchSwitchProblem = {
442
+ readonly messageUid: string;
443
+ readonly occurrence: number;
444
+ } & ({
445
+ readonly cause: "unreached";
446
+ } | {
447
+ readonly cause: "refused";
448
+ readonly refusal: ChatRefusal;
449
+ } | {
450
+ readonly cause: "incompatible";
451
+ });
452
+ type ChatBranchSwitchOutcome = "switched" | "not-switched";
350
453
  type ChatOlderFailure = {
351
454
  readonly cause: "unreached" | "incompatible";
352
455
  readonly occurrence: number;
@@ -360,6 +463,45 @@ type ChatConversationGateProps = {
360
463
  readonly testId: string;
361
464
  };
362
465
  declare const ChatConversationGate: ({ conversation, onReopen, focusAfterOpen, children, testId }: ChatConversationGateProps) => ReactNode;
466
+ type ChatConversationActionsOptions = {
467
+ readonly transport: ChatTransport;
468
+ readonly window: ChatConversationWindow;
469
+ readonly hostRefusalCodes: ChatHostRefusalCodes;
470
+ readonly onChanged: () => void;
471
+ readonly onDeleted: (conversation: ChatConversation) => void;
472
+ };
473
+ type ChatConversationAction = "rename" | "pin" | "delete";
474
+ type ChatConversationActionPhase = "ready" | "renaming" | "pinning" | "stopping" | "deleting";
475
+ type ChatConversationActionProblem = {
476
+ readonly action: ChatConversationAction;
477
+ readonly occurrence: number;
478
+ } & ({
479
+ readonly cause: "unreached";
480
+ } | {
481
+ readonly cause: "refused";
482
+ readonly refusal: ChatRefusal;
483
+ } | {
484
+ readonly cause: "incompatible";
485
+ });
486
+ type ChatConversationActionOutcome = "done" | "not-done";
487
+ type ChatConversationActions = {
488
+ readonly phase: ChatConversationActionPhase;
489
+ readonly problem: ChatConversationActionProblem | null;
490
+ readonly landed: ChatConversation | null;
491
+ readonly rename: (title: string) => Promise<ChatConversationActionOutcome>;
492
+ readonly setPinned: (pinned: boolean) => Promise<ChatConversationActionOutcome>;
493
+ readonly remove: (signal: AbortSignal) => Promise<ChatConversationActionOutcome>;
494
+ };
495
+ declare const chatConversationShownRow: (row: ChatConversation, landed: ChatConversation | null) => ChatConversation;
496
+ declare const useChatConversationActions: (options: ChatConversationActionsOptions) => ChatConversationActions;
497
+ type ChatConversationHeadingProps = {
498
+ readonly conversation: ChatConversation;
499
+ readonly actions: ChatConversationActions;
500
+ readonly level: 1 | 2 | 3;
501
+ readonly labelId: string;
502
+ readonly testId: string;
503
+ };
504
+ declare const ChatConversationHeading: ({ conversation, actions, level, labelId, testId }: ChatConversationHeadingProps) => react.JSX.Element;
363
505
  type ChatConversationListLimits = {
364
506
  readonly CHAT_TITLE_SEARCH_PAUSE_MS: number;
365
507
  };
@@ -487,6 +629,64 @@ type ChatNewConversationChoicesProps = {
487
629
  readonly testId: string;
488
630
  };
489
631
  declare const ChatNewConversationChoices: ({ choice, phase, testId }: ChatNewConversationChoicesProps) => react.JSX.Element;
632
+ type ChatPolicyOptions = {
633
+ readonly transport: ChatTransport;
634
+ readonly hostRefusalCodes: ChatHostRefusalCodes;
635
+ };
636
+ type ChatPolicyState = {
637
+ readonly kind: "reading";
638
+ } | {
639
+ readonly kind: "consented";
640
+ readonly policy: Extract<ChatPolicy, {
641
+ readonly consent: "current";
642
+ }>;
643
+ } | {
644
+ readonly kind: "consent-needed";
645
+ readonly policy: Exclude<ChatPolicy, {
646
+ readonly consent: "current";
647
+ }>;
648
+ } | {
649
+ readonly kind: "not-published";
650
+ readonly retry: () => void;
651
+ } | {
652
+ readonly kind: "refused";
653
+ readonly refusal: ChatRefusal;
654
+ readonly retry: (() => void) | null;
655
+ } | {
656
+ readonly kind: "failed";
657
+ readonly cause: "unreached" | "incompatible";
658
+ readonly retry: () => void;
659
+ };
660
+ type ChatPolicyConsentProblem = {
661
+ readonly occurrence: number;
662
+ } & ({
663
+ readonly cause: "superseded";
664
+ } | {
665
+ readonly cause: "unreached";
666
+ } | {
667
+ readonly cause: "refused";
668
+ readonly refusal: ChatRefusal;
669
+ } | {
670
+ readonly cause: "incompatible";
671
+ });
672
+ type ChatPolicyConsentOutcome = "consented" | "not-consented";
673
+ type ChatPolicyAccess = {
674
+ readonly state: ChatPolicyState;
675
+ readonly consenting: boolean;
676
+ readonly problem: ChatPolicyConsentProblem | null;
677
+ readonly consent: () => Promise<ChatPolicyConsentOutcome>;
678
+ readonly transport: ChatTransport;
679
+ };
680
+ declare const useChatPolicy: (options: ChatPolicyOptions) => ChatPolicyAccess;
681
+ type ChatPolicyGateProps = {
682
+ readonly policy: ChatPolicyAccess;
683
+ readonly focusAfterConsent: RefObject<HTMLElement | null>;
684
+ readonly aside: ReactNode;
685
+ readonly children: () => ReactNode;
686
+ readonly headingLevel: 1 | 2 | 3;
687
+ readonly testId: string;
688
+ };
689
+ declare const ChatPolicyGate: ({ policy, focusAfterConsent, aside, children, headingLevel, testId }: ChatPolicyGateProps) => ReactNode;
490
690
  type ChatSettingsOptions = {
491
691
  readonly transport: ChatTransport;
492
692
  readonly hostRefusalCodes: ChatHostRefusalCodes;
@@ -581,22 +781,5 @@ type ChatComposerAttachmentsState = {
581
781
  };
582
782
  declare const useChatComposerAttachments: (options: ChatComposerAttachmentsOptions) => ChatComposerAttachmentsState;
583
783
  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 };
784
+ declare const useChatConversationDeletedAnnouncer: () => ((conversation: Pick<ChatConversation, "title">) => void);
785
+ 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 ChatHostRefusalCodes, type ChatLayoutColumn, type ChatLayoutColumns, type ChatLayoutPlan, type ChatLayoutRule, type ChatListMessage, type ChatMarkdownConverterFactory, type ChatMediaRecorderLike, type ChatMediaStreamLike, type ChatMessageAuthor, type ChatMessageBranch, 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 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 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, chatConversationShownRow, chatDeclaredAttachmentKind, chatFilePickerAccept, chatFrameBlockSizePx, chatLayoutPlan, chatLayoutRule, chatModelAttachmentKinds, chatModelTakesKind, chatRefusal, diagramFileName, precheckChatAttachment, useChatComposerAttachments, useChatConversation, useChatConversationActions, useChatConversationCreatedAnnouncer, useChatConversationDeletedAnnouncer, useChatConversationList, useChatModels, useChatNewConversation, useChatNewConversationChoice, useChatPolicy, useChatSend, useChatSettings };