@nexface/chat 0.1.13-alpha.2 → 0.1.13-alpha.3

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 (115) hide show
  1. package/dist/assistant-attachments.js +0 -1
  2. package/dist/assistant-components.js +15 -8
  3. package/dist/assistant-runtime.d.ts +5 -1
  4. package/dist/assistant-runtime.js +8 -5
  5. package/dist/attachments.js +0 -1
  6. package/dist/client.js +0 -1
  7. package/dist/config.js +0 -1
  8. package/dist/default-chat.d.ts +1 -1
  9. package/dist/default-chat.js +614 -347
  10. package/dist/errors.js +0 -1
  11. package/dist/index.js +0 -1
  12. package/dist/messages.js +0 -1
  13. package/dist/page-confirmation.js +0 -1
  14. package/dist/protocol-messages.js +0 -1
  15. package/dist/protocol-response.js +0 -1
  16. package/dist/react.js +0 -1
  17. package/dist/shared/errors.js +0 -1
  18. package/dist/shared/runtime-controller.js +0 -1
  19. package/dist/shared/runtime-execution.js +0 -1
  20. package/dist/shared/schema.js +0 -1
  21. package/dist/storage.js +0 -1
  22. package/dist/styles.css +70 -2
  23. package/dist/tool-result.js +0 -1
  24. package/dist/types.d.ts +2 -0
  25. package/dist/types.js +0 -1
  26. package/dist/ui/attachment.aui.js +0 -1
  27. package/dist/ui/avatar.js +0 -1
  28. package/dist/ui/button.js +0 -1
  29. package/dist/ui/code-block.js +0 -1
  30. package/dist/ui/collapsible.js +0 -1
  31. package/dist/ui/composer-voice.d.ts +3 -0
  32. package/dist/ui/composer-voice.js +17 -0
  33. package/dist/ui/dialog.js +0 -1
  34. package/dist/ui/dropdown-menu.js +0 -1
  35. package/dist/ui/home-demo/action-bar.js +0 -1
  36. package/dist/ui/home-demo/composer.js +1 -2
  37. package/dist/ui/home-demo/greeting.js +0 -1
  38. package/dist/ui/home-demo/messages.js +0 -1
  39. package/dist/ui/home-demo/styles.js +0 -1
  40. package/dist/ui/home-demo/suggestions.js +0 -1
  41. package/dist/ui/home-demo/surfaces.js +0 -1
  42. package/dist/ui/home-demo/thread.js +0 -1
  43. package/dist/ui/home-demo/trace-line.js +0 -1
  44. package/dist/ui/home-demo/trace.js +0 -1
  45. package/dist/ui/home-demo/type.js +0 -1
  46. package/dist/ui/input.js +0 -1
  47. package/dist/ui/markdown-text.js +0 -1
  48. package/dist/ui/reasoning.aui.js +0 -1
  49. package/dist/ui/reasoning.js +0 -1
  50. package/dist/ui/surface.js +0 -1
  51. package/dist/ui/thread-list.aui.js +2 -3
  52. package/dist/ui/tool-group.aui.js +0 -1
  53. package/dist/ui/tooltip-icon-button.js +0 -1
  54. package/dist/ui/tooltip.js +0 -1
  55. package/dist/ui/use-attachment-src.js +0 -1
  56. package/dist/ui/use-copy-to-clipboard.js +0 -1
  57. package/dist/ui/utils.js +0 -1
  58. package/dist/use-next-message.js +0 -1
  59. package/dist/voice/types.d.ts +31 -0
  60. package/dist/voice/types.js +1 -0
  61. package/dist/voice/use-voice.d.ts +23 -0
  62. package/dist/voice/use-voice.js +156 -0
  63. package/package.json +8 -4
  64. package/dist/assistant-attachments.js.map +0 -1
  65. package/dist/assistant-components.js.map +0 -1
  66. package/dist/assistant-runtime.js.map +0 -1
  67. package/dist/attachments.js.map +0 -1
  68. package/dist/client.js.map +0 -1
  69. package/dist/config.js.map +0 -1
  70. package/dist/default-chat.js.map +0 -7
  71. package/dist/errors.js.map +0 -1
  72. package/dist/index.js.map +0 -1
  73. package/dist/messages.js.map +0 -1
  74. package/dist/page-confirmation.js.map +0 -1
  75. package/dist/protocol-messages.js.map +0 -1
  76. package/dist/protocol-response.js.map +0 -1
  77. package/dist/react.js.map +0 -1
  78. package/dist/shared/errors.js.map +0 -1
  79. package/dist/shared/runtime-controller.js.map +0 -1
  80. package/dist/shared/runtime-execution.js.map +0 -1
  81. package/dist/shared/schema.js.map +0 -1
  82. package/dist/storage.js.map +0 -1
  83. package/dist/tool-result.js.map +0 -1
  84. package/dist/types.js.map +0 -1
  85. package/dist/ui/attachment.aui.js.map +0 -1
  86. package/dist/ui/avatar.js.map +0 -1
  87. package/dist/ui/button.js.map +0 -1
  88. package/dist/ui/code-block.js.map +0 -1
  89. package/dist/ui/collapsible.js.map +0 -1
  90. package/dist/ui/dialog.js.map +0 -1
  91. package/dist/ui/dropdown-menu.js.map +0 -1
  92. package/dist/ui/home-demo/action-bar.js.map +0 -1
  93. package/dist/ui/home-demo/composer.js.map +0 -1
  94. package/dist/ui/home-demo/greeting.js.map +0 -1
  95. package/dist/ui/home-demo/messages.js.map +0 -1
  96. package/dist/ui/home-demo/styles.js.map +0 -1
  97. package/dist/ui/home-demo/suggestions.js.map +0 -1
  98. package/dist/ui/home-demo/surfaces.js.map +0 -1
  99. package/dist/ui/home-demo/thread.js.map +0 -1
  100. package/dist/ui/home-demo/trace-line.js.map +0 -1
  101. package/dist/ui/home-demo/trace.js.map +0 -1
  102. package/dist/ui/home-demo/type.js.map +0 -1
  103. package/dist/ui/input.js.map +0 -1
  104. package/dist/ui/markdown-text.js.map +0 -1
  105. package/dist/ui/reasoning.aui.js.map +0 -1
  106. package/dist/ui/reasoning.js.map +0 -1
  107. package/dist/ui/surface.js.map +0 -1
  108. package/dist/ui/thread-list.aui.js.map +0 -1
  109. package/dist/ui/tool-group.aui.js.map +0 -1
  110. package/dist/ui/tooltip-icon-button.js.map +0 -1
  111. package/dist/ui/tooltip.js.map +0 -1
  112. package/dist/ui/use-attachment-src.js.map +0 -1
  113. package/dist/ui/use-copy-to-clipboard.js.map +0 -1
  114. package/dist/ui/utils.js.map +0 -1
  115. package/dist/use-next-message.js.map +0 -1
@@ -13741,6 +13741,36 @@ var useComposerCancel = () => {
13741
13741
  return t1;
13742
13742
  };
13743
13743
 
13744
+ // ../../node_modules/.pnpm/@assistant-ui+core@0.3.20_@assistant-ui+store@0.3.14_@assistant-ui+tap@0.9.18_@types+re_dee34b6e359fd521e7d8189e1205a377/node_modules/@assistant-ui/core/dist/react/primitive-hooks/useComposerDictate.js
13745
+ var useComposerDictate = () => {
13746
+ const $ = c(5);
13747
+ const aui = useAui();
13748
+ const disabled = useAuiState(_temp18);
13749
+ let t0;
13750
+ if ($[0] !== aui) {
13751
+ t0 = () => {
13752
+ aui.composer.startDictation();
13753
+ };
13754
+ $[0] = aui;
13755
+ $[1] = t0;
13756
+ } else t0 = $[1];
13757
+ const startDictation = t0;
13758
+ let t1;
13759
+ if ($[2] !== disabled || $[3] !== startDictation) {
13760
+ t1 = {
13761
+ startDictation,
13762
+ disabled
13763
+ };
13764
+ $[2] = disabled;
13765
+ $[3] = startDictation;
13766
+ $[4] = t1;
13767
+ } else t1 = $[4];
13768
+ return t1;
13769
+ };
13770
+ function _temp18(s) {
13771
+ return s.composer.dictation != null || !s.thread.capabilities.dictation || !s.composer.isEditing;
13772
+ }
13773
+
13744
13774
  // ../../node_modules/.pnpm/@assistant-ui+core@0.3.20_@assistant-ui+store@0.3.14_@assistant-ui+tap@0.9.18_@types+re_dee34b6e359fd521e7d8189e1205a377/node_modules/@assistant-ui/core/dist/react/primitive-hooks/useActionBarCopy.js
13745
13775
  var useActionBarCopy = (t0) => {
13746
13776
  const $ = c(15);
@@ -13754,7 +13784,7 @@ var useActionBarCopy = (t0) => {
13754
13784
  const copiedDuration = t2 === void 0 ? 3e3 : t2;
13755
13785
  const aui = useAui();
13756
13786
  const disabled = useAuiState(actionBarCopyDisabled);
13757
- const isCopied = useAuiState(_temp18);
13787
+ const isCopied = useAuiState(_temp19);
13758
13788
  const isEditing = useAuiState(_temp210);
13759
13789
  const composerValue = useAuiState(_temp37);
13760
13790
  const copiedTimerRef = useRef3(void 0);
@@ -13824,7 +13854,7 @@ var useActionBarCopy = (t0) => {
13824
13854
  } else t7 = $[14];
13825
13855
  return t7;
13826
13856
  };
13827
- function _temp18(s) {
13857
+ function _temp19(s) {
13828
13858
  return s.message.isCopied;
13829
13859
  }
13830
13860
  function _temp210(s_0) {
@@ -13894,7 +13924,7 @@ var useSuggestionTrigger = (t0) => {
13894
13924
  } else if (clearComposer) aui.composer.setText(prompt);
13895
13925
  else {
13896
13926
  const currentText = aui.composer.getState().text;
13897
- aui.composer.setText([currentText, prompt].filter(_temp19).join(" "));
13927
+ aui.composer.setText([currentText, prompt].filter(_temp20).join(" "));
13898
13928
  }
13899
13929
  };
13900
13930
  $[2] = aui;
@@ -13916,7 +13946,7 @@ var useSuggestionTrigger = (t0) => {
13916
13946
  } else t4 = $[9];
13917
13947
  return t4;
13918
13948
  };
13919
- function _temp19(part) {
13949
+ function _temp20(part) {
13920
13950
  return part.trim();
13921
13951
  }
13922
13952
 
@@ -13987,7 +14017,7 @@ var splitLocalRuntimeOptions = (options2) => {
13987
14017
  };
13988
14018
  };
13989
14019
 
13990
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/context/react/utils/createContextHook.js
14020
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/context/react/utils/createContextHook.js
13991
14021
  function createContextHook(context, providerName) {
13992
14022
  function useContextHook(options2) {
13993
14023
  const contextValue = useContext2(context);
@@ -13997,7 +14027,7 @@ function createContextHook(context, providerName) {
13997
14027
  return useContextHook;
13998
14028
  }
13999
14029
 
14000
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/context/react/utils/createContextStoreHook.js
14030
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/context/react/utils/createContextStoreHook.js
14001
14031
  function createContextStoreHook(contextHook, contextKey) {
14002
14032
  function useStoreStoreHook(options2) {
14003
14033
  const context = contextHook(options2);
@@ -14022,12 +14052,12 @@ function createContextStoreHook(contextHook, contextKey) {
14022
14052
  };
14023
14053
  }
14024
14054
 
14025
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/context/react/ThreadViewportContext.js
14055
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/context/react/ThreadViewportContext.js
14026
14056
  var ThreadViewportContext = createContext(null);
14027
14057
  var useThreadViewportContext = createContextHook(ThreadViewportContext, "ThreadPrimitive.Viewport");
14028
14058
  var { useThreadViewport, useThreadViewportStore } = createContextStoreHook(useThreadViewportContext, "useThreadViewport");
14029
14059
 
14030
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/devtools/DevToolsHooks.js
14060
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/devtools/DevToolsHooks.js
14031
14061
  var cachedHook;
14032
14062
  var getHook = () => {
14033
14063
  if (cachedHook) return cachedHook;
@@ -14134,7 +14164,7 @@ var createImpl = (createState2) => {
14134
14164
  };
14135
14165
  var create = ((createState2) => createState2 ? createImpl(createState2) : createImpl);
14136
14166
 
14137
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/context/stores/ThreadViewport.js
14167
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/context/stores/ThreadViewport.js
14138
14168
  var createSizeRegistry = (onChange) => {
14139
14169
  const entries = /* @__PURE__ */ new Map();
14140
14170
  const recalculate = () => {
@@ -14243,12 +14273,12 @@ var makeThreadViewportStore = (options2 = {}) => {
14243
14273
  return store;
14244
14274
  };
14245
14275
 
14246
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/context/ReadonlyStore.js
14276
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/context/ReadonlyStore.js
14247
14277
  var writableStore = (store) => {
14248
14278
  return store;
14249
14279
  };
14250
14280
 
14251
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/context/providers/ThreadViewportProvider.js
14281
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/context/providers/ThreadViewportProvider.js
14252
14282
  import { jsx as jsx18 } from "react/jsx-runtime";
14253
14283
  var useThreadViewportStoreValue = (options2) => {
14254
14284
  const $ = c(11);
@@ -14332,7 +14362,7 @@ var ThreadPrimitiveViewportProvider = (t0) => {
14332
14362
  return t4;
14333
14363
  };
14334
14364
 
14335
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/legacy-runtime/AssistantRuntimeProvider.js
14365
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/legacy-runtime/AssistantRuntimeProvider.js
14336
14366
  import { jsx as jsx19, jsxs as jsxs5 } from "react/jsx-runtime";
14337
14367
  var DevToolsRegistration = () => {
14338
14368
  const $ = c(3);
@@ -14399,7 +14429,7 @@ function checkDuplicateCore() {
14399
14429
  // ../../node_modules/.pnpm/@assistant-ui+core@0.3.20_@assistant-ui+store@0.3.14_@assistant-ui+tap@0.9.18_@types+re_dee34b6e359fd521e7d8189e1205a377/node_modules/@assistant-ui/core/dist/index.js
14400
14430
  if (process.env.NODE_ENV !== "production") checkDuplicateCore();
14401
14431
 
14402
- // ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.10_@types+react-dom@19.2.3_@types+react@19.2.17__@types+r_3184244fd74ea067d72e5f2da9c8480f/node_modules/@radix-ui/react-primitive/dist/index.mjs
14432
+ // ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.10_@types+react-dom@19.2.3_@types+react@19.3.0__@types+re_3282b8b0d9e81285e40e78c2c0394354/node_modules/@radix-ui/react-primitive/dist/index.mjs
14403
14433
  import * as ReactDOM from "react-dom";
14404
14434
 
14405
14435
  // ../../node_modules/.pnpm/@radix-ui+react-slot@1.3.3_@types+react@19.2.17_react@19.2.7/node_modules/@radix-ui/react-slot/dist/index.mjs
@@ -14590,7 +14620,7 @@ var createSlottableError = /* @__PURE__ */ __name2((ownerName) => {
14590
14620
  }, "createSlottableError");
14591
14621
  var use3 = react_compat_exports[" use ".trim().toString()];
14592
14622
 
14593
- // ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.10_@types+react-dom@19.2.3_@types+react@19.2.17__@types+r_3184244fd74ea067d72e5f2da9c8480f/node_modules/@radix-ui/react-primitive/dist/index.mjs
14623
+ // ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.10_@types+react-dom@19.2.3_@types+react@19.3.0__@types+re_3282b8b0d9e81285e40e78c2c0394354/node_modules/@radix-ui/react-primitive/dist/index.mjs
14594
14624
  import { jsx as jsx20 } from "react/jsx-runtime";
14595
14625
  var __defProp4 = Object.defineProperty;
14596
14626
  var __name3 = (target, value) => __defProp4(target, "name", { value, configurable: true });
@@ -14631,7 +14661,7 @@ function dispatchDiscreteCustomEvent(target, event) {
14631
14661
  }
14632
14662
  __name3(dispatchDiscreteCustomEvent, "dispatchDiscreteCustomEvent");
14633
14663
 
14634
- // ../../node_modules/.pnpm/@radix-ui+react-arrow@1.1.15_@types+react-dom@19.2.3_@types+react@19.2.17__@types+react_6f6bfe660b37754b403c97b75bb4f503/node_modules/@radix-ui/react-arrow/dist/index.mjs
14664
+ // ../../node_modules/.pnpm/@radix-ui+react-arrow@1.1.15_@types+react-dom@19.2.3_@types+react@19.3.0__@types+react@_adff281682de5992d4500f64e567bba1/node_modules/@radix-ui/react-arrow/dist/index.mjs
14635
14665
  import { jsx as jsx21 } from "react/jsx-runtime";
14636
14666
  var __defProp5 = Object.defineProperty;
14637
14667
  var __name4 = (target, value) => __defProp5(target, "name", { value, configurable: true });
@@ -14654,7 +14684,7 @@ var Arrow = /* @__PURE__ */ react_compat_exports.forwardRef(
14654
14684
  );
14655
14685
  var Root = Arrow;
14656
14686
 
14657
- // ../../node_modules/.pnpm/@radix-ui+react-collection@1.1.15_@types+react-dom@19.2.3_@types+react@19.2.17__@types+_a6e002053e9d39acf9bcc3523eca26cd/node_modules/@radix-ui/react-collection/dist/index.mjs
14687
+ // ../../node_modules/.pnpm/@radix-ui+react-collection@1.1.15_@types+react-dom@19.2.3_@types+react@19.3.0__@types+r_c42e6e7e5d1fd3b33422e9254a0496ed/node_modules/@radix-ui/react-collection/dist/index.mjs
14658
14688
  var dist_exports2 = {};
14659
14689
  __export(dist_exports2, {
14660
14690
  createCollection: () => createCollection,
@@ -14753,7 +14783,7 @@ function composeContextScopes(...scopes) {
14753
14783
  }
14754
14784
  __name5(composeContextScopes, "composeContextScopes");
14755
14785
 
14756
- // ../../node_modules/.pnpm/@radix-ui+react-collection@1.1.15_@types+react-dom@19.2.3_@types+react@19.2.17__@types+_a6e002053e9d39acf9bcc3523eca26cd/node_modules/@radix-ui/react-collection/dist/index.mjs
14786
+ // ../../node_modules/.pnpm/@radix-ui+react-collection@1.1.15_@types+react-dom@19.2.3_@types+react@19.3.0__@types+r_c42e6e7e5d1fd3b33422e9254a0496ed/node_modules/@radix-ui/react-collection/dist/index.mjs
14757
14787
  import { jsx as jsx23 } from "react/jsx-runtime";
14758
14788
  import { jsx as jsx24 } from "react/jsx-runtime";
14759
14789
  var __defProp7 = Object.defineProperty;
@@ -15361,7 +15391,7 @@ function useCallbackRef(callback) {
15361
15391
  }
15362
15392
  __name8(useCallbackRef, "useCallbackRef");
15363
15393
 
15364
- // ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.19_@types+react-dom@19.2.3_@types+react@19.2.17___d8fa013a40dedb9dcbb9b43b93e40407/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
15394
+ // ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.19_@types+react-dom@19.2.3_@types+react@19.3.0__@_36bd14e33ac183abd0958ee6c0c3849a/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
15365
15395
  import { jsx as jsx25 } from "react/jsx-runtime";
15366
15396
  var __defProp10 = Object.defineProperty;
15367
15397
  var __name9 = (target, value) => __defProp10(target, "name", { value, configurable: true });
@@ -15740,7 +15770,7 @@ function createFocusGuard() {
15740
15770
  }
15741
15771
  __name10(createFocusGuard, "createFocusGuard");
15742
15772
 
15743
- // ../../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.16_@types+react-dom@19.2.3_@types+react@19.2.17__@types_bde130f859df1e2f435be4b19133ab62/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
15773
+ // ../../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.16_@types+react-dom@19.2.3_@types+react@19.3.0__@types+_a3dcc4766a30636d91dd6244a68493e7/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
15744
15774
  import { jsx as jsx26 } from "react/jsx-runtime";
15745
15775
  var __defProp12 = Object.defineProperty;
15746
15776
  var __name11 = (target, value) => __defProp12(target, "name", { value, configurable: true });
@@ -17942,7 +17972,7 @@ function useSize(element2) {
17942
17972
  }
17943
17973
  __name14(useSize, "useSize");
17944
17974
 
17945
- // ../../node_modules/.pnpm/@radix-ui+react-popper@1.3.7_@types+react-dom@19.2.3_@types+react@19.2.17__@types+react_f5e8c078a9e8d5355069302ba3c1f449/node_modules/@radix-ui/react-popper/dist/index.mjs
17975
+ // ../../node_modules/.pnpm/@radix-ui+react-popper@1.3.7_@types+react-dom@19.2.3_@types+react@19.3.0__@types+react@_dd68de7f8c72d03333ac6c4b7aa591fd/node_modules/@radix-ui/react-popper/dist/index.mjs
17946
17976
  import { jsx as jsx28 } from "react/jsx-runtime";
17947
17977
  var __defProp16 = Object.defineProperty;
17948
17978
  var __name15 = (target, value) => __defProp16(target, "name", { value, configurable: true });
@@ -18271,7 +18301,7 @@ var Anchor = PopperAnchor;
18271
18301
  var Content = PopperContent;
18272
18302
  var Arrow3 = PopperArrow;
18273
18303
 
18274
- // ../../node_modules/.pnpm/@radix-ui+react-portal@1.1.17_@types+react-dom@19.2.3_@types+react@19.2.17__@types+reac_b9b0c95c3b1d1af5c5387c8248266cad/node_modules/@radix-ui/react-portal/dist/index.mjs
18304
+ // ../../node_modules/.pnpm/@radix-ui+react-portal@1.1.17_@types+react-dom@19.2.3_@types+react@19.3.0__@types+react_c17dfc996248caca251ebf7d4a1cad5e/node_modules/@radix-ui/react-portal/dist/index.mjs
18275
18305
  import * as ReactDOM3 from "react-dom";
18276
18306
  import { jsx as jsx29 } from "react/jsx-runtime";
18277
18307
  var __defProp17 = Object.defineProperty;
@@ -18286,7 +18316,7 @@ var Portal = /* @__PURE__ */ react_compat_exports.forwardRef(
18286
18316
  }, "Portal")
18287
18317
  );
18288
18318
 
18289
- // ../../node_modules/.pnpm/@radix-ui+react-presence@1.1.10_@types+react-dom@19.2.3_@types+react@19.2.17__@types+re_adc135779739cb1e915883e1a7ca716b/node_modules/@radix-ui/react-presence/dist/index.mjs
18319
+ // ../../node_modules/.pnpm/@radix-ui+react-presence@1.1.10_@types+react-dom@19.2.3_@types+react@19.3.0__@types+rea_7055a6d88c17852eaba6acf1e5cadfb1/node_modules/@radix-ui/react-presence/dist/index.mjs
18290
18320
  var __defProp18 = Object.defineProperty;
18291
18321
  var __name17 = (target, value) => __defProp18(target, "name", { value, configurable: true });
18292
18322
  function useStateMachine(initialState, machine) {
@@ -18654,7 +18684,7 @@ function useIsHydratedModern() {
18654
18684
  __name20(useIsHydratedModern, "useIsHydratedModern");
18655
18685
  var useIsHydrated2 = typeof useReactSyncExternalStore === "function" ? useIsHydratedModern : useIsHydrated;
18656
18686
 
18657
- // ../../node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.19_@types+react-dom@19.2.3_@types+react@19.2.17__@type_cd3e7f1be5cde73061aa667928ea33e1/node_modules/@radix-ui/react-roving-focus/dist/index.mjs
18687
+ // ../../node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.19_@types+react-dom@19.2.3_@types+react@19.3.0__@types_da04bd2a99062c6cf95acd066bfcad2a/node_modules/@radix-ui/react-roving-focus/dist/index.mjs
18658
18688
  import { jsx as jsx30 } from "react/jsx-runtime";
18659
18689
  var __defProp22 = Object.defineProperty;
18660
18690
  var __name21 = (target, value) => __defProp22(target, "name", { value, configurable: true });
@@ -19629,7 +19659,7 @@ var ReactRemoveScroll = react_compat_exports.forwardRef(function(props, ref) {
19629
19659
  ReactRemoveScroll.classNames = RemoveScroll.classNames;
19630
19660
  var Combination_default = ReactRemoveScroll;
19631
19661
 
19632
- // ../../node_modules/.pnpm/@radix-ui+react-menu@2.1.24_@types+react-dom@19.2.3_@types+react@19.2.17__@types+react@_d4d19c43b126995adcd49a4399afcf19/node_modules/@radix-ui/react-menu/dist/index.mjs
19662
+ // ../../node_modules/.pnpm/@radix-ui+react-menu@2.1.24_@types+react-dom@19.2.3_@types+react@19.3.0__@types+react@1_f95eef0bf0e01c6fc16dbb7bb52ca3ec/node_modules/@radix-ui/react-menu/dist/index.mjs
19633
19663
  import { jsx as jsx31 } from "react/jsx-runtime";
19634
19664
  var __defProp23 = Object.defineProperty;
19635
19665
  var __name22 = (target, value) => __defProp23(target, "name", { value, configurable: true });
@@ -20473,12 +20503,12 @@ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.docum
20473
20503
  }
20474
20504
  __name23(useEscapeKeydown, "useEscapeKeydown");
20475
20505
 
20476
- // ../../node_modules/.pnpm/radix-ui@1.6.7_@types+react-dom@19.2.3_@types+react@19.2.17__@types+react@19.2.17_react_79b21f3106aa6455b45c779525f67fc3/node_modules/radix-ui/dist/internal.mjs
20506
+ // ../../node_modules/.pnpm/radix-ui@1.6.7_@types+react-dom@19.2.3_@types+react@19.3.0__@types+react@19.2.17_react-_da78caf5d7cdfc038e804811f14e369e/node_modules/radix-ui/dist/internal.mjs
20477
20507
  var Primitive2 = Primitive;
20478
20508
  Primitive2.dispatchDiscreteCustomEvent = dispatchDiscreteCustomEvent;
20479
20509
  Primitive2.Root = Primitive;
20480
20510
 
20481
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/_virtual/_rolldown/runtime.js
20511
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/_virtual/_rolldown/runtime.js
20482
20512
  var __defProp25 = Object.defineProperty;
20483
20513
  var __exportAll = (all2, no_symbols) => {
20484
20514
  let target = {};
@@ -20490,10 +20520,10 @@ var __exportAll = (all2, no_symbols) => {
20490
20520
  return target;
20491
20521
  };
20492
20522
 
20493
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/utils/Primitive.js
20523
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/utils/Primitive.js
20494
20524
  import { jsx as jsx38 } from "react/jsx-runtime";
20495
20525
 
20496
- // ../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.11_@types+react-dom@19.2.3_@types+react@19.2.17__@t_a9fe9559d5318199efe7868961958938/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
20526
+ // ../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.11_@types+react-dom@19.2.3_@types+react@19.3.0__@ty_0544e07367c9e3c3619aec81bee80351/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
20497
20527
  import { jsx as jsx32 } from "react/jsx-runtime";
20498
20528
  var __defProp26 = Object.defineProperty;
20499
20529
  var __name24 = (target, value) => __defProp26(target, "name", { value, configurable: true });
@@ -20524,7 +20554,7 @@ var VisuallyHidden = /* @__PURE__ */ react_compat_exports.forwardRef(
20524
20554
  );
20525
20555
  var Root4 = VisuallyHidden;
20526
20556
 
20527
- // ../../node_modules/.pnpm/@radix-ui+react-collapsible@1.1.20_@types+react-dom@19.2.3_@types+react@19.2.17__@types_30bf8c4a1c9254494a8469a09c956e3d/node_modules/@radix-ui/react-collapsible/dist/index.mjs
20557
+ // ../../node_modules/.pnpm/@radix-ui+react-collapsible@1.1.20_@types+react-dom@19.2.3_@types+react@19.3.0__@types+_9f9ee72c7ac9d058f30ed3ab33ac3268/node_modules/@radix-ui/react-collapsible/dist/index.mjs
20528
20558
  var dist_exports7 = {};
20529
20559
  __export(dist_exports7, {
20530
20560
  Collapsible: () => Collapsible,
@@ -20671,7 +20701,7 @@ var Root5 = Collapsible;
20671
20701
  var Trigger = CollapsibleTrigger;
20672
20702
  var Content3 = CollapsibleContent;
20673
20703
 
20674
- // ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.23_@types+react-dom@19.2.3_@types+react@19.2.17__@types+reac_273c4552cb9ef25164f0590a20526ae7/node_modules/@radix-ui/react-dialog/dist/index.mjs
20704
+ // ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.23_@types+react-dom@19.2.3_@types+react@19.3.0__@types+react_bbd78a0f51f9a2c4470eb3b9cea115ab/node_modules/@radix-ui/react-dialog/dist/index.mjs
20675
20705
  var dist_exports8 = {};
20676
20706
  __export(dist_exports8, {
20677
20707
  Close: () => DialogClose,
@@ -20969,7 +20999,7 @@ function getState2(open) {
20969
20999
  }
20970
21000
  __name26(getState2, "getState");
20971
21001
 
20972
- // ../../node_modules/.pnpm/@radix-ui+react-avatar@1.2.6_@types+react-dom@19.2.3_@types+react@19.2.17__@types+react_09d180fd72cb8108c5dc5253918f952b/node_modules/@radix-ui/react-avatar/dist/index.mjs
21002
+ // ../../node_modules/.pnpm/@radix-ui+react-avatar@1.2.6_@types+react-dom@19.2.3_@types+react@19.3.0__@types+react@_abf9c982573a8964798d31d1ef79661e/node_modules/@radix-ui/react-avatar/dist/index.mjs
20973
21003
  var dist_exports9 = {};
20974
21004
  __export(dist_exports9, {
20975
21005
  Avatar: () => Avatar,
@@ -21118,7 +21148,7 @@ function useUpdateImageCount(setImageCount) {
21118
21148
  }
21119
21149
  __name27(useUpdateImageCount, "useUpdateImageCount");
21120
21150
 
21121
- // ../../node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.24_@types+react-dom@19.2.3_@types+react@19.2.17__@typ_aafe9f02e219e084fb98691b696e61c0/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs
21151
+ // ../../node_modules/.pnpm/@radix-ui+react-dropdown-menu@2.1.24_@types+react-dom@19.2.3_@types+react@19.3.0__@type_0716359e32f60e4d729699e69613e7c6/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs
21122
21152
  var dist_exports10 = {};
21123
21153
  __export(dist_exports10, {
21124
21154
  Arrow: () => Arrow23,
@@ -21395,7 +21425,7 @@ var Sub2 = DropdownMenuSub;
21395
21425
  var SubTrigger2 = DropdownMenuSubTrigger;
21396
21426
  var SubContent2 = DropdownMenuSubContent;
21397
21427
 
21398
- // ../../node_modules/.pnpm/@radix-ui+react-tooltip@1.2.16_@types+react-dom@19.2.3_@types+react@19.2.17__@types+rea_08eb8bc6da6bb193d05433f7afbf78d7/node_modules/@radix-ui/react-tooltip/dist/index.mjs
21428
+ // ../../node_modules/.pnpm/@radix-ui+react-tooltip@1.2.16_@types+react-dom@19.2.3_@types+react@19.3.0__@types+reac_7a08a990b49cd7e7a5876acf3c5ab7e6/node_modules/@radix-ui/react-tooltip/dist/index.mjs
21399
21429
  var dist_exports12 = {};
21400
21430
  __export(dist_exports12, {
21401
21431
  Arrow: () => Arrow24,
@@ -21901,7 +21931,7 @@ var Portal4 = TooltipPortal;
21901
21931
  var Content23 = TooltipContent;
21902
21932
  var Arrow24 = TooltipArrow;
21903
21933
 
21904
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/utils/Primitive.js
21934
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/utils/Primitive.js
21905
21935
  var NODES2 = [
21906
21936
  "a",
21907
21937
  "button",
@@ -22006,7 +22036,7 @@ var Primitive3 = NODES2.reduce((acc, node2) => {
22006
22036
  return acc;
22007
22037
  }, {});
22008
22038
 
22009
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/actionBar/useActionBarFloatStatus.js
22039
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/actionBar/useActionBarFloatStatus.js
22010
22040
  var HideAndFloatStatus = {
22011
22041
  Hidden: "hidden",
22012
22042
  Floating: "floating",
@@ -22035,10 +22065,10 @@ var useActionBarFloatStatus = (t0) => {
22035
22065
  return useAuiState(t1);
22036
22066
  };
22037
22067
 
22038
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/actionBar/ActionBarInteractionContext.js
22068
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/actionBar/ActionBarInteractionContext.js
22039
22069
  var ActionBarInteractionContext = createContext(null);
22040
22070
 
22041
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/actionBar/ActionBarRoot.js
22071
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/actionBar/ActionBarRoot.js
22042
22072
  import { jsx as jsx39 } from "react/jsx-runtime";
22043
22073
  var ActionBarPrimitiveRoot = forwardRef((t0, ref) => {
22044
22074
  const $ = c(18);
@@ -22064,7 +22094,7 @@ var ActionBarPrimitiveRoot = forwardRef((t0, ref) => {
22064
22094
  if ($[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
22065
22095
  t1 = () => {
22066
22096
  let released = false;
22067
- setInteractionCount(_temp20);
22097
+ setInteractionCount(_temp21);
22068
22098
  return () => {
22069
22099
  if (released) return;
22070
22100
  released = true;
@@ -22121,14 +22151,14 @@ var ActionBarPrimitiveRoot = forwardRef((t0, ref) => {
22121
22151
  return t6;
22122
22152
  });
22123
22153
  ActionBarPrimitiveRoot.displayName = "ActionBarPrimitive.Root";
22124
- function _temp20(count3) {
22154
+ function _temp21(count3) {
22125
22155
  return count3 + 1;
22126
22156
  }
22127
22157
  function _temp211(count_0) {
22128
22158
  return Math.max(0, count_0 - 1);
22129
22159
  }
22130
22160
 
22131
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/actionBar/ActionBarCopy.js
22161
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/actionBar/ActionBarCopy.js
22132
22162
  import { jsx as jsx40 } from "react/jsx-runtime";
22133
22163
  var useActionBarPrimitiveCopy = (t0) => {
22134
22164
  const $ = c(4);
@@ -22144,7 +22174,7 @@ var useActionBarPrimitiveCopy = (t0) => {
22144
22174
  if ($[2] !== copiedDuration) {
22145
22175
  t3 = {
22146
22176
  copiedDuration,
22147
- copyToClipboard: _temp21
22177
+ copyToClipboard: _temp30
22148
22178
  };
22149
22179
  $[2] = copiedDuration;
22150
22180
  $[3] = t3;
@@ -22222,7 +22252,7 @@ var ActionBarPrimitiveCopy = forwardRef((t0, forwardedRef) => {
22222
22252
  return t6;
22223
22253
  });
22224
22254
  ActionBarPrimitiveCopy.displayName = "ActionBarPrimitive.Copy";
22225
- function _temp21(text7) {
22255
+ function _temp30(text7) {
22226
22256
  if (typeof navigator === "undefined" || !navigator.clipboard) return Promise.reject(/* @__PURE__ */ new Error("Clipboard API is unavailable"));
22227
22257
  return navigator.clipboard.writeText(text7);
22228
22258
  }
@@ -22230,7 +22260,7 @@ function _temp212(s) {
22230
22260
  return s.message.isCopied;
22231
22261
  }
22232
22262
 
22233
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/utils/createActionButton.js
22263
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/utils/createActionButton.js
22234
22264
  import { jsx as jsx41 } from "react/jsx-runtime";
22235
22265
  var createActionButton = (displayName, useActionButton, forwardProps = []) => {
22236
22266
  const ActionButton = forwardRef((props, forwardedRef) => {
@@ -22268,7 +22298,7 @@ var createActionButton = (displayName, useActionButton, forwardProps = []) => {
22268
22298
  return ActionButton;
22269
22299
  };
22270
22300
 
22271
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/actionBar/ActionBarEdit.js
22301
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/actionBar/ActionBarEdit.js
22272
22302
  var useActionBarEdit$1 = () => {
22273
22303
  const { disabled, edit } = useActionBarEdit();
22274
22304
  if (disabled) return null;
@@ -22276,7 +22306,7 @@ var useActionBarEdit$1 = () => {
22276
22306
  };
22277
22307
  var ActionBarPrimitiveEdit = createActionButton("ActionBarPrimitive.Edit", useActionBarEdit$1);
22278
22308
 
22279
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/attachment/AttachmentRoot.js
22309
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/attachment/AttachmentRoot.js
22280
22310
  import { jsx as jsx42 } from "react/jsx-runtime";
22281
22311
  var AttachmentPrimitiveRoot = forwardRef((props, ref) => {
22282
22312
  const $ = c(3);
@@ -22294,11 +22324,11 @@ var AttachmentPrimitiveRoot = forwardRef((props, ref) => {
22294
22324
  });
22295
22325
  AttachmentPrimitiveRoot.displayName = "AttachmentPrimitive.Root";
22296
22326
 
22297
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/attachment/AttachmentName.js
22327
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/attachment/AttachmentName.js
22298
22328
  import { Fragment as Fragment8, jsx as jsx43 } from "react/jsx-runtime";
22299
22329
  var AttachmentPrimitiveName = () => {
22300
22330
  const $ = c(2);
22301
- const name2 = useAuiState(_temp30);
22331
+ const name2 = useAuiState(_temp31);
22302
22332
  let t0;
22303
22333
  if ($[0] !== name2) {
22304
22334
  t0 = /* @__PURE__ */ jsx43(Fragment8, { children: name2 });
@@ -22308,11 +22338,11 @@ var AttachmentPrimitiveName = () => {
22308
22338
  return t0;
22309
22339
  };
22310
22340
  AttachmentPrimitiveName.displayName = "AttachmentPrimitive.Name";
22311
- function _temp30(s) {
22341
+ function _temp31(s) {
22312
22342
  return s.attachment.name;
22313
22343
  }
22314
22344
 
22315
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/attachment/AttachmentRemove.js
22345
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/attachment/AttachmentRemove.js
22316
22346
  var useAttachmentRemove = () => {
22317
22347
  const $ = c(2);
22318
22348
  const aui = useAui();
@@ -22328,7 +22358,7 @@ var useAttachmentRemove = () => {
22328
22358
  };
22329
22359
  var AttachmentPrimitiveRemove = createActionButton("AttachmentPrimitive.Remove", useAttachmentRemove);
22330
22360
 
22331
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/composer/ComposerInputPluginContext.js
22361
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/composer/ComposerInputPluginContext.js
22332
22362
  import { jsx as jsx44 } from "react/jsx-runtime";
22333
22363
  var ComposerInputPluginRegistryContext = createContext(null);
22334
22364
  var useComposerInputPluginRegistryOptional = () => {
@@ -22353,7 +22383,7 @@ var ComposerInputPluginProvider = (t0) => {
22353
22383
  if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
22354
22384
  t3 = () => {
22355
22385
  const entries = Array.from(pluginsRef.current.entries());
22356
- entries.sort(_temp31);
22386
+ entries.sort(_temp38);
22357
22387
  snapshotRef.current = entries.map(_temp213);
22358
22388
  };
22359
22389
  $[2] = t3;
@@ -22399,7 +22429,7 @@ var ComposerInputPluginProvider = (t0) => {
22399
22429
  } else t7 = $[7];
22400
22430
  return t7;
22401
22431
  };
22402
- function _temp31(a, b) {
22432
+ function _temp38(a, b) {
22403
22433
  return b[1] - a[1];
22404
22434
  }
22405
22435
  function _temp213(t0) {
@@ -22407,7 +22437,7 @@ function _temp213(t0) {
22407
22437
  return plugin;
22408
22438
  }
22409
22439
 
22410
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/composer/trigger/TriggerPopoverRootContext.js
22440
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/composer/trigger/TriggerPopoverRootContext.js
22411
22441
  import { jsx as jsx45 } from "react/jsx-runtime";
22412
22442
  var TriggerPopoverRootContext = createContext(null);
22413
22443
  var TriggerPopoverAriaPublishContext = createContext(null);
@@ -22480,7 +22510,7 @@ var TriggerPopoverRootInner = (t0) => {
22480
22510
  const { char } = trigger;
22481
22511
  if (triggersRef.current.has(char)) {
22482
22512
  if (process.env.NODE_ENV !== "production") console.warn(`[assistant-ui] Duplicate TriggerPopover for char "${char}". Ignoring the second registration.`);
22483
- return _temp38;
22513
+ return _temp39;
22484
22514
  }
22485
22515
  if (process.env.NODE_ENV !== "production") {
22486
22516
  for (const existing of triggersRef.current.values()) if (char.startsWith(existing.char) || existing.char.startsWith(char)) console.warn(`[assistant-ui] Trigger prefix collision between "${existing.char}" and "${char}". One char is a prefix of the other; only one will match reliably.`);
@@ -22614,10 +22644,10 @@ var ComposerPrimitiveTriggerPopoverRoot = (t0) => {
22614
22644
  return t1;
22615
22645
  };
22616
22646
  ComposerPrimitiveTriggerPopoverRoot.displayName = "ComposerPrimitive.TriggerPopoverRoot";
22617
- function _temp38() {
22647
+ function _temp39() {
22618
22648
  }
22619
22649
 
22620
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/composer/ComposerSend.js
22650
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/composer/ComposerSend.js
22621
22651
  var useComposerSend2 = () => {
22622
22652
  const $ = c(2);
22623
22653
  const { disabled, send } = useComposerSend();
@@ -22633,13 +22663,13 @@ var useComposerSend2 = () => {
22633
22663
  };
22634
22664
  var ComposerPrimitiveSend = createActionButton("ComposerPrimitive.Send", useComposerSend2);
22635
22665
 
22636
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/composer/ComposerCompactContext.js
22666
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/composer/ComposerCompactContext.js
22637
22667
  var ComposerCompactContext = createContext(null);
22638
22668
  var useComposerCompactContextOptional = () => {
22639
22669
  return useContext2(ComposerCompactContext);
22640
22670
  };
22641
22671
 
22642
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/composer/ComposerRoot.js
22672
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/composer/ComposerRoot.js
22643
22673
  import { jsx as jsx46 } from "react/jsx-runtime";
22644
22674
  var CONTENT_EDITABLE_SELECTOR = "[contenteditable]:not([contenteditable='false'])";
22645
22675
  var COMPOSER_INPUT_SELECTOR = `textarea:not(:disabled), ${CONTENT_EDITABLE_SELECTOR}`;
@@ -22704,7 +22734,7 @@ var ComposerPrimitiveRoot = forwardRef((t0, forwardedRef) => {
22704
22734
  $[9] = t3;
22705
22735
  } else t3 = $[9];
22706
22736
  const handleSubmit = t3;
22707
- const handleMouseDown = _temp39;
22737
+ const handleMouseDown = _temp40;
22708
22738
  const t4 = compact ? compactContext : null;
22709
22739
  const t5 = isCompact ? "" : void 0;
22710
22740
  let t6;
@@ -22749,7 +22779,7 @@ var ComposerPrimitiveRoot = forwardRef((t0, forwardedRef) => {
22749
22779
  return t9;
22750
22780
  });
22751
22781
  ComposerPrimitiveRoot.displayName = "ComposerPrimitive.Root";
22752
- function _temp39(e_0) {
22782
+ function _temp40(e_0) {
22753
22783
  if (e_0.button !== 0) return;
22754
22784
  const target = e_0.target;
22755
22785
  if (!(target instanceof Element) || !e_0.currentTarget.contains(target)) return;
@@ -22761,11 +22791,11 @@ function _temp39(e_0) {
22761
22791
  input.focus();
22762
22792
  }
22763
22793
 
22764
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/utils/hooks/useOnScrollToBottom.js
22794
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/utils/hooks/useOnScrollToBottom.js
22765
22795
  var useOnScrollToBottom = (callback) => {
22766
22796
  const $ = c(4);
22767
22797
  const callbackRef = useCallbackRef(callback);
22768
- const onScrollToBottom = useThreadViewport(_temp40);
22798
+ const onScrollToBottom = useThreadViewport(_temp41);
22769
22799
  let t0;
22770
22800
  let t1;
22771
22801
  if ($[0] !== callbackRef || $[1] !== onScrollToBottom) {
@@ -22781,11 +22811,11 @@ var useOnScrollToBottom = (callback) => {
22781
22811
  }
22782
22812
  useEffect2(t0, t1);
22783
22813
  };
22784
- function _temp40(vp) {
22814
+ function _temp41(vp) {
22785
22815
  return vp.onScrollToBottom;
22786
22816
  }
22787
22817
 
22788
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/utils/hooks/useMediaQuery.js
22818
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/utils/hooks/useMediaQuery.js
22789
22819
  var getServerSnapshot = () => false;
22790
22820
  var noopUnsubscribe = () => {
22791
22821
  };
@@ -22815,11 +22845,11 @@ var useMediaQuery = (query) => {
22815
22845
  return useSyncExternalStore3(subscribe3, t1, getServerSnapshot);
22816
22846
  };
22817
22847
 
22818
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/composer/useComposerInputState.js
22848
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/composer/useComposerInputState.js
22819
22849
  function useComposerInputValue() {
22820
- return useAuiState(_temp41);
22850
+ return useAuiState(_temp44);
22821
22851
  }
22822
- function _temp41(s) {
22852
+ function _temp44(s) {
22823
22853
  return s.composer.isEditing ? s.composer.text : "";
22824
22854
  }
22825
22855
  function useComposerInputDisabled(disabled) {
@@ -22855,7 +22885,7 @@ function useTriggerPopoverAriaProps() {
22855
22885
  return t0;
22856
22886
  }
22857
22887
 
22858
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/composer/ComposerInput.js
22888
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/composer/ComposerInput.js
22859
22889
  import { jsx as jsx47 } from "react/jsx-runtime";
22860
22890
 
22861
22891
  // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js
@@ -23108,7 +23138,7 @@ var TextareaAutosize = function TextareaAutosize2(_ref, userRef) {
23108
23138
  };
23109
23139
  var index3 = /* @__PURE__ */ react_compat_exports.forwardRef(TextareaAutosize);
23110
23140
 
23111
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/composer/ComposerInput.js
23141
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/composer/ComposerInput.js
23112
23142
  var TOUCH_PRIMARY_QUERY = "(pointer: coarse) and (not (any-pointer: fine))";
23113
23143
  var ComposerPrimitiveInput = forwardRef(({ autoFocus = false, asChild, render, disabled: disabledProp, onChange, onKeyDown, onPaste, onSelect, submitOnEnter, submitMode, cancelOnEscape = true, unstable_focusOnRunStart = true, unstable_focusOnScrollToBottom = true, unstable_focusOnThreadSwitched = true, unstable_insertNewlineOnTouchEnter = false, addAttachmentOnPaste = true, onHeightChange, ...rest }, forwardedRef) => {
23114
23144
  const aui = useAui();
@@ -23262,7 +23292,7 @@ var ComposerPrimitiveInput = forwardRef(({ autoFocus = false, asChild, render, d
23262
23292
  });
23263
23293
  ComposerPrimitiveInput.displayName = "ComposerPrimitive.Input";
23264
23294
 
23265
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/composer/ComposerCancel.js
23295
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/composer/ComposerCancel.js
23266
23296
  var useComposerCancel$1 = () => {
23267
23297
  const { disabled, cancel } = useComposerCancel();
23268
23298
  if (disabled) return null;
@@ -23270,7 +23300,7 @@ var useComposerCancel$1 = () => {
23270
23300
  };
23271
23301
  var ComposerPrimitiveCancel = createActionButton("ComposerPrimitive.Cancel", useComposerCancel$1);
23272
23302
 
23273
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/composer/ComposerAttachmentDropzone.js
23303
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/composer/ComposerAttachmentDropzone.js
23274
23304
  import { jsx as jsx48 } from "react/jsx-runtime";
23275
23305
  var ComposerPrimitiveAttachmentDropzone = forwardRef(({ disabled, asChild = false, render, children, ...rest }, ref) => {
23276
23306
  const [isDragging, setIsDragging] = useState3(false);
@@ -23338,7 +23368,37 @@ var ComposerPrimitiveAttachmentDropzone = forwardRef(({ disabled, asChild = fals
23338
23368
  });
23339
23369
  ComposerPrimitiveAttachmentDropzone.displayName = "ComposerPrimitive.AttachmentDropzone";
23340
23370
 
23341
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/messagePart/useMessagePartText.js
23371
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/composer/ComposerDictate.js
23372
+ var useComposerDictate$1 = () => {
23373
+ const { disabled, startDictation } = useComposerDictate();
23374
+ if (disabled) return null;
23375
+ return startDictation;
23376
+ };
23377
+ var ComposerPrimitiveDictate = createActionButton("ComposerPrimitive.Dictate", useComposerDictate$1);
23378
+
23379
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/composer/ComposerStopDictation.js
23380
+ var useComposerStopDictation = () => {
23381
+ const $ = c(2);
23382
+ const aui = useAui();
23383
+ const isDictating = useAuiState(_temp45);
23384
+ let t0;
23385
+ if ($[0] !== aui.composer) {
23386
+ t0 = () => {
23387
+ aui.composer.stopDictation();
23388
+ };
23389
+ $[0] = aui.composer;
23390
+ $[1] = t0;
23391
+ } else t0 = $[1];
23392
+ const callback = t0;
23393
+ if (!isDictating) return null;
23394
+ return callback;
23395
+ };
23396
+ var ComposerPrimitiveStopDictation = createActionButton("ComposerPrimitive.StopDictation", useComposerStopDictation);
23397
+ function _temp45(s) {
23398
+ return s.composer.dictation != null;
23399
+ }
23400
+
23401
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/messagePart/useMessagePartText.js
23342
23402
  var COMPLETE_STATUS3 = Object.freeze({ type: "complete" });
23343
23403
  var EMPTY_TEXT_PART = Object.freeze({
23344
23404
  type: "text",
@@ -23346,14 +23406,14 @@ var EMPTY_TEXT_PART = Object.freeze({
23346
23406
  status: COMPLETE_STATUS3
23347
23407
  });
23348
23408
  var useMessagePartText = () => {
23349
- return useAuiState(_temp44);
23409
+ return useAuiState(_temp46);
23350
23410
  };
23351
- function _temp44(s) {
23411
+ function _temp46(s) {
23352
23412
  if (s.part.type !== "text" && s.part.type !== "reasoning") return EMPTY_TEXT_PART;
23353
23413
  return s.part;
23354
23414
  }
23355
23415
 
23356
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/utils/smooth/SmoothContext.js
23416
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/utils/smooth/SmoothContext.js
23357
23417
  import { jsx as jsx49 } from "react/jsx-runtime";
23358
23418
  var SmoothContext = createContext(null);
23359
23419
  var makeSmoothContext = (initialState) => {
@@ -23415,7 +23475,7 @@ function useSmoothContext(options2) {
23415
23475
  }
23416
23476
  var { useSmoothStatus, useSmoothStatusStore } = createContextStoreHook(useSmoothContext, "useSmoothStatus");
23417
23477
 
23418
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/utils/smooth/useSmooth.js
23478
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/utils/smooth/useSmooth.js
23419
23479
  var DEFAULT_DRAIN_MS = 250;
23420
23480
  var DEFAULT_MAX_CHAR_INTERVAL_MS = 5;
23421
23481
  var TextStreamAnimator = class {
@@ -23578,7 +23638,7 @@ var useSmooth = (state, smooth = false) => {
23578
23638
  ]);
23579
23639
  };
23580
23640
 
23581
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/messagePart/useMessagePartImage.js
23641
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/messagePart/useMessagePartImage.js
23582
23642
  var COMPLETE_STATUS4 = Object.freeze({ type: "complete" });
23583
23643
  var EMPTY_IMAGE_PART = Object.freeze({
23584
23644
  type: "image",
@@ -23586,14 +23646,14 @@ var EMPTY_IMAGE_PART = Object.freeze({
23586
23646
  status: COMPLETE_STATUS4
23587
23647
  });
23588
23648
  var useMessagePartImage = () => {
23589
- return useAuiState(_temp45);
23649
+ return useAuiState(_temp47);
23590
23650
  };
23591
- function _temp45(s) {
23651
+ function _temp47(s) {
23592
23652
  if (s.part.type !== "image") return EMPTY_IMAGE_PART;
23593
23653
  return s.part;
23594
23654
  }
23595
23655
 
23596
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/messagePart/MessagePartText.js
23656
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/messagePart/MessagePartText.js
23597
23657
  import { jsx as jsx50 } from "react/jsx-runtime";
23598
23658
  var MessagePartPrimitiveText = forwardRef(({ smooth = true, component: Component = Primitive3.span, render, ...rest }, forwardedRef) => {
23599
23659
  const { text: text7, status } = useSmooth(useMessagePartText(), smooth);
@@ -23610,7 +23670,7 @@ var MessagePartPrimitiveText = forwardRef(({ smooth = true, component: Component
23610
23670
  });
23611
23671
  MessagePartPrimitiveText.displayName = "MessagePartPrimitive.Text";
23612
23672
 
23613
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/messagePart/MessagePartImage.js
23673
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/messagePart/MessagePartImage.js
23614
23674
  import { jsx as jsx51 } from "react/jsx-runtime";
23615
23675
  var MessagePartPrimitiveImage = forwardRef((props, forwardedRef) => {
23616
23676
  const $ = c(4);
@@ -23631,7 +23691,7 @@ var MessagePartPrimitiveImage = forwardRef((props, forwardedRef) => {
23631
23691
  });
23632
23692
  MessagePartPrimitiveImage.displayName = "MessagePartPrimitive.Image";
23633
23693
 
23634
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/error/ErrorRoot.js
23694
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/error/ErrorRoot.js
23635
23695
  import { jsx as jsx52 } from "react/jsx-runtime";
23636
23696
  var ErrorPrimitiveRoot = forwardRef((props, forwardRef34) => {
23637
23697
  const $ = c(3);
@@ -23650,7 +23710,7 @@ var ErrorPrimitiveRoot = forwardRef((props, forwardRef34) => {
23650
23710
  });
23651
23711
  ErrorPrimitiveRoot.displayName = "ErrorPrimitive.Root";
23652
23712
 
23653
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/error/ErrorMessage.js
23713
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/error/ErrorMessage.js
23654
23714
  import { jsx as jsx53 } from "react/jsx-runtime";
23655
23715
  var ErrorPrimitiveMessage = forwardRef((t0, forwardRef34) => {
23656
23716
  const $ = c(7);
@@ -23684,7 +23744,7 @@ var ErrorPrimitiveMessage = forwardRef((t0, forwardRef34) => {
23684
23744
  });
23685
23745
  ErrorPrimitiveMessage.displayName = "ErrorPrimitive.Message";
23686
23746
 
23687
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/utils/hooks/useManagedRef.js
23747
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/utils/hooks/useManagedRef.js
23688
23748
  var useManagedRef = (callback) => {
23689
23749
  const $ = c(2);
23690
23750
  const cleanupRef = useRef3(void 0);
@@ -23703,7 +23763,7 @@ var useManagedRef = (callback) => {
23703
23763
  return t0;
23704
23764
  };
23705
23765
 
23706
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/thread/topAnchor/topAnchorUtils.js
23766
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/thread/topAnchor/topAnchorUtils.js
23707
23767
  var parseCssLength = (value, element2) => {
23708
23768
  const match = value.trim().match(/^(\d+(?:\.\d+)?|\.\d+)(em|px|rem)$/);
23709
23769
  if (!match) return Number.POSITIVE_INFINITY;
@@ -23737,7 +23797,7 @@ var snapScrollTop = (top) => {
23737
23797
  return Math.round(top * pixelRatio) / pixelRatio;
23738
23798
  };
23739
23799
 
23740
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/message/MessageRoot.js
23800
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/message/MessageRoot.js
23741
23801
  import { jsx as jsx54 } from "react/jsx-runtime";
23742
23802
  var useIsHoveringRef = () => {
23743
23803
  const $ = c(4);
@@ -23774,7 +23834,7 @@ var useIsHoveringRef = () => {
23774
23834
  };
23775
23835
  var useIsTopAnchorUser = () => {
23776
23836
  const $ = c(2);
23777
- const activeAnchorId = useThreadViewport(_temp46);
23837
+ const activeAnchorId = useThreadViewport(_temp48);
23778
23838
  let t0;
23779
23839
  if ($[0] !== activeAnchorId) {
23780
23840
  t0 = (s_0) => s_0.message.role === "user" && s_0.message.index > 0 && s_0.message.index === s_0.thread.messages.length - 2 && s_0.thread.messages.at(-1)?.role === "assistant" && (s_0.message.id === activeAnchorId || s_0.thread.isRunning);
@@ -23890,7 +23950,7 @@ var MessagePrimitiveRootTopAnchor = (t0) => {
23890
23950
  } else t1 = $[6];
23891
23951
  const topAnchorTargetRef = useTopAnchorTargetRef(t1);
23892
23952
  const ref = useComposedRefs(forwardedRef, isHoveringRef, topAnchorUserRef, topAnchorTargetRef);
23893
- const messageId = useAuiState(_temp47);
23953
+ const messageId = useAuiState(_temp49);
23894
23954
  const t2 = isTopAnchorUser ? "" : void 0;
23895
23955
  const t3 = isTopAnchorTarget ? "" : void 0;
23896
23956
  let t4;
@@ -23942,7 +24002,7 @@ var MessagePrimitiveRoot = forwardRef((props, forwardedRef) => {
23942
24002
  return t0;
23943
24003
  });
23944
24004
  MessagePrimitiveRoot.displayName = "MessagePrimitive.Root";
23945
- function _temp46(s) {
24005
+ function _temp48(s) {
23946
24006
  return s.topAnchorTurn?.anchorId;
23947
24007
  }
23948
24008
  function _temp215(s) {
@@ -23951,11 +24011,11 @@ function _temp215(s) {
23951
24011
  function _temp310(s) {
23952
24012
  return s.message.id;
23953
24013
  }
23954
- function _temp47(s) {
24014
+ function _temp49(s) {
23955
24015
  return s.message.id;
23956
24016
  }
23957
24017
 
23958
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/message/MessageParts.js
24018
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/message/MessageParts.js
23959
24019
  import { jsx as jsx55, jsxs as jsxs7 } from "react/jsx-runtime";
23960
24020
  var webDefaultComponents = {
23961
24021
  ...defaultComponents,
@@ -24015,14 +24075,14 @@ var MessagePrimitiveParts2 = (props) => {
24015
24075
  };
24016
24076
  MessagePrimitiveParts2.displayName = "MessagePrimitive.Parts";
24017
24077
 
24018
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/message/MessageError.js
24078
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/message/MessageError.js
24019
24079
  var MessagePrimitiveError = (t0) => {
24020
24080
  const { children } = t0;
24021
24081
  return useMessageError() !== void 0 ? children : null;
24022
24082
  };
24023
24083
  MessagePrimitiveError.displayName = "MessagePrimitive.Error";
24024
24084
 
24025
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/utils/hooks/useOnResizeContent.js
24085
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/utils/hooks/useOnResizeContent.js
24026
24086
  var useOnResizeContent = (callback) => {
24027
24087
  const $ = c(2);
24028
24088
  const callbackRef = useCallbackRef(callback);
@@ -24033,7 +24093,7 @@ var useOnResizeContent = (callback) => {
24033
24093
  callbackRef();
24034
24094
  });
24035
24095
  const mutationObserver = new MutationObserver((mutations) => {
24036
- if (mutations.some(_temp48)) callbackRef();
24096
+ if (mutations.some(_temp50)) callbackRef();
24037
24097
  });
24038
24098
  resizeObserver.observe(el);
24039
24099
  mutationObserver.observe(el, {
@@ -24052,11 +24112,11 @@ var useOnResizeContent = (callback) => {
24052
24112
  } else t0 = $[1];
24053
24113
  return useManagedRef(t0);
24054
24114
  };
24055
- function _temp48(m) {
24115
+ function _temp50(m) {
24056
24116
  return m.type !== "attributes" || m.attributeName !== "style";
24057
24117
  }
24058
24118
 
24059
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/thread/useThreadViewportAutoScroll.js
24119
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/thread/useThreadViewportAutoScroll.js
24060
24120
  var useThreadViewportAutoScroll = ({ autoScroll, scrollToBottomOnRunStart = true, scrollToBottomOnInitialize = true, scrollToBottomOnThreadSwitch = true }) => {
24061
24121
  const divRef = useRef3(null);
24062
24122
  const hasMessages = useAuiState((s) => s.thread.messages.length > 0);
@@ -24185,7 +24245,7 @@ var useThreadViewportAutoScroll = ({ autoScroll, scrollToBottomOnRunStart = true
24185
24245
  return useComposedRefs(resizeRef, scrollRef, divRef);
24186
24246
  };
24187
24247
 
24188
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/thread/ThreadRoot.js
24248
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/thread/ThreadRoot.js
24189
24249
  import { jsx as jsx56 } from "react/jsx-runtime";
24190
24250
  var ThreadPrimitiveRoot = forwardRef((props, ref) => {
24191
24251
  const $ = c(6);
@@ -24234,7 +24294,7 @@ var ThreadPrimitiveRoot = forwardRef((props, ref) => {
24234
24294
  });
24235
24295
  ThreadPrimitiveRoot.displayName = "ThreadPrimitive.Root";
24236
24296
 
24237
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/utils/hooks/useSizeHandle.js
24297
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/utils/hooks/useSizeHandle.js
24238
24298
  var useSizeHandle = (register, getHeight3) => {
24239
24299
  const $ = c(3);
24240
24300
  let t0;
@@ -24261,7 +24321,7 @@ var useSizeHandle = (register, getHeight3) => {
24261
24321
  return useManagedRef(t0);
24262
24322
  };
24263
24323
 
24264
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/thread/topAnchor/computeTopAnchorSlack.js
24324
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/thread/topAnchor/computeTopAnchorSlack.js
24265
24325
  var getDocumentOffsetTop = (element2) => {
24266
24326
  let top = 0;
24267
24327
  let current = element2;
@@ -24299,7 +24359,7 @@ var computeTopAnchorReserve = ({ viewport, reserve, ...targetOptions }) => {
24299
24359
  });
24300
24360
  };
24301
24361
 
24302
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/thread/topAnchor/createReserveObservers.js
24362
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/thread/topAnchor/createReserveObservers.js
24303
24363
  var createReserveObservers = (onChange) => {
24304
24364
  const resizeObserver = new ResizeObserver(onChange);
24305
24365
  const mutationObserver = new MutationObserver(onChange);
@@ -24333,7 +24393,7 @@ var createReserveObservers = (onChange) => {
24333
24393
  };
24334
24394
  };
24335
24395
 
24336
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/thread/topAnchor/mountTopAnchorReserve.js
24396
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/thread/topAnchor/mountTopAnchorReserve.js
24337
24397
  var createFrameScheduler = (fn) => {
24338
24398
  let frame = null;
24339
24399
  return {
@@ -24417,7 +24477,7 @@ var mountTopAnchorReserve = (store) => {
24417
24477
  };
24418
24478
  };
24419
24479
 
24420
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/thread/topAnchor/useTopAnchorReserve.js
24480
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/thread/topAnchor/useTopAnchorReserve.js
24421
24481
  var useTopAnchorReserve = (enabled) => {
24422
24482
  const $ = c(4);
24423
24483
  const threadViewportStore = useThreadViewportStore();
@@ -24440,7 +24500,7 @@ var useTopAnchorReserve = (enabled) => {
24440
24500
  useLayoutEffect2(t0, t1);
24441
24501
  };
24442
24502
 
24443
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/thread/topAnchor/topAnchorTurn.js
24503
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/thread/topAnchor/topAnchorTurn.js
24444
24504
  var isTopAnchorTurnValid = (turn, messages) => {
24445
24505
  if (!turn) return false;
24446
24506
  const targetIndex = messages.findIndex((message) => message.id === turn.targetId);
@@ -24460,10 +24520,10 @@ var getActiveTopAnchorTurn = ({ isRunning, messages }) => {
24460
24520
  var getActiveTopAnchorAnchorId = (options2) => getActiveTopAnchorTurn(options2)?.anchorId;
24461
24521
  var getActiveTopAnchorTargetId = (options2) => getActiveTopAnchorTurn(options2)?.targetId;
24462
24522
 
24463
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/thread/ThreadViewport.js
24523
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/thread/ThreadViewport.js
24464
24524
  import { jsx as jsx57 } from "react/jsx-runtime";
24465
24525
  var useViewportSizeRef = () => {
24466
- const register = useThreadViewport(_temp49);
24526
+ const register = useThreadViewport(_temp51);
24467
24527
  return useSizeHandle(register, _temp216);
24468
24528
  };
24469
24529
  var useViewportElementRef = () => {
@@ -24681,7 +24741,7 @@ var ThreadPrimitiveViewport = forwardRef((t0, ref) => {
24681
24741
  return t3;
24682
24742
  });
24683
24743
  ThreadPrimitiveViewport.displayName = "ThreadPrimitive.Viewport";
24684
- function _temp49(s) {
24744
+ function _temp51(s) {
24685
24745
  return s.registerViewport;
24686
24746
  }
24687
24747
  function _temp216(el) {
@@ -24694,11 +24754,11 @@ function _temp410(s_1) {
24694
24754
  return s_1.topAnchorTurn;
24695
24755
  }
24696
24756
 
24697
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/thread/ThreadViewportFooter.js
24757
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/thread/ThreadViewportFooter.js
24698
24758
  import { jsx as jsx58 } from "react/jsx-runtime";
24699
24759
  var ThreadPrimitiveViewportFooter = forwardRef((props, forwardedRef) => {
24700
24760
  const $ = c(3);
24701
- const register = useThreadViewport(_temp50);
24761
+ const register = useThreadViewport(_temp53);
24702
24762
  const resizeRef = useSizeHandle(register, _temp217);
24703
24763
  const ref = useComposedRefs(forwardedRef, resizeRef);
24704
24764
  let t0;
@@ -24714,7 +24774,7 @@ var ThreadPrimitiveViewportFooter = forwardRef((props, forwardedRef) => {
24714
24774
  return t0;
24715
24775
  });
24716
24776
  ThreadPrimitiveViewportFooter.displayName = "ThreadPrimitive.ViewportFooter";
24717
- function _temp50(s) {
24777
+ function _temp53(s) {
24718
24778
  return s.registerContentInset;
24719
24779
  }
24720
24780
  function _temp217(el) {
@@ -24722,7 +24782,7 @@ function _temp217(el) {
24722
24782
  return el.offsetHeight + marginTop;
24723
24783
  }
24724
24784
 
24725
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/thread/ThreadSuggestion.js
24785
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/thread/ThreadSuggestion.js
24726
24786
  var useThreadSuggestion = (t0) => {
24727
24787
  const $ = c(4);
24728
24788
  const { prompt, send, clearComposer, autoSend } = t0;
@@ -24751,7 +24811,7 @@ var ThreadPrimitiveSuggestion = createActionButton("ThreadPrimitive.Suggestion",
24751
24811
  "method"
24752
24812
  ]);
24753
24813
 
24754
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/threadList/ThreadListNew.js
24814
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/threadList/ThreadListNew.js
24755
24815
  import { jsx as jsx59 } from "react/jsx-runtime";
24756
24816
  var ThreadListPrimitiveNew = forwardRef((t0, forwardedRef) => {
24757
24817
  const $ = c(15);
@@ -24769,7 +24829,7 @@ var ThreadListPrimitiveNew = forwardRef((t0, forwardedRef) => {
24769
24829
  onClick = $[2];
24770
24830
  props = $[3];
24771
24831
  }
24772
- const isMain = useAuiState(_temp51);
24832
+ const isMain = useAuiState(_temp54);
24773
24833
  const { switchToNewThread } = useThreadListNew();
24774
24834
  let t1;
24775
24835
  if ($[4] !== isMain) {
@@ -24807,11 +24867,11 @@ var ThreadListPrimitiveNew = forwardRef((t0, forwardedRef) => {
24807
24867
  return t3;
24808
24868
  });
24809
24869
  ThreadListPrimitiveNew.displayName = "ThreadListPrimitive.New";
24810
- function _temp51(s) {
24870
+ function _temp54(s) {
24811
24871
  return s.threads.newThreadId === s.threads.mainThreadId;
24812
24872
  }
24813
24873
 
24814
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/threadListFocusGroup.js
24874
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/threadListFocusGroup.js
24815
24875
  var [collection, useThreadListCollection] = dist_exports2.createCollection("ThreadList");
24816
24876
  var ThreadListCollection = collection;
24817
24877
  var ThreadListItemFocusContext = createContext(null);
@@ -24820,7 +24880,7 @@ var useThreadListItemFocus = () => {
24820
24880
  return useContext2(ThreadListItemFocusContext);
24821
24881
  };
24822
24882
 
24823
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/threadList/ThreadListRoot.js
24883
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/threadList/ThreadListRoot.js
24824
24884
  import { jsx as jsx60 } from "react/jsx-runtime";
24825
24885
  var ThreadListPrimitiveRoot = forwardRef((props, ref) => {
24826
24886
  const $ = c(3);
@@ -24844,7 +24904,7 @@ var ThreadListPrimitiveRoot = forwardRef((props, ref) => {
24844
24904
  });
24845
24905
  ThreadListPrimitiveRoot.displayName = "ThreadListPrimitive.Root";
24846
24906
 
24847
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/threadListItem/ThreadListItemRoot.js
24907
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/threadListItem/ThreadListItemRoot.js
24848
24908
  import { jsx as jsx61 } from "react/jsx-runtime";
24849
24909
  var ThreadListItemPrimitiveRoot = forwardRef((props, ref) => {
24850
24910
  const isMain = useAuiState((s) => s.threads.mainThreadId === s.threadListItem.id);
@@ -24893,7 +24953,7 @@ var ThreadListItemPrimitiveRoot = forwardRef((props, ref) => {
24893
24953
  });
24894
24954
  ThreadListItemPrimitiveRoot.displayName = "ThreadListItemPrimitive.Root";
24895
24955
 
24896
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/threadListItem/ThreadListItemTrigger.js
24956
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/threadListItem/ThreadListItemTrigger.js
24897
24957
  import { jsx as jsx62 } from "react/jsx-runtime";
24898
24958
  var useThreadListItemTrigger$1 = () => {
24899
24959
  const { switchTo } = useThreadListItemTrigger();
@@ -24921,7 +24981,7 @@ var ThreadListItemPrimitiveTrigger = forwardRef((props, forwardedRef) => {
24921
24981
  });
24922
24982
  ThreadListItemPrimitiveTrigger.displayName = "ThreadListItemPrimitive.Trigger";
24923
24983
 
24924
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/primitives/reasoning/useScrollLock.js
24984
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/primitives/reasoning/useScrollLock.js
24925
24985
  var useScrollLock = (animatedElementRef, animationDuration) => {
24926
24986
  const $ = c(5);
24927
24987
  const scrollContainerRef = useRef3(null);
@@ -24992,7 +25052,7 @@ var useScrollLock = (animatedElementRef, animationDuration) => {
24992
25052
  return t2;
24993
25053
  };
24994
25054
 
24995
- // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_2cd7b3ee2c411f33c6f1d9b35f0cf737/node_modules/@assistant-ui/react/dist/internal.js
25055
+ // ../../node_modules/.pnpm/@assistant-ui+react@0.15.21_@opentelemetry+api@1.9.0_@types+react-dom@19.2.3_@types+rea_c35c1873a3528ad63a8637c81c57a418/node_modules/@assistant-ui/react/dist/internal.js
24996
25056
  var internal_exports = /* @__PURE__ */ __exportAll({
24997
25057
  AssistantRuntimeImpl: () => AssistantRuntimeImpl,
24998
25058
  BaseAssistantRuntimeCore: () => BaseAssistantRuntimeCore,
@@ -25159,24 +25219,32 @@ var __iconNode9 = [
25159
25219
  ];
25160
25220
  var Maximize2 = createLucideIcon("maximize-2", __iconNode9);
25161
25221
 
25162
- // ../../node_modules/.pnpm/lucide-react@0.506.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/minimize-2.js
25222
+ // ../../node_modules/.pnpm/lucide-react@0.506.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/mic.js
25163
25223
  var __iconNode10 = [
25224
+ ["path", { d: "M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z", key: "131961" }],
25225
+ ["path", { d: "M19 10v2a7 7 0 0 1-14 0v-2", key: "1vc78b" }],
25226
+ ["line", { x1: "12", x2: "12", y1: "19", y2: "22", key: "x3vr5v" }]
25227
+ ];
25228
+ var Mic = createLucideIcon("mic", __iconNode10);
25229
+
25230
+ // ../../node_modules/.pnpm/lucide-react@0.506.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/minimize-2.js
25231
+ var __iconNode11 = [
25164
25232
  ["polyline", { points: "4 14 10 14 10 20", key: "11kfnr" }],
25165
25233
  ["polyline", { points: "20 10 14 10 14 4", key: "rlmsce" }],
25166
25234
  ["line", { x1: "14", x2: "21", y1: "10", y2: "3", key: "o5lafz" }],
25167
25235
  ["line", { x1: "3", x2: "10", y1: "21", y2: "14", key: "1atl0r" }]
25168
25236
  ];
25169
- var Minimize2 = createLucideIcon("minimize-2", __iconNode10);
25237
+ var Minimize2 = createLucideIcon("minimize-2", __iconNode11);
25170
25238
 
25171
25239
  // ../../node_modules/.pnpm/lucide-react@0.506.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/panel-left.js
25172
- var __iconNode11 = [
25240
+ var __iconNode12 = [
25173
25241
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
25174
25242
  ["path", { d: "M9 3v18", key: "fh3hqa" }]
25175
25243
  ];
25176
- var PanelLeft = createLucideIcon("panel-left", __iconNode11);
25244
+ var PanelLeft = createLucideIcon("panel-left", __iconNode12);
25177
25245
 
25178
25246
  // ../../node_modules/.pnpm/lucide-react@0.506.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/paperclip.js
25179
- var __iconNode12 = [
25247
+ var __iconNode13 = [
25180
25248
  ["path", { d: "M13.234 20.252 21 12.3", key: "1cbrk9" }],
25181
25249
  [
25182
25250
  "path",
@@ -25186,10 +25254,10 @@ var __iconNode12 = [
25186
25254
  }
25187
25255
  ]
25188
25256
  ];
25189
- var Paperclip = createLucideIcon("paperclip", __iconNode12);
25257
+ var Paperclip = createLucideIcon("paperclip", __iconNode13);
25190
25258
 
25191
25259
  // ../../node_modules/.pnpm/lucide-react@0.506.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/pencil.js
25192
- var __iconNode13 = [
25260
+ var __iconNode14 = [
25193
25261
  [
25194
25262
  "path",
25195
25263
  {
@@ -25199,34 +25267,34 @@ var __iconNode13 = [
25199
25267
  ],
25200
25268
  ["path", { d: "m15 5 4 4", key: "1mk7zo" }]
25201
25269
  ];
25202
- var Pencil = createLucideIcon("pencil", __iconNode13);
25270
+ var Pencil = createLucideIcon("pencil", __iconNode14);
25203
25271
 
25204
25272
  // ../../node_modules/.pnpm/lucide-react@0.506.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/plus.js
25205
- var __iconNode14 = [
25273
+ var __iconNode15 = [
25206
25274
  ["path", { d: "M5 12h14", key: "1ays0h" }],
25207
25275
  ["path", { d: "M12 5v14", key: "s699le" }]
25208
25276
  ];
25209
- var Plus = createLucideIcon("plus", __iconNode14);
25277
+ var Plus = createLucideIcon("plus", __iconNode15);
25210
25278
 
25211
25279
  // ../../node_modules/.pnpm/lucide-react@0.506.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/search.js
25212
- var __iconNode15 = [
25280
+ var __iconNode16 = [
25213
25281
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
25214
25282
  ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
25215
25283
  ];
25216
- var Search = createLucideIcon("search", __iconNode15);
25284
+ var Search = createLucideIcon("search", __iconNode16);
25217
25285
 
25218
25286
  // ../../node_modules/.pnpm/lucide-react@0.506.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/square.js
25219
- var __iconNode16 = [
25287
+ var __iconNode17 = [
25220
25288
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
25221
25289
  ];
25222
- var Square = createLucideIcon("square", __iconNode16);
25290
+ var Square = createLucideIcon("square", __iconNode17);
25223
25291
 
25224
25292
  // ../../node_modules/.pnpm/lucide-react@0.506.0_react@19.2.7/node_modules/lucide-react/dist/esm/icons/x.js
25225
- var __iconNode17 = [
25293
+ var __iconNode18 = [
25226
25294
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
25227
25295
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
25228
25296
  ];
25229
- var X = createLucideIcon("x", __iconNode17);
25297
+ var X = createLucideIcon("x", __iconNode18);
25230
25298
 
25231
25299
  // src/ui/input.tsx
25232
25300
  import * as React2 from "react";
@@ -28634,7 +28702,7 @@ function ThreadListNew(props) {
28634
28702
  function ThreadListSearch({ value, onValueChange }) {
28635
28703
  return /* @__PURE__ */ jsxs10("div", { "data-slot": "aui_thread-list-search", className: cn("relative px-0.5 py-1"), children: [
28636
28704
  /* @__PURE__ */ jsx66(Search, { "data-slot": "aui_thread-list-search-icon", className: cn("text-muted-foreground pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2") }),
28637
- /* @__PURE__ */ jsx66(Input, { type: "search", value, onChange: (event) => onValueChange(event.target.value), "aria-label": "\u641C\u7D22\u4F1A\u8BDD", placeholder: "\u641C\u7D22\u4F1A\u8BDD", className: cn("border-foreground/10 bg-background h-8 ps-8 text-[13px]") })
28705
+ /* @__PURE__ */ jsx66(Input, { type: "search", value, onChange: (event) => onValueChange(event.target.value), "aria-label": "\u641C\u7D22\u4F1A\u8BDD", placeholder: "\u641C\u7D22\u4F1A\u8BDD", className: cn("border-foreground/10 bg-background h-8 ps-8 text-[13px] md:text-[13px]") })
28638
28706
  ] });
28639
28707
  }
28640
28708
  function ThreadListItem({ disabled, menu }) {
@@ -28694,7 +28762,7 @@ function ThreadListItemRename({ onDone }) {
28694
28762
  "aria-label": "\u4F1A\u8BDD\u540D\u79F0",
28695
28763
  maxLength: 80,
28696
28764
  value,
28697
- className: cn("h-7 min-w-0 flex-1 ps-2 pe-8 text-[13px]"),
28765
+ className: cn("h-7 min-w-0 flex-1 ps-2 pe-8 text-[13px] md:text-[13px]"),
28698
28766
  onChange: (event) => setValue(event.target.value),
28699
28767
  onBlur: () => commit(false),
28700
28768
  onKeyDown: (event) => {
@@ -29086,7 +29154,7 @@ function Composer({ children, inputProps, actions, ...props }) {
29086
29154
  },
29087
29155
  children: /* @__PURE__ */ jsxs16("div", { "data-slot": "aui_composer-shell", className: cn("border-foreground/10 bg-muted/30 focus-within:border-foreground/25 data-[dragging=true]:border-foreground/40 rounded-thread flex flex-col border transition-colors data-[dragging=true]:border-dashed"), children: [
29088
29156
  /* @__PURE__ */ jsx74("div", { className: cn("has-[.aui-attachment-root]:px-3 has-[.aui-attachment-root]:pt-3"), children }),
29089
- /* @__PURE__ */ jsx74(ComposerPrimitiveInput, { asChild: true, ...inputProps, children: /* @__PURE__ */ jsx74("textarea", { "data-composer-input": true, rows: 1, className: cn("placeholder:text-muted-foreground field-sizing-content max-h-48 w-full resize-none bg-transparent px-4 pt-3 pb-2 text-base leading-6 focus:outline-none") }) }),
29157
+ /* @__PURE__ */ jsx74(ComposerPrimitiveInput, { asChild: true, ...inputProps, children: /* @__PURE__ */ jsx74("textarea", { "data-composer-input": true, rows: 1, className: cn("placeholder:text-muted-foreground field-sizing-content block max-h-48 w-full resize-none bg-transparent px-4 pt-3 pb-2 text-base leading-6 focus:outline-none") }) }),
29090
29158
  /* @__PURE__ */ jsx74("div", { className: cn("flex items-center justify-between gap-2 px-2 pb-2"), children: actions })
29091
29159
  ] })
29092
29160
  }
@@ -29186,10 +29254,10 @@ function AvatarFallback3({ className, ...props }) {
29186
29254
  }
29187
29255
 
29188
29256
  // src/default-chat.tsx
29189
- import { forwardRef as forwardRef33, useEffect as useEffect33, useLayoutEffect as useLayoutEffect13, useMemo as useMemo12, useRef as useRef38, useState as useState37 } from "react";
29257
+ import { forwardRef as forwardRef33, useEffect as useEffect34, useLayoutEffect as useLayoutEffect14, useMemo as useMemo13, useRef as useRef39, useState as useState39 } from "react";
29190
29258
 
29191
29259
  // src/assistant-runtime.tsx
29192
- import { useEffect as useEffect26, useLayoutEffect as useLayoutEffect11, useReducer as useReducer5, useRef as useRef29, useState as useState27 } from "react";
29260
+ import { useEffect as useEffect26, useLayoutEffect as useLayoutEffect12, useReducer as useReducer5, useRef as useRef30, useState as useState28 } from "react";
29193
29261
 
29194
29262
  // src/assistant-attachments.ts
29195
29263
  import { ImageInputContentSchema, TextInputContentSchema } from "@ag-ui/core";
@@ -29330,6 +29398,154 @@ var AssistantAttachments = class {
29330
29398
 
29331
29399
  // src/assistant-runtime.tsx
29332
29400
  import { assertChatSendable } from "./react.js";
29401
+
29402
+ // src/voice/use-voice.ts
29403
+ import { useLayoutEffect as useLayoutEffect11, useMemo as useMemo10, useRef as useRef29, useState as useState27 } from "react";
29404
+ function useVoiceInput(options2) {
29405
+ const latest = useRef29(options2);
29406
+ latest.current = options2;
29407
+ const source = options2.dictation || void 0;
29408
+ const enabled = Boolean(source);
29409
+ const [status, setStatus] = useState27("idle");
29410
+ const owner = useRef29(void 0);
29411
+ const generation = useRef29(0);
29412
+ const cancel = () => {
29413
+ owner.current?.();
29414
+ generation.current++;
29415
+ };
29416
+ const dictation = useMemo10(() => ({
29417
+ disableInputDuringDictation: true,
29418
+ listen() {
29419
+ const config = latest.current;
29420
+ if (!config.active || !config.open || config.blocked || !config.dictation || !source) throw new Error("\u5F53\u524D\u65E0\u6CD5\u5F00\u59CB\u8BED\u97F3\u8F93\u5165\u3002");
29421
+ cancel();
29422
+ const token = ++generation.current;
29423
+ const composer = config.composer();
29424
+ const original = composer.getState().text;
29425
+ const starts = /* @__PURE__ */ new Set();
29426
+ const speeches = /* @__PURE__ */ new Set();
29427
+ const ends = /* @__PURE__ */ new Set();
29428
+ let input;
29429
+ const subscriptions = [];
29430
+ let confirmed = original;
29431
+ let hasConfirmed = false;
29432
+ let ended = false;
29433
+ let status2 = { type: "starting" };
29434
+ const emit = (listeners, value) => {
29435
+ for (const callback of [...listeners]) callback(value);
29436
+ };
29437
+ const valid2 = () => !ended && generation.current === token;
29438
+ const restore = () => {
29439
+ try {
29440
+ composer.setText(original);
29441
+ } catch {
29442
+ }
29443
+ };
29444
+ const finish = (reason) => {
29445
+ if (!valid2()) return;
29446
+ ended = true;
29447
+ status2 = { type: "ended", reason };
29448
+ owner.current = void 0;
29449
+ for (const unsubscribe of subscriptions.splice(0)) unsubscribe();
29450
+ if (reason !== "stopped" || !hasConfirmed) restore();
29451
+ else composer.setText(confirmed);
29452
+ emit(ends, { transcript: "", isFinal: true });
29453
+ if (reason === "stopped" && !hasConfirmed) latest.current.notice("\u672A\u8BC6\u522B\u5230\u8BED\u97F3\uFF0C\u8BF7\u91CD\u8BD5\u3002");
29454
+ setStatus("idle");
29455
+ };
29456
+ const terminate = () => {
29457
+ if (ended) return;
29458
+ if (valid2()) {
29459
+ finish("cancelled");
29460
+ generation.current++;
29461
+ }
29462
+ try {
29463
+ input?.cancel();
29464
+ } catch {
29465
+ }
29466
+ };
29467
+ const session = {
29468
+ get status() {
29469
+ if (!ended && input?.status.type === "ended") queueMicrotask(complete);
29470
+ return ended ? status2 : input?.status ?? status2;
29471
+ },
29472
+ stop: async () => {
29473
+ if (!valid2()) return;
29474
+ setStatus("transcribing");
29475
+ try {
29476
+ await input?.stop();
29477
+ if (valid2()) complete();
29478
+ } catch (error) {
29479
+ failure(error);
29480
+ }
29481
+ },
29482
+ cancel: terminate,
29483
+ onSpeechStart(callback) {
29484
+ starts.add(callback);
29485
+ return () => starts.delete(callback);
29486
+ },
29487
+ onSpeech(callback) {
29488
+ speeches.add(callback);
29489
+ return () => speeches.delete(callback);
29490
+ },
29491
+ onSpeechEnd(callback) {
29492
+ ends.add(callback);
29493
+ return () => ends.delete(callback);
29494
+ }
29495
+ };
29496
+ owner.current = terminate;
29497
+ config.notice("");
29498
+ setStatus("starting");
29499
+ const failure = (error) => {
29500
+ if (!valid2()) return;
29501
+ const cancelled = error instanceof DOMException && error.name === "AbortError";
29502
+ finish(cancelled ? "cancelled" : "error");
29503
+ try {
29504
+ input?.cancel();
29505
+ } catch {
29506
+ }
29507
+ if (!cancelled) latest.current.notice(error instanceof Error ? error.message : "\u8BED\u97F3\u8F93\u5165\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002");
29508
+ };
29509
+ const complete = () => {
29510
+ if (!valid2()) return;
29511
+ const reason = input?.status.type === "ended" ? input.status.reason : "stopped";
29512
+ if (reason === "error") failure(new Error("\u8BED\u97F3\u8F93\u5165\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u6388\u6743\u3001\u9EA6\u514B\u98CE\u6743\u9650\u548C\u7F51\u7EDC\u3002"));
29513
+ else finish(reason);
29514
+ };
29515
+ try {
29516
+ input = source.listen();
29517
+ const started = () => {
29518
+ if (!valid2()) return;
29519
+ status2 = { type: "running" };
29520
+ setStatus("recording");
29521
+ for (const callback of [...starts]) callback();
29522
+ };
29523
+ subscriptions.push(input.onSpeechStart(started));
29524
+ subscriptions.push(input.onSpeech((result) => {
29525
+ if (!valid2()) return;
29526
+ emit(speeches, result);
29527
+ if (result.isFinal !== false) {
29528
+ confirmed = composer.getState().text;
29529
+ hasConfirmed ||= Boolean(result.transcript.trim());
29530
+ }
29531
+ }));
29532
+ subscriptions.push(input.onSpeechEnd(complete));
29533
+ if (input.status.type === "running") queueMicrotask(started);
29534
+ if (input.status.type === "ended") queueMicrotask(complete);
29535
+ } catch (error) {
29536
+ queueMicrotask(() => failure(error));
29537
+ }
29538
+ return session;
29539
+ }
29540
+ }), [source]);
29541
+ useLayoutEffect11(() => {
29542
+ if (!options2.active || !options2.open || options2.blocked || !enabled) cancel();
29543
+ }, [options2.active, options2.open, options2.blocked, enabled]);
29544
+ useLayoutEffect11(() => () => cancel(), [source, options2.sessionId]);
29545
+ return { dictation: enabled ? dictation : void 0, state: { status, supported: enabled, cancel } };
29546
+ }
29547
+
29548
+ // src/assistant-runtime.tsx
29333
29549
  import { jsx as jsx78 } from "react/jsx-runtime";
29334
29550
  function parseToolArgs(text7) {
29335
29551
  try {
@@ -29362,20 +29578,29 @@ function projectMessages(messages) {
29362
29578
  }
29363
29579
  return projected;
29364
29580
  }
29365
- function SessionRuntime({ id, chat, options: options2, blocked, active, onEdit, children }) {
29366
- const latest = useRef29(chat);
29367
- useLayoutEffect11(() => {
29581
+ function SessionRuntime({ id, chat, options: options2, dictation, open = true, blocked, active, onEdit, children }) {
29582
+ const latest = useRef30(chat);
29583
+ useLayoutEffect12(() => {
29368
29584
  latest.current = chat;
29369
29585
  });
29370
- const messages = useRef29([]);
29586
+ const messages = useRef30([]);
29371
29587
  if (chat.activeSessionId === id) messages.current = chat.messages;
29372
29588
  const [, refresh] = useReducer5((n) => n + 1, 0);
29373
- const [notice, setNotice] = useState27("");
29374
- const [sending, setSending] = useState27(false);
29375
- const sendLock = useRef29(false);
29376
- const [attachments] = useState27(() => new AssistantAttachments(refresh, setNotice));
29589
+ const [notice, setNotice] = useState28("");
29590
+ const [sending, setSending] = useState28(false);
29591
+ const sendLock = useRef30(false);
29592
+ const [attachments] = useState28(() => new AssistantAttachments(refresh, setNotice));
29377
29593
  attachments.options = options2 ?? {};
29378
- const alive = useRef29(false);
29594
+ const alive = useRef30(false);
29595
+ const voice = useVoiceInput({
29596
+ dictation,
29597
+ active,
29598
+ open,
29599
+ blocked: blocked || sending || attachments.blocked,
29600
+ sessionId: id,
29601
+ composer: () => runtime.thread.composer,
29602
+ notice: setNotice
29603
+ });
29379
29604
  useEffect26(() => {
29380
29605
  alive.current = true;
29381
29606
  return () => {
@@ -29389,7 +29614,7 @@ function SessionRuntime({ id, chat, options: options2, blocked, active, onEdit,
29389
29614
  messages: projectMessages(messages.current),
29390
29615
  convertMessage,
29391
29616
  isRunning: active && chat.status !== "idle" && chat.status !== "error" && chat.status !== "waiting",
29392
- isSendDisabled: !active || blocked || attachments.blocked,
29617
+ isSendDisabled: !active || blocked || attachments.blocked || voice.state.status !== "idle",
29393
29618
  onNew: async (message) => {
29394
29619
  if (!alive.current || latest.current.activeSessionId !== id) throw new MessageNotSentError("\u4F1A\u8BDD\u5DF2\u5207\u6362\uFF0C\u8BF7\u8FD4\u56DE\u539F\u4F1A\u8BDD\u91CD\u65B0\u53D1\u9001\u3002");
29395
29620
  const files = attachments.take(message.attachments ?? []);
@@ -29417,6 +29642,7 @@ function SessionRuntime({ id, chat, options: options2, blocked, active, onEdit,
29417
29642
  latest.current.cancel();
29418
29643
  },
29419
29644
  adapters: {
29645
+ dictation: voice.dictation,
29420
29646
  attachments: options2 === false ? void 0 : attachments,
29421
29647
  threadList: {
29422
29648
  threadId: id,
@@ -29432,7 +29658,7 @@ function SessionRuntime({ id, chat, options: options2, blocked, active, onEdit,
29432
29658
  });
29433
29659
  const send = async () => {
29434
29660
  const draft = runtime.thread.composer.getState();
29435
- if (!active || blocked || attachments.blocked || sendLock.current || draft.isEmpty) return;
29661
+ if (!active || blocked || attachments.blocked || sendLock.current || voice.state.status !== "idle" || draft.isEmpty) return;
29436
29662
  sendLock.current = true;
29437
29663
  setSending(true);
29438
29664
  setNotice("");
@@ -29455,16 +29681,16 @@ function SessionRuntime({ id, chat, options: options2, blocked, active, onEdit,
29455
29681
  if (alive.current) setSending(false);
29456
29682
  }
29457
29683
  };
29458
- return /* @__PURE__ */ jsx78(AssistantRuntimeProvider, { runtime, children: active ? children({ runtime, attachments, notice, setNotice, sending, send }) : null });
29684
+ return /* @__PURE__ */ jsx78(AssistantRuntimeProvider, { runtime, children: active ? children({ runtime, attachments, notice, setNotice, sending, voice: voice.state, send }) : null });
29459
29685
  }
29460
29686
 
29461
29687
  // src/ui/attachment.aui.tsx
29462
- import { useState as useState29, isValidElement as isValidElement3, createContext as createContext6, useContext as useContext7 } from "react";
29688
+ import { useState as useState30, isValidElement as isValidElement3, createContext as createContext6, useContext as useContext7 } from "react";
29463
29689
 
29464
29690
  // src/ui/use-attachment-src.ts
29465
- import { useEffect as useEffect27, useState as useState28 } from "react";
29691
+ import { useEffect as useEffect27, useState as useState29 } from "react";
29466
29692
  var useFileSrc = (file) => {
29467
- const [entry, setEntry] = useState28(void 0);
29693
+ const [entry, setEntry] = useState29(void 0);
29468
29694
  useEffect27(() => {
29469
29695
  if (!file) {
29470
29696
  setEntry(void 0);
@@ -29492,7 +29718,7 @@ var usePreview = () => {
29492
29718
  return useContext7(PreviewContext) ?? fallback;
29493
29719
  };
29494
29720
  var AttachmentPreview = ({ src }) => {
29495
- const [isLoaded, setIsLoaded] = useState29(false);
29721
+ const [isLoaded, setIsLoaded] = useState30(false);
29496
29722
  return /* @__PURE__ */ jsx79("img", { src, alt: "\u9644\u4EF6\u9884\u89C8", className: cn("block h-auto max-h-[80vh] w-auto max-w-full rounded-sm object-contain transition-opacity duration-300 motion-reduce:transition-none", isLoaded ? "aui-attachment-preview-image-loaded opacity-100" : "aui-attachment-preview-image-loading opacity-0"), onLoad: () => setIsLoaded(true) });
29497
29723
  };
29498
29724
  var AttachmentPreviewDialog = ({ children }) => {
@@ -29568,9 +29794,9 @@ var AttachmentRemove = () => {
29568
29794
  };
29569
29795
 
29570
29796
  // src/assistant-components.tsx
29571
- import { useEffect as useEffect32, useRef as useRef37, useState as useState36 } from "react";
29797
+ import { useEffect as useEffect33, useRef as useRef38, useState as useState38 } from "react";
29572
29798
 
29573
- // ../../node_modules/.pnpm/@assistant-ui+react-markdown@0.14.16_@assistant-ui+react@0.15.21_@opentelemetry+api@1.9_3f906f814c75b5f4b2a277bb379ed72b/node_modules/@assistant-ui/react-markdown/dist/memoization.js
29799
+ // ../../node_modules/.pnpm/@assistant-ui+react-markdown@0.14.16_@assistant-ui+react@0.15.21_@opentelemetry+api@1.9_51b9d4047c9ca5e4912afe903880d312/node_modules/@assistant-ui/react-markdown/dist/memoization.js
29574
29800
  import { jsx as jsx80 } from "react/jsx-runtime";
29575
29801
  var areChildrenEqual = (prev, next) => {
29576
29802
  if (typeof prev === "string") return prev === next;
@@ -29598,7 +29824,7 @@ var memoizeMarkdownComponents = (components = {}) => {
29598
29824
  }));
29599
29825
  };
29600
29826
 
29601
- // ../../node_modules/.pnpm/@assistant-ui+react-markdown@0.14.16_@assistant-ui+react@0.15.21_@opentelemetry+api@1.9_3f906f814c75b5f4b2a277bb379ed72b/node_modules/@assistant-ui/react-markdown/dist/overrides/PreOverride.js
29827
+ // ../../node_modules/.pnpm/@assistant-ui+react-markdown@0.14.16_@assistant-ui+react@0.15.21_@opentelemetry+api@1.9_51b9d4047c9ca5e4912afe903880d312/node_modules/@assistant-ui/react-markdown/dist/overrides/PreOverride.js
29602
29828
  import { jsx as jsx81 } from "react/jsx-runtime";
29603
29829
  var PreContext = (0, react_compat_exports.createContext)(null);
29604
29830
  var useIsMarkdownCodeBlock = () => {
@@ -29616,7 +29842,7 @@ var PreOverrideImpl = ({ children, fallbackPre: FallbackPre, ...rest }) => {
29616
29842
  };
29617
29843
  var PreOverride = (0, react_compat_exports.memo)(PreOverrideImpl, (prev, next) => prev.fallbackPre === next.fallbackPre && memoCompareNodes(prev, next));
29618
29844
 
29619
- // ../../node_modules/.pnpm/@assistant-ui+react-markdown@0.14.16_@assistant-ui+react@0.15.21_@opentelemetry+api@1.9_3f906f814c75b5f4b2a277bb379ed72b/node_modules/@assistant-ui/react-markdown/dist/overrides/defaultComponents.js
29845
+ // ../../node_modules/.pnpm/@assistant-ui+react-markdown@0.14.16_@assistant-ui+react@0.15.21_@opentelemetry+api@1.9_51b9d4047c9ca5e4912afe903880d312/node_modules/@assistant-ui/react-markdown/dist/overrides/defaultComponents.js
29620
29846
  import { jsx as jsx82 } from "react/jsx-runtime";
29621
29847
  var DefaultPre = ({ node: node2, ...rest }) => /* @__PURE__ */ jsx82("pre", { ...rest });
29622
29848
  var DefaultCode = ({ node: node2, ...rest }) => /* @__PURE__ */ jsx82("code", { ...rest });
@@ -29626,10 +29852,10 @@ var DefaultCodeBlockContent = ({ node: node2, components: { Pre, Code: Code2 },
29626
29852
  }) });
29627
29853
  var DefaultCodeHeader = () => null;
29628
29854
 
29629
- // ../../node_modules/.pnpm/@assistant-ui+react-markdown@0.14.16_@assistant-ui+react@0.15.21_@opentelemetry+api@1.9_3f906f814c75b5f4b2a277bb379ed72b/node_modules/@assistant-ui/react-markdown/dist/code-fence.js
29855
+ // ../../node_modules/.pnpm/@assistant-ui+react-markdown@0.14.16_@assistant-ui+react@0.15.21_@opentelemetry+api@1.9_51b9d4047c9ca5e4912afe903880d312/node_modules/@assistant-ui/react-markdown/dist/code-fence.js
29630
29856
  var parseLanguageClass = (className) => /language-([^\s]+)/.exec(className ?? "")?.[1] ?? "";
29631
29857
 
29632
- // ../../node_modules/.pnpm/@assistant-ui+react-markdown@0.14.16_@assistant-ui+react@0.15.21_@opentelemetry+api@1.9_3f906f814c75b5f4b2a277bb379ed72b/node_modules/@assistant-ui/react-markdown/dist/overrides/CodeBlock.js
29858
+ // ../../node_modules/.pnpm/@assistant-ui+react-markdown@0.14.16_@assistant-ui+react@0.15.21_@opentelemetry+api@1.9_51b9d4047c9ca5e4912afe903880d312/node_modules/@assistant-ui/react-markdown/dist/overrides/CodeBlock.js
29633
29859
  import { Fragment as Fragment10, jsx as jsx83, jsxs as jsxs20 } from "react/jsx-runtime";
29634
29860
  var DefaultCodeBlock = ({ node: node2, components: { Pre, Code: Code2, SyntaxHighlighter: SyntaxHighlighter2, CodeHeader }, language, code: code4 }) => {
29635
29861
  const components = (0, react_compat_exports.useMemo)(() => ({
@@ -29648,7 +29874,7 @@ var DefaultCodeBlock = ({ node: node2, components: { Pre, Code: Code2, SyntaxHig
29648
29874
  })] });
29649
29875
  };
29650
29876
 
29651
- // ../../node_modules/.pnpm/@assistant-ui+react-markdown@0.14.16_@assistant-ui+react@0.15.21_@opentelemetry+api@1.9_3f906f814c75b5f4b2a277bb379ed72b/node_modules/@assistant-ui/react-markdown/dist/overrides/withDefaults.js
29877
+ // ../../node_modules/.pnpm/@assistant-ui+react-markdown@0.14.16_@assistant-ui+react@0.15.21_@opentelemetry+api@1.9_51b9d4047c9ca5e4912afe903880d312/node_modules/@assistant-ui/react-markdown/dist/overrides/withDefaults.js
29652
29878
  var import_classnames = __toESM(require_classnames(), 1);
29653
29879
  var withDefaultProps = ({ className, ...defaultProps }) => ({ className: classNameProp, ...props }) => {
29654
29880
  return {
@@ -29658,7 +29884,7 @@ var withDefaultProps = ({ className, ...defaultProps }) => ({ className: classNa
29658
29884
  };
29659
29885
  };
29660
29886
 
29661
- // ../../node_modules/.pnpm/@assistant-ui+react-markdown@0.14.16_@assistant-ui+react@0.15.21_@opentelemetry+api@1.9_3f906f814c75b5f4b2a277bb379ed72b/node_modules/@assistant-ui/react-markdown/dist/overrides/CodeOverride.js
29887
+ // ../../node_modules/.pnpm/@assistant-ui+react-markdown@0.14.16_@assistant-ui+react@0.15.21_@opentelemetry+api@1.9_51b9d4047c9ca5e4912afe903880d312/node_modules/@assistant-ui/react-markdown/dist/overrides/CodeOverride.js
29662
29888
  import { Fragment as Fragment11, jsx as jsx84, jsxs as jsxs21 } from "react/jsx-runtime";
29663
29889
  function extractCode(children) {
29664
29890
  if (typeof children === "string") return children;
@@ -31366,11 +31592,11 @@ function addChildren(props, children) {
31366
31592
  }
31367
31593
  }
31368
31594
  }
31369
- function productionCreate(_, jsx98, jsxs30) {
31595
+ function productionCreate(_, jsx99, jsxs30) {
31370
31596
  return create3;
31371
31597
  function create3(_2, type, props, key) {
31372
31598
  const isStaticChildren = Array.isArray(props.children);
31373
- const fn = isStaticChildren ? jsxs30 : jsx98;
31599
+ const fn = isStaticChildren ? jsxs30 : jsx99;
31374
31600
  return key ? fn(type, props, key) : fn(type, props);
31375
31601
  }
31376
31602
  }
@@ -41473,7 +41699,7 @@ function defaultUrlTransform(value) {
41473
41699
  return "";
41474
41700
  }
41475
41701
 
41476
- // ../../node_modules/.pnpm/@assistant-ui+react-markdown@0.14.16_@assistant-ui+react@0.15.21_@opentelemetry+api@1.9_3f906f814c75b5f4b2a277bb379ed72b/node_modules/@assistant-ui/react-markdown/dist/primitives/MarkdownText.js
41702
+ // ../../node_modules/.pnpm/@assistant-ui+react-markdown@0.14.16_@assistant-ui+react@0.15.21_@opentelemetry+api@1.9_51b9d4047c9ca5e4912afe903880d312/node_modules/@assistant-ui/react-markdown/dist/primitives/MarkdownText.js
41477
41703
  import { jsx as jsx86 } from "react/jsx-runtime";
41478
41704
  var import_classnames2 = __toESM(require_classnames(), 1);
41479
41705
  var { useSmooth: useSmooth2, useSmoothStatus: useSmoothStatus2, withSmoothContextProvider: withSmoothContextProvider2 } = internal_exports;
@@ -44633,13 +44859,13 @@ function remarkGfm(options2) {
44633
44859
  }
44634
44860
 
44635
44861
  // src/ui/markdown-text.tsx
44636
- import { memo as memo6, useRef as useRef32 } from "react";
44862
+ import { memo as memo6, useRef as useRef33 } from "react";
44637
44863
 
44638
44864
  // src/ui/code-block.tsx
44639
44865
  import {
44640
44866
  useEffect as useEffect29,
44641
- useRef as useRef31,
44642
- useState as useState31
44867
+ useRef as useRef32,
44868
+ useState as useState32
44643
44869
  } from "react";
44644
44870
  import { jsx as jsx87, jsxs as jsxs23 } from "react/jsx-runtime";
44645
44871
  function CopyButton({
@@ -44647,11 +44873,11 @@ function CopyButton({
44647
44873
  onCopied,
44648
44874
  className
44649
44875
  }) {
44650
- const [copied, setCopied] = useState31(false);
44651
- const copyTimer = useRef31(
44876
+ const [copied, setCopied] = useState32(false);
44877
+ const copyTimer = useRef32(
44652
44878
  void 0
44653
44879
  );
44654
- const unmounted = useRef31(false);
44880
+ const unmounted = useRef32(false);
44655
44881
  useEffect29(() => {
44656
44882
  unmounted.current = false;
44657
44883
  return () => {
@@ -44695,7 +44921,7 @@ function CodeBlock({
44695
44921
  children,
44696
44922
  ...props
44697
44923
  }) {
44698
- const viewportRef = useRef31(null);
44924
+ const viewportRef = useRef32(null);
44699
44925
  const getText = () => copyText ?? viewportRef.current?.querySelector("pre")?.textContent ?? "";
44700
44926
  return /* @__PURE__ */ jsxs23(
44701
44927
  "figure",
@@ -44746,9 +44972,9 @@ function CodeBlock({
44746
44972
  }
44747
44973
 
44748
44974
  // src/ui/use-copy-to-clipboard.ts
44749
- import { useState as useState32 } from "react";
44975
+ import { useState as useState33 } from "react";
44750
44976
  var useCopyToClipboard = ({ copiedDuration = 3e3 } = {}) => {
44751
- const [isCopied, setIsCopied] = useState32(false);
44977
+ const [isCopied, setIsCopied] = useState33(false);
44752
44978
  const copyToClipboard = (value) => {
44753
44979
  if (!value || typeof navigator === "undefined" || !navigator.clipboard) {
44754
44980
  return;
@@ -44771,7 +44997,7 @@ function MarkdownTable({
44771
44997
  children,
44772
44998
  ...props
44773
44999
  }) {
44774
- const ref = useRef32(null);
45000
+ const ref = useRef33(null);
44775
45001
  const { isCopied, copyToClipboard } = useCopyToClipboard();
44776
45002
  const copy = () => {
44777
45003
  const table2 = ref.current;
@@ -44852,28 +45078,49 @@ var defaultComponents2 = memoizeMarkdownComponents({
44852
45078
  SyntaxHighlighter
44853
45079
  });
44854
45080
 
45081
+ // src/ui/composer-voice.tsx
45082
+ import { useEffect as useEffect30, useState as useState34 } from "react";
45083
+ import { jsx as jsx89 } from "react/jsx-runtime";
45084
+ var barCount = 64;
45085
+ function ComposerVoice({ recording }) {
45086
+ const [tick, setTick] = useState34(0);
45087
+ useEffect30(() => {
45088
+ if (!recording) return;
45089
+ const timer = setInterval(() => setTick((value) => value + 1), 100);
45090
+ return () => clearInterval(timer);
45091
+ }, [recording]);
45092
+ return /* @__PURE__ */ jsx89("div", { "data-slot": "composer-voice", "data-recording": recording || void 0, className: cn("flex h-7 min-w-0 flex-1 items-center overflow-hidden px-2"), children: /* @__PURE__ */ jsx89("div", { className: cn("flex h-6 w-full items-center justify-between overflow-hidden"), "aria-hidden": true, children: Array.from({ length: barCount }, (_, index5) => /* @__PURE__ */ jsx89(
45093
+ "span",
45094
+ {
45095
+ className: cn("w-0.5 shrink-0 rounded-full transition-[height,background-color] duration-150 motion-reduce:transition-none", recording ? "bg-foreground/50" : "bg-foreground/25"),
45096
+ style: { height: recording ? 5 + Math.abs(Math.sin(index5 * 1.35 + tick * 0.55)) * 13 : 3 }
45097
+ },
45098
+ index5
45099
+ )) }) });
45100
+ }
45101
+
44855
45102
  // src/ui/tool-group.aui.tsx
44856
45103
  import {
44857
45104
  useCallback as useCallback19,
44858
- useRef as useRef33,
44859
- useState as useState33
45105
+ useRef as useRef34,
45106
+ useState as useState35
44860
45107
  } from "react";
44861
45108
 
44862
45109
  // src/ui/collapsible.tsx
44863
45110
  import { forwardRef as forwardRef31 } from "react";
44864
- import { jsx as jsx89 } from "react/jsx-runtime";
45111
+ import { jsx as jsx90 } from "react/jsx-runtime";
44865
45112
  var Collapsible3 = forwardRef31(function Collapsible4(props, ref) {
44866
- return /* @__PURE__ */ jsx89(dist_exports7.Root, { "data-slot": "collapsible", ref, ...props });
45113
+ return /* @__PURE__ */ jsx90(dist_exports7.Root, { "data-slot": "collapsible", ref, ...props });
44867
45114
  });
44868
45115
  var CollapsibleTrigger3 = forwardRef31(function CollapsibleTrigger4(props, ref) {
44869
- return /* @__PURE__ */ jsx89(dist_exports7.Trigger, { "data-slot": "collapsible-trigger", ref, ...props });
45116
+ return /* @__PURE__ */ jsx90(dist_exports7.Trigger, { "data-slot": "collapsible-trigger", ref, ...props });
44870
45117
  });
44871
45118
  var CollapsibleContent3 = forwardRef31(function CollapsibleContent4(props, ref) {
44872
- return /* @__PURE__ */ jsx89(dist_exports7.Content, { "data-slot": "collapsible-content", ref, ...props });
45119
+ return /* @__PURE__ */ jsx90(dist_exports7.Content, { "data-slot": "collapsible-content", ref, ...props });
44873
45120
  });
44874
45121
 
44875
45122
  // src/ui/tool-group.aui.tsx
44876
- import { jsx as jsx90 } from "react/jsx-runtime";
45123
+ import { jsx as jsx91 } from "react/jsx-runtime";
44877
45124
  var ANIMATION_DURATION = 200;
44878
45125
  var toolGroupVariants = cva("aui-tool-group-root group/tool-group w-full", {
44879
45126
  variants: {
@@ -44894,8 +45141,8 @@ function ToolGroupRoot({
44894
45141
  children,
44895
45142
  ...props
44896
45143
  }) {
44897
- const collapsibleRef = useRef33(null);
44898
- const [uncontrolledOpen, setUncontrolledOpen] = useState33(defaultOpen);
45144
+ const collapsibleRef = useRef34(null);
45145
+ const [uncontrolledOpen, setUncontrolledOpen] = useState35(defaultOpen);
44899
45146
  const lockScroll = useScrollLock(collapsibleRef, ANIMATION_DURATION);
44900
45147
  const isControlled = controlledOpen !== void 0;
44901
45148
  const isOpen = isControlled ? controlledOpen : uncontrolledOpen;
@@ -44909,7 +45156,7 @@ function ToolGroupRoot({
44909
45156
  },
44910
45157
  [lockScroll, isControlled, controlledOnOpenChange]
44911
45158
  );
44912
- return /* @__PURE__ */ jsx90(
45159
+ return /* @__PURE__ */ jsx91(
44913
45160
  Collapsible3,
44914
45161
  {
44915
45162
  ref: collapsibleRef,
@@ -44935,7 +45182,7 @@ function ToolGroupContent({
44935
45182
  children,
44936
45183
  ...props
44937
45184
  }) {
44938
- return /* @__PURE__ */ jsx90(
45185
+ return /* @__PURE__ */ jsx91(
44939
45186
  CollapsibleContent3,
44940
45187
  {
44941
45188
  "data-slot": "tool-group-content",
@@ -44950,7 +45197,7 @@ function ToolGroupContent({
44950
45197
  className
44951
45198
  ),
44952
45199
  ...props,
44953
- children: /* @__PURE__ */ jsx90(
45200
+ children: /* @__PURE__ */ jsx91(
44954
45201
  "div",
44955
45202
  {
44956
45203
  className: cn(
@@ -44973,19 +45220,19 @@ function ToolGroupContent({
44973
45220
  }
44974
45221
 
44975
45222
  // src/ui/home-demo/surfaces.tsx
44976
- import { jsx as jsx91 } from "react/jsx-runtime";
45223
+ import { jsx as jsx92 } from "react/jsx-runtime";
44977
45224
  function ShimmerLabel({ active = true, className, ...props }) {
44978
- return /* @__PURE__ */ jsx91("span", { className: cn(active && "shimmer motion-reduce:animate-none", className), ...props });
45225
+ return /* @__PURE__ */ jsx92("span", { className: cn(active && "shimmer motion-reduce:animate-none", className), ...props });
44979
45226
  }
44980
45227
 
44981
45228
  // src/ui/home-demo/trace-line.tsx
44982
- import { useEffect as useEffect30, useRef as useRef34, useState as useState34 } from "react";
44983
- import { Fragment as Fragment13, jsx as jsx92, jsxs as jsxs25 } from "react/jsx-runtime";
45229
+ import { useEffect as useEffect31, useRef as useRef35, useState as useState36 } from "react";
45230
+ import { Fragment as Fragment13, jsx as jsx93, jsxs as jsxs25 } from "react/jsx-runtime";
44984
45231
  function TraceMarker({
44985
45232
  live,
44986
45233
  className
44987
45234
  }) {
44988
- return /* @__PURE__ */ jsx92(
45235
+ return /* @__PURE__ */ jsx93(
44989
45236
  "span",
44990
45237
  {
44991
45238
  "aria-hidden": true,
@@ -44999,9 +45246,9 @@ function TraceMarker({
44999
45246
  );
45000
45247
  }
45001
45248
  function useToolDuration(isRunning) {
45002
- const startTimeRef = useRef34(null);
45003
- const [duration, setDuration] = useState34(null);
45004
- useEffect30(() => {
45249
+ const startTimeRef = useRef35(null);
45250
+ const [duration, setDuration] = useState36(null);
45251
+ useEffect31(() => {
45005
45252
  if (isRunning && startTimeRef.current === null) {
45006
45253
  startTimeRef.current = Date.now();
45007
45254
  setDuration(null);
@@ -45023,20 +45270,20 @@ function TraceLine({
45023
45270
  meta
45024
45271
  }) {
45025
45272
  return /* @__PURE__ */ jsxs25("div", { className: cn("my-1 flex items-baseline gap-2 font-mono text-[12px] [font-variant-ligatures:none]"), children: [
45026
- /* @__PURE__ */ jsx92(TraceMarker, { live }),
45027
- /* @__PURE__ */ jsx92("span", { className: cn("text-muted-foreground min-w-0 flex-1 truncate"), children: live ? /* @__PURE__ */ jsxs25(ShimmerLabel, { children: [
45273
+ /* @__PURE__ */ jsx93(TraceMarker, { live }),
45274
+ /* @__PURE__ */ jsx93("span", { className: cn("text-muted-foreground min-w-0 flex-1 truncate"), children: live ? /* @__PURE__ */ jsxs25(ShimmerLabel, { children: [
45028
45275
  label,
45029
45276
  detail ? ` ${detail}` : null
45030
45277
  ] }) : /* @__PURE__ */ jsxs25(Fragment13, { children: [
45031
45278
  label,
45032
45279
  detail ? ` ${detail}` : null
45033
45280
  ] }) }),
45034
- meta ? /* @__PURE__ */ jsx92("span", { className: cn("text-muted-foreground/50 shrink-0"), children: meta }) : null
45281
+ meta ? /* @__PURE__ */ jsx93("span", { className: cn("text-muted-foreground/50 shrink-0"), children: meta }) : null
45035
45282
  ] });
45036
45283
  }
45037
45284
 
45038
45285
  // src/ui/home-demo/trace.tsx
45039
- import { Fragment as Fragment14, jsx as jsx93, jsxs as jsxs26 } from "react/jsx-runtime";
45286
+ import { Fragment as Fragment14, jsx as jsx94, jsxs as jsxs26 } from "react/jsx-runtime";
45040
45287
  var disclosureContentClass = "border-foreground/10 ms-[5px] border-s ps-4";
45041
45288
  function DisclosureTrigger({
45042
45289
  live,
@@ -45044,14 +45291,14 @@ function DisclosureTrigger({
45044
45291
  detail
45045
45292
  }) {
45046
45293
  return /* @__PURE__ */ jsxs26(CollapsibleTrigger3, { "data-slot": "tool-group-trigger", className: cn("group/trigger my-1 flex max-w-full items-baseline gap-2 text-left font-mono text-[12px] outline-none [font-variant-ligatures:none] focus-visible:underline"), children: [
45047
- /* @__PURE__ */ jsx93(
45294
+ /* @__PURE__ */ jsx94(
45048
45295
  TraceMarker,
45049
45296
  {
45050
45297
  live,
45051
45298
  className: cn("group-data-[state=open]/trigger:rotate-90")
45052
45299
  }
45053
45300
  ),
45054
- /* @__PURE__ */ jsx93("span", { className: cn("text-muted-foreground group-hover/trigger:text-foreground min-w-0 truncate transition-colors"), children: live ? /* @__PURE__ */ jsxs26(ShimmerLabel, { children: [
45301
+ /* @__PURE__ */ jsx94("span", { className: cn("text-muted-foreground group-hover/trigger:text-foreground min-w-0 truncate transition-colors"), children: live ? /* @__PURE__ */ jsxs26(ShimmerLabel, { children: [
45055
45302
  label,
45056
45303
  detail ? ` ${detail}` : null
45057
45304
  ] }) : /* @__PURE__ */ jsxs26(Fragment14, { children: [
@@ -45066,8 +45313,8 @@ function ToolCall({ toolName, args, argsText, result, status, isError, showDetai
45066
45313
  const label = tool2?.toolState === "unknown" ? "Result unknown" : tool2?.toolState === "rejected" ? "Rejected" : tool2?.toolState === "cancelled" ? "Stopped" : tool2?.toolState === "not_started" ? "Not started" : tool2?.toolState === "failed" || isError ? "Failed" : void 0;
45067
45314
  const live = !label && status?.type === "running";
45068
45315
  const duration = useToolDuration(live);
45069
- const line = /* @__PURE__ */ jsx93(TraceLine, { live, label: label ?? (live ? "running" : "ran"), detail: toolName, ...duration === null ? {} : { meta: formatDuration(duration) } });
45070
- const reason = error && !error.parentErrorId && error.scope === "tool" && error.execution !== "unknown" ? /* @__PURE__ */ jsx93("p", { role: "alert", className: cn("mt-2 border-l-2 pl-3 text-[13px] border-destructive/60 text-destructive"), children: error.userMessage }) : null;
45316
+ const line = /* @__PURE__ */ jsx94(TraceLine, { live, label: label ?? (live ? "running" : "ran"), detail: toolName, ...duration === null ? {} : { meta: formatDuration(duration) } });
45317
+ const reason = error && !error.parentErrorId && error.scope === "tool" && error.execution !== "unknown" ? /* @__PURE__ */ jsx94("p", { role: "alert", className: cn("mt-2 border-l-2 pl-3 text-[13px] border-destructive/60 text-destructive"), children: error.userMessage }) : null;
45071
45318
  if (!showDetails) return /* @__PURE__ */ jsxs26(Fragment14, { children: [
45072
45319
  line,
45073
45320
  reason
@@ -45076,17 +45323,17 @@ function ToolCall({ toolName, args, argsText, result, status, isError, showDetai
45076
45323
  line,
45077
45324
  reason,
45078
45325
  /* @__PURE__ */ jsxs26(Collapsible3, { children: [
45079
- /* @__PURE__ */ jsx93(DisclosureTrigger, { live: false, label: "\u64CD\u4F5C\u660E\u7EC6" }),
45326
+ /* @__PURE__ */ jsx94(DisclosureTrigger, { live: false, label: "\u64CD\u4F5C\u660E\u7EC6" }),
45080
45327
  /* @__PURE__ */ jsxs26(CollapsibleContent3, { className: cn(disclosureContentClass), children: [
45081
- /* @__PURE__ */ jsx93("pre", { className: cn("overflow-x-auto text-xs"), "aria-label": "\u64CD\u4F5C\u8F93\u5165", children: argsText || JSON.stringify(args, null, 2) }),
45082
- result !== void 0 ? /* @__PURE__ */ jsx93("pre", { className: cn("overflow-x-auto text-xs"), "aria-label": "\u64CD\u4F5C\u8F93\u51FA", children: error ? error.userMessage : tool2?.toolState === "cancelled" ? "Stopped" : tool2?.toolState === "rejected" ? "Rejected" : tool2?.toolState === "not_started" ? "Not started" : typeof result === "string" ? result : JSON.stringify(result, null, 2) }) : null
45328
+ /* @__PURE__ */ jsx94("pre", { className: cn("overflow-x-auto text-xs"), "aria-label": "\u64CD\u4F5C\u8F93\u5165", children: argsText || JSON.stringify(args, null, 2) }),
45329
+ result !== void 0 ? /* @__PURE__ */ jsx94("pre", { className: cn("overflow-x-auto text-xs"), "aria-label": "\u64CD\u4F5C\u8F93\u51FA", children: error ? error.userMessage : tool2?.toolState === "cancelled" ? "Stopped" : tool2?.toolState === "rejected" ? "Rejected" : tool2?.toolState === "not_started" ? "Not started" : typeof result === "string" ? result : JSON.stringify(result, null, 2) }) : null
45083
45330
  ] })
45084
45331
  ] })
45085
45332
  ] });
45086
45333
  }
45087
45334
 
45088
45335
  // src/ui/reasoning.aui.tsx
45089
- import { memo as memo7, useCallback as useCallback21, useRef as useRef36 } from "react";
45336
+ import { memo as memo7, useCallback as useCallback21, useRef as useRef37 } from "react";
45090
45337
 
45091
45338
  // src/ui/reasoning.tsx
45092
45339
  import {
@@ -45094,12 +45341,12 @@ import {
45094
45341
  createContext as createContext8,
45095
45342
  useCallback as useCallback20,
45096
45343
  useContext as useContext10,
45097
- useEffect as useEffect31,
45098
- useLayoutEffect as useLayoutEffect12,
45099
- useRef as useRef35,
45100
- useState as useState35
45344
+ useEffect as useEffect32,
45345
+ useLayoutEffect as useLayoutEffect13,
45346
+ useRef as useRef36,
45347
+ useState as useState37
45101
45348
  } from "react";
45102
- import { jsx as jsx94, jsxs as jsxs27 } from "react/jsx-runtime";
45349
+ import { jsx as jsx95, jsxs as jsxs27 } from "react/jsx-runtime";
45103
45350
  var ANIMATION_DURATION2 = 200;
45104
45351
  var ReasoningPreviewContext = createContext8(false);
45105
45352
  var reasoningVariants = cva("aui-reasoning-root mb-4 w-full", {
@@ -45125,13 +45372,13 @@ var ReasoningRoot = forwardRef32(function ReasoningRoot2({
45125
45372
  children,
45126
45373
  ...props
45127
45374
  }, ref) {
45128
- const [initialOpen] = useState35(defaultOpen);
45129
- const [userOpen, setUserOpen] = useState35(null);
45375
+ const [initialOpen] = useState37(defaultOpen);
45376
+ const [userOpen, setUserOpen] = useState37(null);
45130
45377
  const isControlled = controlledOpen !== void 0;
45131
45378
  const isOpen = isControlled ? controlledOpen : userOpen ?? (streaming || initialOpen);
45132
45379
  const isPreview = streaming === true && isOpen;
45133
- const prevStreamingRef = useRef35(streaming);
45134
- useLayoutEffect12(() => {
45380
+ const prevStreamingRef = useRef36(streaming);
45381
+ useLayoutEffect13(() => {
45135
45382
  if (prevStreamingRef.current === streaming) return;
45136
45383
  prevStreamingRef.current = streaming;
45137
45384
  if (!isControlled && userOpen === null && !initialOpen) {
@@ -45148,7 +45395,7 @@ var ReasoningRoot = forwardRef32(function ReasoningRoot2({
45148
45395
  },
45149
45396
  [onAnimationStart, isControlled, controlledOnOpenChange]
45150
45397
  );
45151
- return /* @__PURE__ */ jsx94(
45398
+ return /* @__PURE__ */ jsx95(
45152
45399
  Collapsible3,
45153
45400
  {
45154
45401
  "data-slot": "reasoning-root",
@@ -45164,7 +45411,7 @@ var ReasoningRoot = forwardRef32(function ReasoningRoot2({
45164
45411
  },
45165
45412
  ref,
45166
45413
  ...props,
45167
- children: /* @__PURE__ */ jsx94(ReasoningPreviewContext.Provider, { value: isPreview, children })
45414
+ children: /* @__PURE__ */ jsx95(ReasoningPreviewContext.Provider, { value: isPreview, children })
45168
45415
  }
45169
45416
  );
45170
45417
  });
@@ -45174,7 +45421,7 @@ function ReasoningFade({
45174
45421
  ...props
45175
45422
  }) {
45176
45423
  if (side === "top") {
45177
- return /* @__PURE__ */ jsx94(
45424
+ return /* @__PURE__ */ jsx95(
45178
45425
  "div",
45179
45426
  {
45180
45427
  "data-slot": "reasoning-fade",
@@ -45190,7 +45437,7 @@ function ReasoningFade({
45190
45437
  }
45191
45438
  );
45192
45439
  }
45193
- return /* @__PURE__ */ jsx94(
45440
+ return /* @__PURE__ */ jsx95(
45194
45441
  "div",
45195
45442
  {
45196
45443
  "data-slot": "reasoning-fade",
@@ -45228,9 +45475,9 @@ function ReasoningContent({
45228
45475
  ),
45229
45476
  ...props,
45230
45477
  children: [
45231
- /* @__PURE__ */ jsx94(ReasoningFade, { side: "top" }),
45478
+ /* @__PURE__ */ jsx95(ReasoningFade, { side: "top" }),
45232
45479
  children,
45233
- isPreview ? /* @__PURE__ */ jsx94(ReasoningFade, {}) : null
45480
+ isPreview ? /* @__PURE__ */ jsx95(ReasoningFade, {}) : null
45234
45481
  ]
45235
45482
  }
45236
45483
  );
@@ -45241,9 +45488,9 @@ function ReasoningText({
45241
45488
  ...props
45242
45489
  }) {
45243
45490
  const isPreview = useContext10(ReasoningPreviewContext);
45244
- const scrollRef = useRef35(null);
45245
- const contentRef = useRef35(null);
45246
- useEffect31(() => {
45491
+ const scrollRef = useRef36(null);
45492
+ const contentRef = useRef36(null);
45493
+ useEffect32(() => {
45247
45494
  if (!isPreview) return;
45248
45495
  const scrollEl = scrollRef.current;
45249
45496
  const contentEl = contentRef.current;
@@ -45276,7 +45523,7 @@ function ReasoningText({
45276
45523
  observer.disconnect();
45277
45524
  };
45278
45525
  }, [isPreview]);
45279
- return /* @__PURE__ */ jsx94(
45526
+ return /* @__PURE__ */ jsx95(
45280
45527
  "div",
45281
45528
  {
45282
45529
  ref: scrollRef,
@@ -45298,19 +45545,19 @@ function ReasoningText({
45298
45545
  className
45299
45546
  ),
45300
45547
  ...props,
45301
- children: /* @__PURE__ */ jsx94("div", { ref: contentRef, className: cn("aui-reasoning-text-content space-y-4"), children })
45548
+ children: /* @__PURE__ */ jsx95("div", { ref: contentRef, className: cn("aui-reasoning-text-content space-y-4"), children })
45302
45549
  }
45303
45550
  );
45304
45551
  }
45305
45552
 
45306
45553
  // src/ui/reasoning.aui.tsx
45307
- import { jsx as jsx95 } from "react/jsx-runtime";
45554
+ import { jsx as jsx96 } from "react/jsx-runtime";
45308
45555
  function ReasoningRoot3({
45309
45556
  ref,
45310
45557
  onAnimationStart,
45311
45558
  ...props
45312
45559
  }) {
45313
- const collapsibleRef = useRef36(null);
45560
+ const collapsibleRef = useRef37(null);
45314
45561
  const lockScroll = useScrollLock(collapsibleRef, ANIMATION_DURATION2);
45315
45562
  const handleAnimationStart = useCallback21(() => {
45316
45563
  lockScroll();
@@ -45327,7 +45574,7 @@ function ReasoningRoot3({
45327
45574
  },
45328
45575
  [ref]
45329
45576
  );
45330
- return /* @__PURE__ */ jsx95(
45577
+ return /* @__PURE__ */ jsx96(
45331
45578
  ReasoningRoot,
45332
45579
  {
45333
45580
  ref: composedRef,
@@ -45336,28 +45583,31 @@ function ReasoningRoot3({
45336
45583
  }
45337
45584
  );
45338
45585
  }
45339
- var ReasoningImpl = () => /* @__PURE__ */ jsx95(MarkdownText, {});
45586
+ var ReasoningImpl = () => /* @__PURE__ */ jsx96(MarkdownText, {});
45340
45587
  var Reasoning = memo7(ReasoningImpl);
45341
45588
  Reasoning.displayName = "Reasoning";
45342
45589
 
45343
45590
  // src/assistant-components.tsx
45344
45591
  import { attachmentAccept } from "./attachments.js";
45345
- import { Fragment as Fragment15, jsx as jsx96, jsxs as jsxs28 } from "react/jsx-runtime";
45592
+ import { Fragment as Fragment15, jsx as jsx97, jsxs as jsxs28 } from "react/jsx-runtime";
45346
45593
  function AttachmentTile({ binding, savedPreview }) {
45347
45594
  const attachment = useAuiState((s) => s.attachment);
45348
45595
  const preview = binding?.attachments.preview(attachment.id) ?? savedPreview ?? attachment.content?.find((part) => part.type === "image")?.image;
45349
- return /* @__PURE__ */ jsx96(AttachmentUI, { preview, children: /* @__PURE__ */ jsxs28("div", { className: cn("flex max-w-40 flex-col text-xs wrap-anywhere"), children: [
45350
- /* @__PURE__ */ jsx96(AttachmentPrimitiveName, {}),
45351
- binding && attachment.status.type === "requires-action" ? /* @__PURE__ */ jsx96("small", { className: cn("text-muted-foreground"), children: "\u5DF2\u5C31\u7EEA" }) : null,
45352
- attachment.status.type === "running" ? /* @__PURE__ */ jsx96("small", { className: cn("text-muted-foreground"), children: "\u6B63\u5728\u5904\u7406\u2026" }) : null,
45353
- attachment.status.type === "incomplete" ? /* @__PURE__ */ jsx96("small", { className: cn("text-destructive"), role: "alert", children: attachment.status.message ?? "\u9644\u4EF6\u5904\u7406\u5931\u8D25" }) : null
45596
+ return /* @__PURE__ */ jsx97(AttachmentUI, { preview, children: /* @__PURE__ */ jsxs28("div", { className: cn("flex max-w-40 flex-col text-xs wrap-anywhere"), children: [
45597
+ /* @__PURE__ */ jsx97(AttachmentPrimitiveName, {}),
45598
+ binding && attachment.status.type === "requires-action" ? /* @__PURE__ */ jsx97("small", { className: cn("text-muted-foreground"), children: "\u5DF2\u5C31\u7EEA" }) : null,
45599
+ attachment.status.type === "running" ? /* @__PURE__ */ jsx97("small", { className: cn("text-muted-foreground"), children: "\u6B63\u5728\u5904\u7406\u2026" }) : null,
45600
+ attachment.status.type === "incomplete" ? /* @__PURE__ */ jsx97("small", { className: cn("text-destructive"), role: "alert", children: attachment.status.message ?? "\u9644\u4EF6\u5904\u7406\u5931\u8D25" }) : null
45354
45601
  ] }) });
45355
45602
  }
45356
45603
  function AssistantComposer({ binding, options: options2, placeholder, suggestion, busy, cancelling, cancel }) {
45357
- const input = useRef37(null);
45604
+ const input = useRef38(null);
45358
45605
  const sending = binding.sending;
45606
+ const voiceBusy = binding.voice.status !== "idle";
45607
+ const inputDisabled = sending || voiceBusy;
45608
+ const voiceDisabledReason = busy ? "\u4EFB\u52A1\u6267\u884C\u4E2D\uFF0C\u6682\u4E0D\u80FD\u5F55\u97F3" : sending ? "\u6B63\u5728\u5904\u7406\u9644\u4EF6\uFF0C\u6682\u4E0D\u80FD\u5F55\u97F3" : void 0;
45359
45609
  const empty3 = useAuiState((state) => state.composer.text.length === 0);
45360
- const nextMessage = !busy && !sending && empty3 ? suggestion : void 0;
45610
+ const nextMessage = !busy && !inputDisabled && empty3 ? suggestion : void 0;
45361
45611
  const showCancel = useAuiState((state) => busy && (state.thread.isRunning || state.composer.isEmpty));
45362
45612
  const addFiles = (files) => {
45363
45613
  for (const file of files) void binding.runtime.thread.composer.addAttachment(file).catch((error) => binding.setNotice(error instanceof Error ? error.message : String(error)));
@@ -45372,8 +45622,9 @@ function AssistantComposer({ binding, options: options2, placeholder, suggestion
45372
45622
  inputProps: {
45373
45623
  "aria-label": "\u8F93\u5165 Agent \u4EFB\u52A1",
45374
45624
  placeholder: nextMessage ?? placeholder,
45375
- disabled: sending,
45625
+ disabled: inputDisabled,
45376
45626
  cancelOnEscape: false,
45627
+ addAttachmentOnPaste: !inputDisabled,
45377
45628
  onKeyDown: (event) => {
45378
45629
  if (event.keyCode === 229) event.preventDefault();
45379
45630
  else if ((event.key === "ArrowRight" || event.key === "Tab") && nextMessage && !event.nativeEvent.isComposing && !event.shiftKey && !event.ctrlKey && !event.altKey && !event.metaKey && !event.currentTarget.value) {
@@ -45386,14 +45637,15 @@ function AssistantComposer({ binding, options: options2, placeholder, suggestion
45386
45637
  }
45387
45638
  },
45388
45639
  actions: /* @__PURE__ */ jsxs28(Fragment15, { children: [
45389
- options2 !== false ? /* @__PURE__ */ jsxs28(Fragment15, { children: [
45390
- /* @__PURE__ */ jsx96(
45640
+ voiceBusy ? /* @__PURE__ */ jsx97("span", { role: "status", className: cn("sr-only"), children: binding.voice.status === "starting" ? "\u6B63\u5728\u51C6\u5907\u8BED\u97F3\u8F93\u5165\uFF0C\u8BF7\u786E\u8BA4\u9EA6\u514B\u98CE\u5DF2\u6388\u6743\u2026" : binding.voice.status === "transcribing" ? "\u6B63\u5728\u8BC6\u522B\uFF0C\u8BF7\u7A0D\u5019\u2026" : "\u6B63\u5728\u5F55\u97F3" }) : null,
45641
+ voiceBusy ? /* @__PURE__ */ jsx97(TooltipIconButton, { tooltip: "\u53D6\u6D88\u5F55\u97F3", "aria-label": "\u53D6\u6D88\u8BED\u97F3\u8F93\u5165", className: cn("size-7 shrink-0"), onClick: binding.voice.cancel, children: /* @__PURE__ */ jsx97(X, { className: cn("size-4") }) }) : options2 !== false ? /* @__PURE__ */ jsxs28(Fragment15, { children: [
45642
+ /* @__PURE__ */ jsx97(
45391
45643
  "input",
45392
45644
  {
45393
45645
  ref: input,
45394
45646
  type: "file",
45395
45647
  multiple: true,
45396
- disabled: sending,
45648
+ disabled: inputDisabled,
45397
45649
  accept: options2?.accept ?? attachmentAccept,
45398
45650
  hidden: true,
45399
45651
  onChange: (event) => {
@@ -45402,16 +45654,28 @@ function AssistantComposer({ binding, options: options2, placeholder, suggestion
45402
45654
  }
45403
45655
  }
45404
45656
  ),
45405
- /* @__PURE__ */ jsx96("button", { type: "button", className: cn("text-muted-foreground hover:text-foreground rounded-control grid size-7 shrink-0 place-items-center transition-colors"), "aria-label": "\u6DFB\u52A0\u9644\u4EF6", disabled: sending, onClick: () => input.current?.click(), children: /* @__PURE__ */ jsx96(Plus, { className: cn("size-4") }) })
45406
- ] }) : /* @__PURE__ */ jsx96("span", {}),
45407
- /* @__PURE__ */ jsx96("div", { className: cn("flex shrink-0 items-center gap-1"), children: showCancel ? /* @__PURE__ */ jsx96("button", { type: "button", "aria-label": "\u53D6\u6D88\u4EFB\u52A1", className: cn("bg-primary text-primary-foreground rounded-control grid size-7 place-items-center"), disabled: cancelling, onClick: cancel, children: /* @__PURE__ */ jsx96(Square, { className: cn("size-3 fill-current") }) }) : /* @__PURE__ */ jsx96(ComposerPrimitiveSend, { asChild: true, disabled: sending, children: /* @__PURE__ */ jsx96("button", { type: "button", onClick: (event) => {
45408
- event.preventDefault();
45409
- void binding.send();
45410
- }, "aria-label": "\u53D1\u9001\u4EFB\u52A1", className: cn("bg-primary text-primary-foreground rounded-control grid size-7 place-items-center transition-opacity disabled:opacity-40"), children: /* @__PURE__ */ jsx96(ArrowUp, { className: cn("size-4") }) }) }) })
45657
+ /* @__PURE__ */ jsx97("button", { type: "button", className: cn("text-muted-foreground hover:text-foreground rounded-control grid size-7 shrink-0 place-items-center transition-colors"), "aria-label": "\u6DFB\u52A0\u9644\u4EF6", disabled: inputDisabled, onClick: () => input.current?.click(), children: /* @__PURE__ */ jsx97(Plus, { className: cn("size-4") }) })
45658
+ ] }) : /* @__PURE__ */ jsx97("span", {}),
45659
+ voiceBusy ? /* @__PURE__ */ jsx97(ComposerVoice, { recording: binding.voice.status === "recording" }) : null,
45660
+ /* @__PURE__ */ jsxs28("div", { className: cn("flex shrink-0 items-center gap-1"), children: [
45661
+ /* @__PURE__ */ jsxs28(AuiIf, { condition: (state) => state.thread.capabilities.dictation, children: [
45662
+ /* @__PURE__ */ jsx97(AuiIf, { condition: (state) => state.composer.dictation == null, children: /* @__PURE__ */ jsx97(TooltipProvider2, { delayDuration: 0, children: /* @__PURE__ */ jsxs28(Tooltip2, { children: [
45663
+ /* @__PURE__ */ jsx97(TooltipTrigger3, { asChild: true, children: /* @__PURE__ */ jsx97("span", { className: cn("inline-flex"), tabIndex: voiceDisabledReason ? 0 : void 0, "aria-label": voiceDisabledReason, children: /* @__PURE__ */ jsx97(ComposerPrimitiveDictate, { asChild: true, disabled: busy || sending, children: /* @__PURE__ */ jsx97(Button, { variant: "ghost", size: "icon", "aria-label": "\u5F00\u59CB\u8BED\u97F3\u8F93\u5165", "aria-description": voiceDisabledReason, className: cn("size-7 p-1"), children: /* @__PURE__ */ jsx97(Mic, { className: cn("size-4") }) }) }) }) }),
45664
+ /* @__PURE__ */ jsx97(TooltipContent3, { children: voiceDisabledReason ?? "\u8BED\u97F3\u8F93\u5165" })
45665
+ ] }) }) }),
45666
+ /* @__PURE__ */ jsx97(AuiIf, { condition: (state) => state.composer.dictation != null, children: /* @__PURE__ */ jsx97(ComposerPrimitiveStopDictation, { asChild: true, disabled: binding.voice.status !== "recording", children: /* @__PURE__ */ jsx97("button", { type: "button", "aria-label": "\u7ED3\u675F\u8BED\u97F3\u8F93\u5165", title: "\u7ED3\u675F\u5F55\u97F3", className: cn("text-destructive rounded-control grid size-7 place-items-center transition-colors disabled:opacity-50"), children: /* @__PURE__ */ jsx97(Square, { className: cn("size-3 animate-pulse fill-current") }) }) }) })
45667
+ ] }),
45668
+ showCancel ? /* @__PURE__ */ jsx97("button", { type: "button", "aria-label": "\u53D6\u6D88\u4EFB\u52A1", className: cn("bg-primary text-primary-foreground rounded-control grid size-7 place-items-center"), disabled: cancelling, onClick: cancel, children: /* @__PURE__ */ jsx97(Square, { className: cn("size-3 fill-current") }) }) : /* @__PURE__ */ jsx97(ComposerPrimitiveSend, { asChild: true, disabled: inputDisabled, children: /* @__PURE__ */ jsx97("button", { type: "button", onClick: (event) => {
45669
+ event.preventDefault();
45670
+ void binding.send();
45671
+ }, "aria-label": "\u53D1\u9001\u4EFB\u52A1", className: cn("bg-primary text-primary-foreground rounded-control grid size-7 place-items-center transition-opacity disabled:opacity-40"), children: /* @__PURE__ */ jsx97(ArrowUp, { className: cn("size-4") }) }) })
45672
+ ] })
45411
45673
  ] }),
45412
45674
  children: [
45413
- /* @__PURE__ */ jsx96("div", { className: cn("aui-composer-attachments flex w-full flex-row items-center gap-2 overflow-x-auto empty:hidden"), children: /* @__PURE__ */ jsx96(ComposerPrimitiveAttachments, { children: () => /* @__PURE__ */ jsx96(AttachmentTile, { binding }) }) }),
45414
- sending ? /* @__PURE__ */ jsx96("small", { role: "status", children: "\u6B63\u5728\u5904\u7406\u9644\u4EF6\u2026" }) : null
45675
+ /* @__PURE__ */ jsx97("div", { ref: (element2) => {
45676
+ element2?.toggleAttribute("inert", inputDisabled);
45677
+ }, className: cn("aui-composer-attachments flex w-full flex-row items-center gap-2 overflow-x-auto empty:hidden"), children: /* @__PURE__ */ jsx97(ComposerPrimitiveAttachments, { children: () => /* @__PURE__ */ jsx97(AttachmentTile, { binding }) }) }),
45678
+ sending ? /* @__PURE__ */ jsx97("small", { role: "status", children: "\u6B63\u5728\u5904\u7406\u9644\u4EF6\u2026" }) : null
45415
45679
  ]
45416
45680
  }
45417
45681
  );
@@ -45420,25 +45684,25 @@ function ToolGroup({ tools, running, count: count3, children }) {
45420
45684
  const errors = tools.flatMap((tool2) => tool2.type === "tool" && tool2.error ? [tool2.error] : []);
45421
45685
  const errorIds = JSON.stringify(errors.map((error) => error.id));
45422
45686
  const hasErrors = errors.length > 0;
45423
- const [open, setOpen] = useState36(hasErrors);
45424
- useEffect32(() => {
45687
+ const [open, setOpen] = useState38(hasErrors);
45688
+ useEffect33(() => {
45425
45689
  if (errorIds !== "[]") setOpen(true);
45426
45690
  }, [errorIds]);
45427
45691
  const unknown = hasErrors && errors.every((error) => error.scope === "tool" && error.execution === "unknown");
45428
45692
  return /* @__PURE__ */ jsxs28(ToolGroupRoot, { variant: "ghost", className: cn("my-1"), open, onOpenChange: setOpen, children: [
45429
- /* @__PURE__ */ jsx96(DisclosureTrigger, { live: running && !hasErrors, label: hasErrors ? unknown ? "Result unknown" : "Failed" : running ? "running" : "ran", detail: `${count3} tools` }),
45430
- /* @__PURE__ */ jsx96(ToolGroupContent, { className: cn(disclosureContentClass), children })
45693
+ /* @__PURE__ */ jsx97(DisclosureTrigger, { live: running && !hasErrors, label: hasErrors ? unknown ? "Result unknown" : "Failed" : running ? "running" : "ran", detail: `${count3} tools` }),
45694
+ /* @__PURE__ */ jsx97(ToolGroupContent, { className: cn(disclosureContentClass), children })
45431
45695
  ] });
45432
45696
  }
45433
45697
  var GroupedParts = MessagePrimitiveGroupedParts;
45434
45698
  var groupAssistantParts = groupPartByType({ reasoning: ["group-chainOfThought", "group-reasoning"], source: ["group-chainOfThought", "group-source"], "tool-call": ["group-chainOfThought", "group-tool"], "standalone-tool-call": [] });
45435
45699
  function AssistantParts({ showDetails, tools = [] }) {
45436
- return /* @__PURE__ */ jsx96(Fragment15, { children: /* @__PURE__ */ jsx96(GroupedParts, { groupBy: groupAssistantParts, children: ({ part, children }) => {
45700
+ return /* @__PURE__ */ jsx97(Fragment15, { children: /* @__PURE__ */ jsx97(GroupedParts, { groupBy: groupAssistantParts, children: ({ part, children }) => {
45437
45701
  switch (part.type) {
45438
45702
  case "group-chainOfThought":
45439
- return /* @__PURE__ */ jsx96("div", { className: cn("mb-3"), children });
45703
+ return /* @__PURE__ */ jsx97("div", { className: cn("mb-3"), children });
45440
45704
  case "group-tool":
45441
- return part.indices.length === 1 ? /* @__PURE__ */ jsx96(Fragment15, { children }) : /* @__PURE__ */ jsx96(
45705
+ return part.indices.length === 1 ? /* @__PURE__ */ jsx97(Fragment15, { children }) : /* @__PURE__ */ jsx97(
45442
45706
  ToolGroup,
45443
45707
  {
45444
45708
  tools: tools.filter((_, index5) => part.indices.includes(index5)),
@@ -45448,23 +45712,23 @@ function AssistantParts({ showDetails, tools = [] }) {
45448
45712
  }
45449
45713
  );
45450
45714
  case "group-reasoning":
45451
- return /* @__PURE__ */ jsxs28(ReasoningRoot3, { variant: "ghost", streaming: part.status.type === "running", className: cn("my-1 mb-3"), children: [
45452
- /* @__PURE__ */ jsx96(DisclosureTrigger, { live: part.status.type === "running", label: part.status.type === "running" ? "thinking" : "reasoning" }),
45453
- /* @__PURE__ */ jsx96(ReasoningContent, { "aria-busy": part.status.type === "running", className: cn(disclosureContentClass), children: /* @__PURE__ */ jsx96(ReasoningText, { className: cn("ps-0"), children }) })
45715
+ return /* @__PURE__ */ jsxs28(ReasoningRoot3, { variant: "ghost", streaming: part.status.type === "running", className: cn("my-1"), children: [
45716
+ /* @__PURE__ */ jsx97(DisclosureTrigger, { live: part.status.type === "running", label: part.status.type === "running" ? "thinking" : "reasoning" }),
45717
+ /* @__PURE__ */ jsx97(ReasoningContent, { "aria-busy": part.status.type === "running", className: cn(disclosureContentClass), children: /* @__PURE__ */ jsx97(ReasoningText, { className: cn("ps-0"), children }) })
45454
45718
  ] });
45455
45719
  case "reasoning":
45456
- return /* @__PURE__ */ jsx96(Reasoning, { ...part });
45720
+ return /* @__PURE__ */ jsx97(Reasoning, { ...part });
45457
45721
  case "group-source":
45458
45722
  case "source":
45459
45723
  return null;
45460
45724
  case "data":
45461
45725
  return part.dataRendererUI;
45462
45726
  case "text":
45463
- return part.text === "" && part.status?.type === "running" ? /* @__PURE__ */ jsx96(TraceLine, { live: true, label: "thinking" }) : /* @__PURE__ */ jsx96(MarkdownText, {});
45727
+ return part.text === "" && part.status?.type === "running" ? /* @__PURE__ */ jsx97(TraceLine, { live: true, label: "thinking" }) : /* @__PURE__ */ jsx97(MarkdownText, {});
45464
45728
  case "tool-call":
45465
- return part.toolUI ?? /* @__PURE__ */ jsx96(ToolCall, { ...part, showDetails, presentation: tools.find((tool2) => tool2.type === "tool" && tool2.toolCallId === part.toolCallId) });
45729
+ return part.toolUI ?? /* @__PURE__ */ jsx97(ToolCall, { ...part, showDetails, presentation: tools.find((tool2) => tool2.type === "tool" && tool2.toolCallId === part.toolCallId) });
45466
45730
  case "indicator":
45467
- return /* @__PURE__ */ jsx96(TraceLine, { live: true, label: "thinking" });
45731
+ return /* @__PURE__ */ jsx97(TraceLine, { live: true, label: "thinking" });
45468
45732
  default:
45469
45733
  return null;
45470
45734
  }
@@ -45474,14 +45738,14 @@ function AssistantParts({ showDetails, tools = [] }) {
45474
45738
  // src/default-chat.tsx
45475
45739
  import { useChat } from "./react.js";
45476
45740
  import { sendErrorNotice } from "./errors.js";
45477
- import { Fragment as Fragment16, jsx as jsx97, jsxs as jsxs29 } from "react/jsx-runtime";
45741
+ import { Fragment as Fragment16, jsx as jsx98, jsxs as jsxs29 } from "react/jsx-runtime";
45478
45742
  var textOf = (message) => message.parts.flatMap((part) => part.type === "text" ? [part.text] : []).join("");
45479
45743
  var Icon2 = forwardRef33(function Icon3({ label, children, className, ...props }, ref) {
45480
- return /* @__PURE__ */ jsx97("button", { ref, type: "button", "aria-label": label, title: label, className: cn("text-muted-foreground hover:text-foreground rounded-control grid size-7 place-items-center transition-colors [&>svg]:size-4", className), ...props, children });
45744
+ return /* @__PURE__ */ jsx98("button", { ref, type: "button", "aria-label": label, title: label, className: cn("text-muted-foreground hover:text-foreground rounded-control grid size-7 place-items-center transition-colors [&>svg]:size-4", className), ...props, children });
45481
45745
  });
45482
45746
  function Resize({ label, width, onResize, side = "left", edge = "left", min: min2, max: max2 }) {
45483
- const handle2 = useRef38(null);
45484
- const drag = useRef38(null);
45747
+ const handle2 = useRef39(null);
45748
+ const drag = useRef39(null);
45485
45749
  const readWidth = () => handle2.current?.parentElement?.getBoundingClientRect().width || width;
45486
45750
  const update = () => {
45487
45751
  const element2 = handle2.current;
@@ -45491,8 +45755,8 @@ function Resize({ label, width, onResize, side = "left", edge = "left", min: min
45491
45755
  element2.setAttribute("aria-valuemin", String(Math.min(min2, current)));
45492
45756
  element2.setAttribute("aria-valuemax", String(Math.max(max2, current)));
45493
45757
  };
45494
- useLayoutEffect13(update);
45495
- useLayoutEffect13(() => {
45758
+ useLayoutEffect14(update);
45759
+ useLayoutEffect14(() => {
45496
45760
  const panel = handle2.current?.parentElement;
45497
45761
  if (!panel || typeof ResizeObserver === "undefined") return;
45498
45762
  const observer = new ResizeObserver(update);
@@ -45500,7 +45764,7 @@ function Resize({ label, width, onResize, side = "left", edge = "left", min: min
45500
45764
  return () => observer.disconnect();
45501
45765
  }, [min2, max2]);
45502
45766
  const clamp2 = (value) => Math.max(min2, Math.min(max2, window.innerWidth - 32, value));
45503
- return /* @__PURE__ */ jsx97(
45767
+ return /* @__PURE__ */ jsx98(
45504
45768
  "div",
45505
45769
  {
45506
45770
  ref: handle2,
@@ -45545,6 +45809,7 @@ function Chat({
45545
45809
  suggestions = [],
45546
45810
  suggestNextMessage,
45547
45811
  attachments = {},
45812
+ dictation,
45548
45813
  sessionSidebar = true,
45549
45814
  showToolDetails = false,
45550
45815
  onFullscreenChange,
@@ -45555,37 +45820,37 @@ function Chat({
45555
45820
  const { activeSessionId: sessionId, messages, status, interrupt } = chat;
45556
45821
  const busy = status !== "idle" && status !== "error";
45557
45822
  const sessionBusy = busy && status !== "waiting";
45558
- const [fullscreen, setFullscreen] = useState37(false);
45823
+ const [fullscreen, setFullscreen] = useState39(false);
45559
45824
  const changeFullscreen = (next) => {
45560
45825
  setFullscreen(next);
45561
45826
  onFullscreenChange?.(next);
45562
45827
  };
45563
- useLayoutEffect13(() => {
45828
+ useLayoutEffect14(() => {
45564
45829
  if (!open && fullscreen) {
45565
45830
  setFullscreen(false);
45566
45831
  onFullscreenChange?.(false);
45567
45832
  }
45568
45833
  }, [open, fullscreen, onFullscreenChange]);
45569
- const [sidebar, setSidebar] = useState37(false);
45834
+ const [sidebar, setSidebar] = useState39(false);
45570
45835
  const sidebarEnabled = sessionSidebar !== false;
45571
45836
  const sidebarLayout = layout === "inline" && !fullscreen && typeof sessionSidebar === "object" && sessionSidebar.layout === "outside" ? "outside" : "overlay";
45572
45837
  const sidebarOpen = sidebarEnabled && sidebar;
45573
- useEffect33(() => {
45838
+ useEffect34(() => {
45574
45839
  if (!sidebarEnabled) setSidebar(false);
45575
45840
  }, [sidebarEnabled]);
45576
- const [threadSearch, setThreadSearch] = useState37("");
45577
- const [width, setWidth] = useState37(546);
45578
- const [sidebarWidth, setSidebarWidth] = useState37();
45579
- const submitting = useRef38(void 0);
45580
- const [editing, setEditing] = useState37();
45581
- const [notice, setNotice] = useState37("");
45582
- const dialogReturnFocus = useRef38(null);
45583
- const panel = useRef38(null);
45584
- const sidebarWasOpen = useRef38(false);
45585
- const sidebarNav = useRef38(null);
45586
- const sidebarTrigger = useRef38(null);
45587
- const headerFocusButton = useRef38(null);
45588
- useLayoutEffect13(() => {
45841
+ const [threadSearch, setThreadSearch] = useState39("");
45842
+ const [width, setWidth] = useState39(546);
45843
+ const [sidebarWidth, setSidebarWidth] = useState39();
45844
+ const submitting = useRef39(void 0);
45845
+ const [editing, setEditing] = useState39();
45846
+ const [notice, setNotice] = useState39("");
45847
+ const dialogReturnFocus = useRef39(null);
45848
+ const panel = useRef39(null);
45849
+ const sidebarWasOpen = useRef39(false);
45850
+ const sidebarNav = useRef39(null);
45851
+ const sidebarTrigger = useRef39(null);
45852
+ const headerFocusButton = useRef39(null);
45853
+ useLayoutEffect14(() => {
45589
45854
  if (sidebarOpen) {
45590
45855
  sidebarWasOpen.current = true;
45591
45856
  sidebarNav.current?.querySelector('input[type="search"]')?.focus();
@@ -45594,7 +45859,7 @@ function Chat({
45594
45859
  if (sidebarWasOpen.current) (sidebarTrigger.current ?? headerFocusButton.current)?.focus();
45595
45860
  sidebarWasOpen.current = false;
45596
45861
  }, [sidebarOpen, sidebarLayout]);
45597
- const [dialog, updateDialog] = useState37();
45862
+ const [dialog, updateDialog] = useState39();
45598
45863
  const setDialog = (next) => {
45599
45864
  if (next) {
45600
45865
  const active = document.activeElement;
@@ -45603,21 +45868,21 @@ function Chat({
45603
45868
  }
45604
45869
  updateDialog(next);
45605
45870
  };
45606
- const byId = useMemo12(() => new Map(projectMessages(messages).map((message) => [message.id, message])), [messages]);
45607
- const visited = useRef38(/* @__PURE__ */ new Set());
45871
+ const byId = useMemo13(() => new Map(projectMessages(messages).map((message) => [message.id, message])), [messages]);
45872
+ const visited = useRef39(/* @__PURE__ */ new Set());
45608
45873
  visited.current.add(sessionId);
45609
45874
  const activeTitle = messages.length ? chat.sessions.find((session) => session.id === sessionId)?.title || title : title;
45610
45875
  const latestUser = [...messages].reverse().find((message) => message.role === "user");
45611
- useEffect33(() => {
45876
+ useEffect34(() => {
45612
45877
  if (chat.completed && chat.consumeCompletion(chat.completed.id)) onRunResult?.(chat.completed.result);
45613
45878
  }, [chat.completed, chat.consumeCompletion, onRunResult]);
45614
- useLayoutEffect13(() => {
45879
+ useLayoutEffect14(() => {
45615
45880
  dialog?.cancel?.();
45616
45881
  setNotice("");
45617
45882
  setDialog(void 0);
45618
45883
  setEditing(void 0);
45619
45884
  }, [sessionId]);
45620
- useEffect33(() => {
45885
+ useEffect34(() => {
45621
45886
  if (editing && !messages.some((message) => message.id === editing.id)) setEditing(void 0);
45622
45887
  }, [messages, editing]);
45623
45888
  const safe = (action) => {
@@ -45657,7 +45922,7 @@ function Chat({
45657
45922
  if (hasOperations) setDialog({ title: "\u4FDD\u5B58\u5E76\u91CD\u65B0\u53D1\u9001\uFF1F", description: "\u4FEE\u6539\u540E\u5C06\u91CD\u65B0\u751F\u6210\u56DE\u7B54\u3002\u6B64\u524D\u5DF2\u6267\u884C\u7684\u4E1A\u52A1\u64CD\u4F5C\u4E0D\u4F1A\u64A4\u9500\uFF0C\u91CD\u65B0\u53D1\u9001\u53EF\u80FD\u91CD\u590D\u6267\u884C\u3002", action: perform, cancel: () => reject(new Error("\u5DF2\u53D6\u6D88\u91CD\u65B0\u53D1\u9001\u3002")) });
45658
45923
  else perform();
45659
45924
  });
45660
- return /* @__PURE__ */ jsx97(Fragment16, { children: chat.sessions.filter((session) => visited.current.has(session.id)).map((session) => /* @__PURE__ */ jsx97(
45925
+ return /* @__PURE__ */ jsx98(Fragment16, { children: chat.sessions.filter((session) => visited.current.has(session.id)).map((session) => /* @__PURE__ */ jsx98(
45661
45926
  SessionRuntime,
45662
45927
  {
45663
45928
  id: session.id,
@@ -45665,6 +45930,8 @@ function Chat({
45665
45930
  options: attachments,
45666
45931
  blocked: sessionBusy,
45667
45932
  active: session.id === sessionId,
45933
+ dictation,
45934
+ open,
45668
45935
  onEdit: editThroughRuntime,
45669
45936
  children: (binding) => {
45670
45937
  const history = sidebarOpen ? /* @__PURE__ */ jsxs29("nav", { ref: sidebarNav, onKeyDown: (event) => {
@@ -45675,28 +45942,28 @@ function Chat({
45675
45942
  }, onClick: (event) => {
45676
45943
  if (event.target.closest('[data-slot="aui_thread-list-item-trigger"], [data-slot="aui_thread-list-new"]')) setSidebar(false);
45677
45944
  }, "data-slot": "nexface_session-sidebar", "data-layout": sidebarLayout, className: cn("nexface-chat__session-sidebar absolute inset-y-0 z-5 flex flex-col overflow-auto border-r border-foreground/10 bg-background shadow-lg"), style: sidebarLayout === "overlay" && sidebarWidth !== void 0 ? { width: sidebarWidth } : void 0, "aria-label": "\u4F1A\u8BDD\u5386\u53F2", children: [
45678
- sidebarLayout === "overlay" ? /* @__PURE__ */ jsx97(Resize, { label: "\u8C03\u6574\u4F1A\u8BDD\u5386\u53F2\u680F\u5BBD\u5EA6", width: sidebarWidth ?? 240, onResize: setSidebarWidth, edge: "right", min: 180, max: 400 }) : null,
45945
+ sidebarLayout === "overlay" ? /* @__PURE__ */ jsx98(Resize, { label: "\u8C03\u6574\u4F1A\u8BDD\u5386\u53F2\u680F\u5BBD\u5EA6", width: sidebarWidth ?? 240, onResize: setSidebarWidth, edge: "right", min: 180, max: 400 }) : null,
45679
45946
  /* @__PURE__ */ jsxs29("div", { className: cn("flex h-12 shrink-0 items-center gap-2 border-b border-foreground/10 px-4 md:px-5"), children: [
45680
- sidebarLayout === "overlay" ? /* @__PURE__ */ jsx97(Icon2, { label: "\u6536\u8D77\u4F1A\u8BDD\u5386\u53F2", "aria-expanded": sidebarOpen, className: cn("size-7 shrink-0"), onClick: () => setSidebar(false), children: /* @__PURE__ */ jsx97(PanelLeft, { className: cn("size-4") }) }) : null,
45947
+ sidebarLayout === "overlay" ? /* @__PURE__ */ jsx98(Icon2, { label: "\u6536\u8D77\u4F1A\u8BDD\u5386\u53F2", "aria-expanded": sidebarOpen, className: cn("size-7 shrink-0"), onClick: () => setSidebar(false), children: /* @__PURE__ */ jsx98(PanelLeft, { className: cn("size-4") }) }) : null,
45681
45948
  /* @__PURE__ */ jsxs29(Avatar3, { children: [
45682
- avatar ? /* @__PURE__ */ jsx97(AvatarImage3, { src: avatar, alt: "" }) : null,
45683
- /* @__PURE__ */ jsx97(AvatarFallback3, { children: /* @__PURE__ */ jsx97(Bot, { size: 20 }) })
45949
+ avatar ? /* @__PURE__ */ jsx98(AvatarImage3, { src: avatar, alt: "" }) : null,
45950
+ /* @__PURE__ */ jsx98(AvatarFallback3, { children: /* @__PURE__ */ jsx98(Bot, { size: 20 }) })
45684
45951
  ] }),
45685
- /* @__PURE__ */ jsx97("strong", { className: cn("min-w-0 flex-1 truncate text-[13px] font-medium"), children: title })
45952
+ /* @__PURE__ */ jsx98("strong", { className: cn("min-w-0 flex-1 truncate text-[13px] font-medium"), children: title })
45686
45953
  ] }),
45687
45954
  /* @__PURE__ */ jsxs29("div", { className: cn("flex min-h-0 flex-1 flex-col p-3"), children: [
45688
- /* @__PURE__ */ jsx97(ThreadListNew, { disabled: sessionBusy || binding.sending, onClick: (event) => {
45955
+ /* @__PURE__ */ jsx98(ThreadListNew, { disabled: sessionBusy || binding.sending, onClick: (event) => {
45689
45956
  event.preventDefault();
45690
45957
  safe(() => chat.createSession());
45691
45958
  } }),
45692
- /* @__PURE__ */ jsx97(ThreadListSearch, { value: threadSearch, onValueChange: setThreadSearch }),
45693
- /* @__PURE__ */ jsx97("small", { className: cn("text-muted-foreground mt-5 mb-1 px-2 text-xs font-medium"), children: "\u6700\u8FD1\u4F1A\u8BDD" }),
45694
- /* @__PURE__ */ jsx97(ThreadListRoot, { children: /* @__PURE__ */ jsx97(ThreadListPrimitiveItems, { children: ({ threadListItem: session2 }) => (session2.title ?? "\u65B0\u4F1A\u8BDD").toLocaleLowerCase().includes(threadSearch.trim().toLocaleLowerCase()) ? /* @__PURE__ */ jsx97(ThreadListItem, { disabled: sessionBusy || binding.sending, menu: (beginRename) => /* @__PURE__ */ jsxs29(Fragment16, { children: [
45695
- /* @__PURE__ */ jsx97(DropdownMenuItem3, { disabled: sessionBusy || binding.sending, onSelect: beginRename, children: "\u91CD\u547D\u540D" }),
45696
- /* @__PURE__ */ jsx97(DropdownMenuItem3, { variant: "destructive", disabled: busy || binding.sending, onSelect: () => setDialog({ title: "\u6E05\u7A7A\u6D88\u606F\uFF1F", description: "\u8BE5\u4F1A\u8BDD\u6D88\u606F\u5C06\u88AB\u6E05\u9664\uFF0C\u4E1A\u52A1\u64CD\u4F5C\u4E0D\u4F1A\u56DE\u6EDA\u3002", dangerous: true, action: () => chat.clearSession(session2.id) }), children: "\u6E05\u7A7A\u6D88\u606F" }),
45697
- /* @__PURE__ */ jsx97(DropdownMenuItem3, { variant: "destructive", disabled: busy || binding.sending, onSelect: () => setDialog({ title: "\u5220\u9664\u4F1A\u8BDD\uFF1F", description: "\u804A\u5929\u8BB0\u5F55\u5C06\u88AB\u5220\u9664\uFF0C\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002", dangerous: true, action: () => chat.deleteSession(session2.id) }), children: "\u5220\u9664\u4F1A\u8BDD" })
45959
+ /* @__PURE__ */ jsx98(ThreadListSearch, { value: threadSearch, onValueChange: setThreadSearch }),
45960
+ /* @__PURE__ */ jsx98("small", { className: cn("text-muted-foreground mt-5 mb-1 px-2 text-xs font-medium"), children: "\u6700\u8FD1\u4F1A\u8BDD" }),
45961
+ /* @__PURE__ */ jsx98(ThreadListRoot, { children: /* @__PURE__ */ jsx98(ThreadListPrimitiveItems, { children: ({ threadListItem: session2 }) => (session2.title ?? "\u65B0\u4F1A\u8BDD").toLocaleLowerCase().includes(threadSearch.trim().toLocaleLowerCase()) ? /* @__PURE__ */ jsx98(ThreadListItem, { disabled: sessionBusy || binding.sending, menu: (beginRename) => /* @__PURE__ */ jsxs29(Fragment16, { children: [
45962
+ /* @__PURE__ */ jsx98(DropdownMenuItem3, { disabled: sessionBusy || binding.sending, onSelect: beginRename, children: "\u91CD\u547D\u540D" }),
45963
+ /* @__PURE__ */ jsx98(DropdownMenuItem3, { variant: "destructive", disabled: busy || binding.sending, onSelect: () => setDialog({ title: "\u6E05\u7A7A\u6D88\u606F\uFF1F", description: "\u8BE5\u4F1A\u8BDD\u6D88\u606F\u5C06\u88AB\u6E05\u9664\uFF0C\u4E1A\u52A1\u64CD\u4F5C\u4E0D\u4F1A\u56DE\u6EDA\u3002", dangerous: true, action: () => chat.clearSession(session2.id) }), children: "\u6E05\u7A7A\u6D88\u606F" }),
45964
+ /* @__PURE__ */ jsx98(DropdownMenuItem3, { variant: "destructive", disabled: busy || binding.sending, onSelect: () => setDialog({ title: "\u5220\u9664\u4F1A\u8BDD\uFF1F", description: "\u804A\u5929\u8BB0\u5F55\u5C06\u88AB\u5220\u9664\uFF0C\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002", dangerous: true, action: () => chat.deleteSession(session2.id) }), children: "\u5220\u9664\u4F1A\u8BDD" })
45698
45965
  ] }) }) : null }) }),
45699
- threadSearch.trim() && !chat.sessions.some((session2) => session2.title.toLocaleLowerCase().includes(threadSearch.trim().toLocaleLowerCase())) ? /* @__PURE__ */ jsx97("div", { "data-slot": "aui_thread-list-empty", className: cn("text-muted-foreground px-2.5 py-4 text-sm"), children: "\u672A\u627E\u5230\u4F1A\u8BDD" }) : null
45966
+ threadSearch.trim() && !chat.sessions.some((session2) => session2.title.toLocaleLowerCase().includes(threadSearch.trim().toLocaleLowerCase())) ? /* @__PURE__ */ jsx98("div", { "data-slot": "aui_thread-list-empty", className: cn("text-muted-foreground px-2.5 py-4 text-sm"), children: "\u672A\u627E\u5230\u4F1A\u8BDD" }) : null
45700
45967
  ] })
45701
45968
  ] }) : null;
45702
45969
  return open ? /* @__PURE__ */ jsxs29(
@@ -45711,11 +45978,11 @@ function Chat({
45711
45978
  "data-nexface-ignore": true,
45712
45979
  style: { "--nexface-chat-panel-width": `${width}px`, ...style, ...fullscreen ? { border: 0, borderRadius: 0 } : {} },
45713
45980
  children: [
45714
- layout === "docked" && !fullscreen ? /* @__PURE__ */ jsx97(Resize, { label: "\u8C03\u6574\u804A\u5929\u5BBD\u5EA6", width, onResize: setWidth, side, edge: side === "left" ? "right" : "left", min: 320, max: 960 }) : null,
45981
+ layout === "docked" && !fullscreen ? /* @__PURE__ */ jsx98(Resize, { label: "\u8C03\u6574\u804A\u5929\u5BBD\u5EA6", width, onResize: setWidth, side, edge: side === "left" ? "right" : "left", min: 320, max: 960 }) : null,
45715
45982
  sidebarLayout === "outside" ? history : null,
45716
45983
  /* @__PURE__ */ jsxs29("section", { ref: panel, className: cn("nexface-chat__panel relative flex h-full min-h-0 overflow-hidden rounded-[inherit]"), "aria-label": `${title} chat`, children: [
45717
45984
  sidebarOpen && sidebarLayout === "overlay" ? /* @__PURE__ */ jsxs29(Fragment16, { children: [
45718
- /* @__PURE__ */ jsx97("button", { type: "button", tabIndex: -1, "aria-label": "\u5173\u95ED\u4F1A\u8BDD\u5386\u53F2\u6D6E\u5C42", className: cn("absolute inset-0 z-4 bg-black/10"), onClick: () => setSidebar(false) }),
45985
+ /* @__PURE__ */ jsx98("button", { type: "button", tabIndex: -1, "aria-label": "\u5173\u95ED\u4F1A\u8BDD\u5386\u53F2\u6D6E\u5C42", className: cn("absolute inset-0 z-4 bg-black/10"), onClick: () => setSidebar(false) }),
45719
45986
  history
45720
45987
  ] }) : null,
45721
45988
  /* @__PURE__ */ jsxs29("div", { ref: (element2) => {
@@ -45723,68 +45990,68 @@ function Chat({
45723
45990
  }, className: cn("flex min-h-0 min-w-0 flex-1 flex-col"), children: [
45724
45991
  /* @__PURE__ */ jsxs29("header", { "data-slot": "nexface_chat_header", className: cn("border-foreground/10 flex h-12 shrink-0 min-w-0 items-center gap-2 border-b px-4 md:px-5"), children: [
45725
45992
  /* @__PURE__ */ jsxs29("div", { className: cn("flex min-w-0 flex-1 items-center gap-2 whitespace-nowrap"), children: [
45726
- sidebarEnabled && (sidebarLayout === "outside" || !sidebarOpen) ? /* @__PURE__ */ jsx97(Icon2, { ref: sidebarTrigger, label: sidebarOpen ? "\u6536\u8D77\u4F1A\u8BDD\u5386\u53F2" : "\u67E5\u770B\u4F1A\u8BDD\u5386\u53F2", "aria-expanded": sidebarOpen, className: cn("size-7 shrink-0"), onClick: () => setSidebar((value) => !value), children: /* @__PURE__ */ jsx97(PanelLeft, { className: cn("size-4") }) }) : null,
45727
- /* @__PURE__ */ jsx97("strong", { className: cn("truncate text-[13px] font-medium"), children: activeTitle })
45993
+ sidebarEnabled && (sidebarLayout === "outside" || !sidebarOpen) ? /* @__PURE__ */ jsx98(Icon2, { ref: sidebarTrigger, label: sidebarOpen ? "\u6536\u8D77\u4F1A\u8BDD\u5386\u53F2" : "\u67E5\u770B\u4F1A\u8BDD\u5386\u53F2", "aria-expanded": sidebarOpen, className: cn("size-7 shrink-0"), onClick: () => setSidebar((value) => !value), children: /* @__PURE__ */ jsx98(PanelLeft, { className: cn("size-4") }) }) : null,
45994
+ /* @__PURE__ */ jsx98("strong", { className: cn("truncate text-[13px] font-medium"), children: activeTitle })
45728
45995
  ] }),
45729
45996
  /* @__PURE__ */ jsxs29("div", { className: cn("-me-1.5 ml-auto flex shrink-0 items-center gap-1.5"), children: [
45730
45997
  /* @__PURE__ */ jsxs29(DropdownMenu2, { modal: false, children: [
45731
- /* @__PURE__ */ jsx97(DropdownMenuTrigger3, { asChild: true, children: /* @__PURE__ */ jsx97(Icon2, { label: "\u66F4\u591A\u4F1A\u8BDD\u64CD\u4F5C", children: /* @__PURE__ */ jsx97(Ellipsis, {}) }) }),
45732
- /* @__PURE__ */ jsx97(DropdownMenuContent3, { align: "end", children: /* @__PURE__ */ jsx97(DropdownMenuItem3, { variant: "destructive", disabled: busy || binding.sending, onSelect: () => setDialog({ title: "\u6E05\u7A7A\u5168\u90E8\u5386\u53F2\uFF1F", description: "\u6240\u6709\u804A\u5929\u8BB0\u5F55\u5C06\u88AB\u6E05\u9664\uFF0C\u4E1A\u52A1\u64CD\u4F5C\u4E0D\u4F1A\u56DE\u6EDA\u3002", dangerous: true, action: chat.clearAllSessions }), children: "\u6E05\u7A7A\u5168\u90E8\u5386\u53F2" }) })
45998
+ /* @__PURE__ */ jsx98(DropdownMenuTrigger3, { asChild: true, children: /* @__PURE__ */ jsx98(Icon2, { label: "\u66F4\u591A\u4F1A\u8BDD\u64CD\u4F5C", children: /* @__PURE__ */ jsx98(Ellipsis, {}) }) }),
45999
+ /* @__PURE__ */ jsx98(DropdownMenuContent3, { align: "end", children: /* @__PURE__ */ jsx98(DropdownMenuItem3, { variant: "destructive", disabled: busy || binding.sending, onSelect: () => setDialog({ title: "\u6E05\u7A7A\u5168\u90E8\u5386\u53F2\uFF1F", description: "\u6240\u6709\u804A\u5929\u8BB0\u5F55\u5C06\u88AB\u6E05\u9664\uFF0C\u4E1A\u52A1\u64CD\u4F5C\u4E0D\u4F1A\u56DE\u6EDA\u3002", dangerous: true, action: chat.clearAllSessions }), children: "\u6E05\u7A7A\u5168\u90E8\u5386\u53F2" }) })
45733
46000
  ] }),
45734
- /* @__PURE__ */ jsx97(Icon2, { label: "\u65B0\u5EFA\u804A\u5929\u4F1A\u8BDD", disabled: sessionBusy || binding.sending, onClick: () => safe(() => chat.createSession()), children: /* @__PURE__ */ jsx97(Plus, {}) }),
45735
- /* @__PURE__ */ jsx97(Icon2, { ref: headerFocusButton, label: fullscreen ? "\u9000\u51FA\u5168\u5C4F" : "\u5168\u5C4F", onClick: () => changeFullscreen(!fullscreen), children: fullscreen ? /* @__PURE__ */ jsx97(Minimize2, {}) : /* @__PURE__ */ jsx97(Maximize2, {}) }),
45736
- onOpenChange ? /* @__PURE__ */ jsx97(Icon2, { label: "\u5173\u95ED Agent \u5BF9\u8BDD", onClick: () => onOpenChange(false), children: /* @__PURE__ */ jsx97(X, {}) }) : null
46001
+ /* @__PURE__ */ jsx98(Icon2, { label: "\u65B0\u5EFA\u804A\u5929\u4F1A\u8BDD", disabled: sessionBusy || binding.sending, onClick: () => safe(() => chat.createSession()), children: /* @__PURE__ */ jsx98(Plus, {}) }),
46002
+ /* @__PURE__ */ jsx98(Icon2, { ref: headerFocusButton, label: fullscreen ? "\u9000\u51FA\u5168\u5C4F" : "\u5168\u5C4F", onClick: () => changeFullscreen(!fullscreen), children: fullscreen ? /* @__PURE__ */ jsx98(Minimize2, {}) : /* @__PURE__ */ jsx98(Maximize2, {}) }),
46003
+ onOpenChange ? /* @__PURE__ */ jsx98(Icon2, { label: "\u5173\u95ED Agent \u5BF9\u8BDD", onClick: () => onOpenChange(false), children: /* @__PURE__ */ jsx98(X, {}) }) : null
45737
46004
  ] })
45738
46005
  ] }),
45739
- /* @__PURE__ */ jsx97("div", { "data-slot": "nexface_chat_body", className: cn("relative flex min-h-0 flex-1"), children: /* @__PURE__ */ jsx97(
46006
+ /* @__PURE__ */ jsx98("div", { "data-slot": "nexface_chat_body", className: cn("relative flex min-h-0 flex-1"), children: /* @__PURE__ */ jsx98(
45740
46007
  Thread,
45741
46008
  {
45742
46009
  empty: !messages.length,
45743
- welcome: /* @__PURE__ */ jsx97(Greeting, { title: welcomeMessage, description: welcomeDescription }),
45744
- suggestions: /* @__PURE__ */ jsx97(Suggestions2, { suggestions, disabled: busy || binding.sending, onSend: (prompt) => void execute(prompt) }),
46010
+ welcome: /* @__PURE__ */ jsx98(Greeting, { title: welcomeMessage, description: welcomeDescription }),
46011
+ suggestions: /* @__PURE__ */ jsx98(Suggestions2, { suggestions, disabled: busy || binding.sending || binding.voice.status !== "idle", onSend: (prompt) => void execute(prompt) }),
45745
46012
  footer: /* @__PURE__ */ jsxs29(Fragment16, { children: [
45746
- chat.storageWarning ? /* @__PURE__ */ jsx97("div", { role: "alert", className: cn("text-muted-foreground text-xs"), children: chat.storageWarning }) : null,
46013
+ chat.storageWarning ? /* @__PURE__ */ jsx98("div", { role: "alert", className: cn("text-muted-foreground text-xs"), children: chat.storageWarning }) : null,
45747
46014
  notice ? /* @__PURE__ */ jsxs29("div", { role: "status", className: cn("text-muted-foreground text-xs"), children: [
45748
46015
  notice,
45749
- /* @__PURE__ */ jsx97("button", { onClick: () => setNotice(""), children: "\xD7" })
46016
+ /* @__PURE__ */ jsx98("button", { onClick: () => setNotice(""), children: "\xD7" })
45750
46017
  ] }) : null,
45751
- binding.notice ? /* @__PURE__ */ jsxs29("div", { role: "alert", className: cn("text-muted-foreground text-xs"), children: [
45752
- binding.notice,
45753
- /* @__PURE__ */ jsx97("button", { onClick: () => binding.setNotice(""), children: "\u5173\u95ED" })
46018
+ binding.notice ? /* @__PURE__ */ jsxs29(ErrorPrimitiveRoot, { className: cn("border-destructive/60 text-destructive flex items-start gap-3 border-l-2 pl-3 text-[13px] leading-relaxed"), children: [
46019
+ /* @__PURE__ */ jsx98("span", { className: cn("min-w-0 flex-1 break-words"), children: binding.notice }),
46020
+ /* @__PURE__ */ jsx98(Icon2, { label: "\u5173\u95ED\u63D0\u793A", className: cn("text-destructive hover:text-destructive -mt-1 -mr-1 shrink-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-destructive/30"), onClick: () => binding.setNotice(""), children: /* @__PURE__ */ jsx98(X, {}) })
45754
46021
  ] }) : null
45755
46022
  ] }),
45756
- composer: /* @__PURE__ */ jsx97(AssistantComposer, { binding, options: attachments, placeholder, suggestion: nextMessage, busy: busy || Boolean(interrupt), cancelling: status === "cancelling", cancel: chat.cancel }),
46023
+ composer: /* @__PURE__ */ jsx98(AssistantComposer, { binding, options: attachments, placeholder, suggestion: nextMessage, busy: busy || Boolean(interrupt), cancelling: status === "cancelling", cancel: chat.cancel }),
45757
46024
  renderMessage: ({ message: rendered }) => {
45758
46025
  const message = byId.get(rendered.id);
45759
- return message ? /* @__PURE__ */ jsx97(Fragment16, { children: editing?.id === message.id ? /* @__PURE__ */ jsx97(
46026
+ return message ? /* @__PURE__ */ jsx98(Fragment16, { children: editing?.id === message.id ? /* @__PURE__ */ jsx98(
45760
46027
  EditComposer,
45761
46028
  {
45762
46029
  onKeyDown: (event) => {
45763
46030
  if (event.key === "Escape" && !event.nativeEvent.isComposing) setEditing(void 0);
45764
46031
  },
45765
- inputProps: { "aria-label": "\u7F16\u8F91\u6D88\u606F\u5185\u5BB9", value: editing.text, disabled: busy || binding.sending, onChange: (event) => setEditing({ ...editing, text: event.target.value }) },
46032
+ inputProps: { "aria-label": "\u7F16\u8F91\u6D88\u606F\u5185\u5BB9", value: editing.text, disabled: busy || binding.sending || binding.voice.status !== "idle", onChange: (event) => setEditing({ ...editing, text: event.target.value }) },
45766
46033
  cancelProps: { type: "button", onClick: () => setEditing(void 0) },
45767
- sendProps: { type: "button", disabled: busy || binding.sending || !editing.text.trim() && !editing.files.length },
46034
+ sendProps: { type: "button", disabled: busy || binding.sending || binding.voice.status !== "idle" || !editing.text.trim() && !editing.files.length },
45768
46035
  children: editing.files.map((file) => /* @__PURE__ */ jsxs29("div", { className: cn("bg-muted flex min-w-0 items-center gap-2 rounded-md px-3 py-2 text-sm"), children: [
45769
- /* @__PURE__ */ jsx97(Paperclip, { className: cn("size-4 shrink-0") }),
45770
- /* @__PURE__ */ jsx97("span", { className: cn("min-w-0 flex-1 truncate"), children: file.name }),
45771
- /* @__PURE__ */ jsx97(TooltipIconButton, { tooltip: "\u79FB\u9664\u9644\u4EF6", type: "button", disabled: busy || binding.sending, "aria-label": `\u79FB\u9664 ${file.name}`, onClick: () => setEditing({ ...editing, files: editing.files.filter((item) => item.id !== file.id) }), children: /* @__PURE__ */ jsx97(X, {}) })
46036
+ /* @__PURE__ */ jsx98(Paperclip, { className: cn("size-4 shrink-0") }),
46037
+ /* @__PURE__ */ jsx98("span", { className: cn("min-w-0 flex-1 truncate"), children: file.name }),
46038
+ /* @__PURE__ */ jsx98(TooltipIconButton, { tooltip: "\u79FB\u9664\u9644\u4EF6", type: "button", disabled: busy || binding.sending || binding.voice.status !== "idle", "aria-label": `\u79FB\u9664 ${file.name}`, onClick: () => setEditing({ ...editing, files: editing.files.filter((item) => item.id !== file.id) }), children: /* @__PURE__ */ jsx98(X, {}) })
45772
46039
  ] }, file.id))
45773
46040
  }
45774
- ) : /* @__PURE__ */ jsx97(Fragment16, { children: message.role === "user" ? /* @__PURE__ */ jsx97(UserMessage, { attachments: /* @__PURE__ */ jsx97("div", { className: cn("aui-user-message-attachments-end col-span-full col-start-1 row-start-1 flex w-full flex-row justify-end gap-2 empty:hidden"), children: /* @__PURE__ */ jsx97(MessagePrimitiveAttachments, { children: ({ attachment }) => /* @__PURE__ */ jsx97(AttachmentTile, { savedPreview: message.attachments?.find((file) => file.id === attachment.id)?.preview }) }) }), actions: message.id === latestUser?.id ? /* @__PURE__ */ jsx97(ActionBarPrimitiveEdit, { asChild: true, children: /* @__PURE__ */ jsx97("button", { type: "button", "aria-label": "\u7F16\u8F91\u6D88\u606F", className: cn(actionButtonClass), disabled: busy || binding.sending, onClick: () => setEditing({ id: message.id, text: textOf(message), files: message.attachments ?? [] }), children: /* @__PURE__ */ jsx97(Pencil, { className: cn("size-4") }) }) }) : null, children: /* @__PURE__ */ jsx97(MessagePrimitiveParts2, {}) }) : /* @__PURE__ */ jsx97(AssistantMessage, { children: /* @__PURE__ */ jsx97(AssistantParts, { showDetails: showToolDetails, tools: message.parts }) }) }) }) : /* @__PURE__ */ jsx97(AssistantMessage, { children: /* @__PURE__ */ jsx97(AssistantParts, { showDetails: showToolDetails }) });
46041
+ ) : /* @__PURE__ */ jsx98(Fragment16, { children: message.role === "user" ? /* @__PURE__ */ jsx98(UserMessage, { attachments: /* @__PURE__ */ jsx98("div", { className: cn("aui-user-message-attachments-end col-span-full col-start-1 row-start-1 flex w-full flex-row flex-wrap justify-end gap-2 empty:hidden"), children: /* @__PURE__ */ jsx98(MessagePrimitiveAttachments, { children: ({ attachment }) => /* @__PURE__ */ jsx98(AttachmentTile, { savedPreview: message.attachments?.find((file) => file.id === attachment.id)?.preview }) }) }), actions: message.id === latestUser?.id ? /* @__PURE__ */ jsx98(ActionBarPrimitiveEdit, { asChild: true, children: /* @__PURE__ */ jsx98("button", { type: "button", "aria-label": "\u7F16\u8F91\u6D88\u606F", className: cn(actionButtonClass), disabled: busy || binding.sending || binding.voice.status !== "idle", onClick: () => setEditing({ id: message.id, text: textOf(message), files: message.attachments ?? [] }), children: /* @__PURE__ */ jsx98(Pencil, { className: cn("size-4") }) }) }) : null, children: /* @__PURE__ */ jsx98(MessagePrimitiveParts2, {}) }) : /* @__PURE__ */ jsx98(AssistantMessage, { children: /* @__PURE__ */ jsx98(AssistantParts, { showDetails: showToolDetails, tools: message.parts }) }) }) }) : /* @__PURE__ */ jsx98(AssistantMessage, { children: /* @__PURE__ */ jsx98(AssistantParts, { showDetails: showToolDetails }) });
45775
46042
  },
45776
46043
  children: interrupt ? /* @__PURE__ */ jsxs29("section", { "aria-label": interrupt.title ?? `\u786E\u8BA4\u6267\u884C ${interrupt.toolName}\uFF1F`, className: cn("rounded-lg bg-muted p-4"), "data-mode": interrupt.mode, children: [
45777
- /* @__PURE__ */ jsx97("strong", { children: interrupt.title ?? `\u786E\u8BA4\u6267\u884C ${interrupt.toolName}\uFF1F` }),
45778
- interrupt.description ? /* @__PURE__ */ jsx97("p", { className: cn("mt-1 text-muted-foreground"), children: interrupt.description }) : null,
46044
+ /* @__PURE__ */ jsx98("strong", { children: interrupt.title ?? `\u786E\u8BA4\u6267\u884C ${interrupt.toolName}\uFF1F` }),
46045
+ interrupt.description ? /* @__PURE__ */ jsx98("p", { className: cn("mt-1 text-muted-foreground"), children: interrupt.description }) : null,
45779
46046
  interrupt.mode === "chat" ? /* @__PURE__ */ jsxs29("div", { className: cn("mt-3 flex gap-2"), children: [
45780
- /* @__PURE__ */ jsx97(Button, { onClick: chat.confirmInterrupt, children: interrupt.confirmLabel ?? "\u786E\u8BA4" }),
45781
- /* @__PURE__ */ jsx97(Button, { variant: "outline", onClick: chat.rejectInterrupt, children: interrupt.rejectLabel ?? "\u62D2\u7EDD" })
45782
- ] }) : /* @__PURE__ */ jsx97("p", { className: cn("mt-1 text-muted-foreground"), children: "\u8BF7\u5728\u4E1A\u52A1\u9875\u9762\u5B8C\u6210\u786E\u8BA4\u3002" })
46047
+ /* @__PURE__ */ jsx98(Button, { onClick: chat.confirmInterrupt, children: interrupt.confirmLabel ?? "\u786E\u8BA4" }),
46048
+ /* @__PURE__ */ jsx98(Button, { variant: "outline", onClick: chat.rejectInterrupt, children: interrupt.rejectLabel ?? "\u62D2\u7EDD" })
46049
+ ] }) : /* @__PURE__ */ jsx98("p", { className: cn("mt-1 text-muted-foreground"), children: "\u8BF7\u5728\u4E1A\u52A1\u9875\u9762\u5B8C\u6210\u786E\u8BA4\u3002" })
45783
46050
  ] }) : null
45784
46051
  }
45785
46052
  ) })
45786
46053
  ] }),
45787
- /* @__PURE__ */ jsx97(Dialog2, { open: Boolean(dialog), onOpenChange: (next) => {
46054
+ /* @__PURE__ */ jsx98(Dialog2, { open: Boolean(dialog), onOpenChange: (next) => {
45788
46055
  if (!next) {
45789
46056
  dialog?.cancel?.();
45790
46057
  setDialog(void 0);
@@ -45797,14 +46064,14 @@ function Chat({
45797
46064
  else panel.current?.querySelector("header button:not(:disabled)")?.focus();
45798
46065
  });
45799
46066
  }, children: [
45800
- /* @__PURE__ */ jsx97(DialogTitle3, { children: dialog?.title }),
45801
- /* @__PURE__ */ jsx97(DialogDescription3, { children: dialog?.description }),
46067
+ /* @__PURE__ */ jsx98(DialogTitle3, { children: dialog?.title }),
46068
+ /* @__PURE__ */ jsx98(DialogDescription3, { children: dialog?.description }),
45802
46069
  /* @__PURE__ */ jsxs29(DialogFooter, { children: [
45803
- /* @__PURE__ */ jsx97(Button, { variant: "outline", autoFocus: true, onClick: () => {
46070
+ /* @__PURE__ */ jsx98(Button, { variant: "outline", autoFocus: true, onClick: () => {
45804
46071
  dialog?.cancel?.();
45805
46072
  setDialog(void 0);
45806
46073
  }, children: "\u53D6\u6D88" }),
45807
- /* @__PURE__ */ jsx97(Button, { variant: dialog?.dangerous ? "destructive" : "default", disabled: busy, onClick: () => {
46074
+ /* @__PURE__ */ jsx98(Button, { variant: dialog?.dangerous ? "destructive" : "default", disabled: busy, onClick: () => {
45808
46075
  safe(() => dialog?.action());
45809
46076
  setDialog(void 0);
45810
46077
  }, children: "\u786E\u5B9A" })
@@ -45844,6 +46111,7 @@ lucide-react/dist/esm/icons/ellipsis.js:
45844
46111
  lucide-react/dist/esm/icons/file-text.js:
45845
46112
  lucide-react/dist/esm/icons/loader-circle.js:
45846
46113
  lucide-react/dist/esm/icons/maximize-2.js:
46114
+ lucide-react/dist/esm/icons/mic.js:
45847
46115
  lucide-react/dist/esm/icons/minimize-2.js:
45848
46116
  lucide-react/dist/esm/icons/panel-left.js:
45849
46117
  lucide-react/dist/esm/icons/paperclip.js:
@@ -45860,4 +46128,3 @@ lucide-react/dist/esm/lucide-react.js:
45860
46128
  * See the LICENSE file in the root directory of this source tree.
45861
46129
  *)
45862
46130
  */
45863
- //# sourceMappingURL=default-chat.js.map