@blade-hq/agent-react 2612.0.0-beta.41 → 2612.0.0-beta.44

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.
@@ -40,6 +40,7 @@ import {
40
40
  Rocket,
41
41
  RotateCcw,
42
42
  Scissors,
43
+ Search,
43
44
  Send,
44
45
  Share2,
45
46
  Sparkles,
@@ -88,6 +89,7 @@ import {
88
89
  useSessionDataInvalidation,
89
90
  useSessionHandle,
90
91
  useSessionSkills,
92
+ useSessionSource,
91
93
  useSkillStats
92
94
  } from "./chunk-42P352DI.js";
93
95
  import {
@@ -115,7 +117,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
115
117
  "The result of getSnapshot should be cached to avoid an infinite loop"
116
118
  ), didWarnUncachedGetSnapshot = true);
117
119
  }
118
- cachedValue = useState12({
120
+ cachedValue = useState13({
119
121
  inst: { value, getSnapshot }
120
122
  });
121
123
  var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
@@ -127,7 +129,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
127
129
  },
128
130
  [subscribe, value, getSnapshot]
129
131
  );
130
- useEffect9(
132
+ useEffect10(
131
133
  function() {
132
134
  checkIfSnapshotChanged(inst) && forceUpdate({ inst });
133
135
  return subscribe(function() {
@@ -153,7 +155,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
153
155
  return getSnapshot();
154
156
  }
155
157
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
156
- var React2 = __require("react"), objectIs = "function" === typeof Object.is ? Object.is : is, useState12 = React2.useState, useEffect9 = React2.useEffect, useLayoutEffect3 = React2.useLayoutEffect, useDebugValue3 = React2.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
158
+ var React2 = __require("react"), objectIs = "function" === typeof Object.is ? Object.is : is, useState13 = React2.useState, useEffect10 = React2.useEffect, useLayoutEffect3 = React2.useLayoutEffect, useDebugValue3 = React2.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
157
159
  exports.useSyncExternalStore = void 0 !== React2.useSyncExternalStore ? React2.useSyncExternalStore : shim;
158
160
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
159
161
  })();
@@ -181,7 +183,7 @@ var require_with_selector_development = __commonJS({
181
183
  return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
182
184
  }
183
185
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
184
- var React2 = __require("react"), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore4 = shim.useSyncExternalStore, useRef8 = React2.useRef, useEffect9 = React2.useEffect, useMemo8 = React2.useMemo, useDebugValue3 = React2.useDebugValue;
186
+ var React2 = __require("react"), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore5 = shim.useSyncExternalStore, useRef8 = React2.useRef, useEffect10 = React2.useEffect, useMemo8 = React2.useMemo, useDebugValue3 = React2.useDebugValue;
185
187
  exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
186
188
  var instRef = useRef8(null);
187
189
  if (null === instRef.current) {
@@ -223,8 +225,8 @@ var require_with_selector_development = __commonJS({
223
225
  },
224
226
  [getSnapshot, getServerSnapshot, selector, isEqual]
225
227
  );
226
- var value = useSyncExternalStore4(subscribe, instRef[0], instRef[1]);
227
- useEffect9(
228
+ var value = useSyncExternalStore5(subscribe, instRef[0], instRef[1]);
229
+ useEffect10(
228
230
  function() {
229
231
  inst.hasValue = true;
230
232
  inst.value = value;
@@ -18803,7 +18805,7 @@ var TopicAssetMention = index_default.extend({
18803
18805
  class: "file-mention-pill topic-asset-mention-pill",
18804
18806
  "data-topic-id": node.attrs.topic_id,
18805
18807
  "data-path": node.attrs.path,
18806
- title: `\u4E3B\u9898\u8D44\u4EA7\uFF1A${node.attrs.path}`
18808
+ title: `\u5DE5\u4F5C\u7A7A\u95F4\u8D44\u4EA7\uFF1A${node.attrs.path}`
18807
18809
  }, `@${node.attrs.path}`]
18808
18810
  };
18809
18811
  },
@@ -18961,7 +18963,7 @@ async function getTopicAssetSuggestionItems(client, topicId, query) {
18961
18963
  const result = await client.chatGroups.listAssets(topicId);
18962
18964
  return result.items.filter((asset) => !asset.is_dir && asset.path.toLowerCase().includes(query.toLowerCase())).map((asset) => ({ kind: "topicAsset", topic_id: topicId, path: asset.path, name: asset.path }));
18963
18965
  } catch {
18964
- return [{ kind: "topicAssetError", message: "\u4E3B\u9898\u8D44\u4EA7\u6682\u65F6\u65E0\u6CD5\u52A0\u8F7D\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165 @ \u91CD\u8BD5" }];
18966
+ return [{ kind: "topicAssetError", message: "\u5DE5\u4F5C\u7A7A\u95F4\u8D44\u4EA7\u6682\u65F6\u65E0\u6CD5\u52A0\u8F7D\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165 @ \u91CD\u8BD5" }];
18965
18967
  }
18966
18968
  }
18967
18969
  function queueTopicAssetReference(sessionId, ref) {
@@ -25355,6 +25357,10 @@ function useComposerModel(activeSessionId) {
25355
25357
  const { models: modelCatalog } = useModelCatalog();
25356
25358
  const useSessionModel = useChatEnvironment().useSessionDetail ? useInjectedSessionModel : useClientSessionModel;
25357
25359
  const activeSessionModel = useSessionModel(activeSessionId);
25360
+ const session = useSessionHandle(activeSessionId);
25361
+ const source = useSessionSource();
25362
+ const [selectingSession, setSelectingSession] = useState4(null);
25363
+ const selectingRef = useRef4(null);
25358
25364
  const sharedModelDraft = useComposerChannels(
25359
25365
  (state3) => activeSessionId ? state3.modelDrafts[activeSessionId] : void 0
25360
25366
  );
@@ -25388,7 +25394,7 @@ function useComposerModel(activeSessionId) {
25388
25394
  return {
25389
25395
  selectedModel,
25390
25396
  hasAvailableModel,
25391
- isLoading,
25397
+ isLoading: isLoading || !!activeSessionId && (selectingSession === activeSessionId || !session),
25392
25398
  availabilityMessage: modelAvailabilityMessage,
25393
25399
  thinkingAvailable,
25394
25400
  reasoningLevels,
@@ -25396,7 +25402,22 @@ function useComposerModel(activeSessionId) {
25396
25402
  setReasoningLevel: setReasoningLevelPreference,
25397
25403
  selectModel(model) {
25398
25404
  if (activeSessionId) {
25405
+ if (selectingRef.current === activeSessionId) return;
25406
+ selectingRef.current = activeSessionId;
25407
+ setSelectingSession(activeSessionId);
25399
25408
  composerChannels.setModelDraft(activeSessionId, model);
25409
+ const select = (ready) => ready.selectModel(model);
25410
+ const pending = source.whenReady ? source.whenReady(activeSessionId, select) : session ? select(session) : Promise.resolve(false);
25411
+ void pending.catch(() => false).then((ok) => {
25412
+ if (!ok && composerChannels.getState().modelDrafts[activeSessionId] === model) {
25413
+ composerChannels.clearModelDraft(activeSessionId);
25414
+ }
25415
+ }).finally(() => {
25416
+ if (selectingRef.current === activeSessionId) {
25417
+ selectingRef.current = null;
25418
+ setSelectingSession(null);
25419
+ }
25420
+ });
25400
25421
  } else {
25401
25422
  const selection = { sessionId: activeSessionId, model };
25402
25423
  newSessionModelSelectionRef.current = selection;
@@ -25920,6 +25941,67 @@ function SkillStatusBar({
25920
25941
  ] }) }) });
25921
25942
  }
25922
25943
 
25944
+ // src/rich-input/InputActionSubmenu.tsx
25945
+ import { useSyncExternalStore as useSyncExternalStore4 } from "react";
25946
+ import { jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
25947
+ var narrowQuery = "(max-width: 639px)";
25948
+ function subscribeToViewport(onChange) {
25949
+ const media = window.matchMedia(narrowQuery);
25950
+ media.addEventListener("change", onChange);
25951
+ return () => media.removeEventListener("change", onChange);
25952
+ }
25953
+ var isNarrowViewport = () => window.matchMedia(narrowQuery).matches;
25954
+ function InputActionSubmenu({ label, icon, open, onOpenChange, children, disabled = false }) {
25955
+ const narrow = useSyncExternalStore4(subscribeToViewport, isNarrowViewport, () => false);
25956
+ return /* @__PURE__ */ jsxs6(dist_exports.Root, { open, onOpenChange, children: [
25957
+ /* @__PURE__ */ jsx15(dist_exports.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs6(
25958
+ "button",
25959
+ {
25960
+ type: "button",
25961
+ disabled,
25962
+ onClick: (event) => {
25963
+ event.preventDefault();
25964
+ onOpenChange(true);
25965
+ },
25966
+ onPointerEnter: (event) => {
25967
+ if (event.pointerType === "mouse" && !disabled) onOpenChange(true);
25968
+ },
25969
+ onKeyDown: (event) => {
25970
+ if (event.key === "ArrowRight") {
25971
+ event.preventDefault();
25972
+ onOpenChange(true);
25973
+ }
25974
+ },
25975
+ className: "flex w-full items-center gap-2 rounded-lg px-3 py-2.5 text-left text-sm text-[hsl(var(--popover-foreground))] outline-none hover:bg-[hsl(var(--accent))] focus-visible:bg-[hsl(var(--accent))] disabled:opacity-50 data-[state=open]:bg-[hsl(var(--accent))]",
25976
+ children: [
25977
+ icon,
25978
+ /* @__PURE__ */ jsx15("span", { children: label }),
25979
+ /* @__PURE__ */ jsx15(ChevronRight, { size: 14, className: "ml-auto", "aria-hidden": "true" })
25980
+ ]
25981
+ }
25982
+ ) }),
25983
+ /* @__PURE__ */ jsx15(dist_exports.Portal, { children: /* @__PURE__ */ jsx15(
25984
+ dist_exports.Content,
25985
+ {
25986
+ side: narrow ? "bottom" : "right",
25987
+ align: "start",
25988
+ sideOffset: 8,
25989
+ collisionPadding: 12,
25990
+ "aria-label": label,
25991
+ onEscapeKeyDown: (event) => event.stopPropagation(),
25992
+ onKeyDown: (event) => {
25993
+ if (event.key === "ArrowLeft" && !(event.target instanceof HTMLInputElement || event.target instanceof HTMLSelectElement)) {
25994
+ event.preventDefault();
25995
+ onOpenChange(false);
25996
+ }
25997
+ },
25998
+ className: "z-50 max-h-[min(70vh,var(--radix-popover-content-available-height))] w-[min(320px,calc(100vw-2rem))] overflow-y-auto rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--popover))] p-1 text-xs text-[hsl(var(--popover-foreground))] shadow-[var(--swf-shadow-overlay)] outline-none",
25999
+ children
26000
+ }
26001
+ ) })
26002
+ ] });
26003
+ }
26004
+
25923
26005
  // src/rich-input/ConnectButton.tsx
25924
26006
  import { useState as useState6 } from "react";
25925
26007
 
@@ -26043,7 +26125,7 @@ async function getSkillSuggestions(query, options) {
26043
26125
  }
26044
26126
 
26045
26127
  // src/rich-input/ConnectButton.tsx
26046
- import { jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
26128
+ import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
26047
26129
  function ConnectButton({
26048
26130
  sessionId,
26049
26131
  open,
@@ -26053,7 +26135,8 @@ function ConnectButton({
26053
26135
  pendingPluginsDisabledReason,
26054
26136
  pendingComputers,
26055
26137
  onPendingComputersChange,
26056
- onPluginsChanged
26138
+ onPluginsChanged,
26139
+ variant = "icon"
26057
26140
  }) {
26058
26141
  const client = useBladeClient();
26059
26142
  const { ConnectorComputerSection, ConnectorAccountsSection } = useRichInputServices();
@@ -26069,53 +26152,66 @@ function ConnectButton({
26069
26152
  const summary = triggerSummary(triggerItems);
26070
26153
  const triggerCls = summary.total === 0 ? "w-9 p-0 text-[hsl(var(--muted-foreground))]" : summary.total === 1 ? "w-9 p-0" : "px-1";
26071
26154
  const selectedLabels = sessionId === null ? (pendingPlugins ?? []).map((item) => item.displayName?.trim() || item.name) : selectedItems.map((item) => item.display_name?.trim() || item.name);
26072
- return /* @__PURE__ */ jsxs6(dist_exports.Root, { open: isOpen, onOpenChange: setOpen, children: [
26073
- /* @__PURE__ */ jsx15(dist_exports.Trigger, { asChild: true, children: /* @__PURE__ */ jsx15(
26155
+ const panel = /* @__PURE__ */ jsx16(
26156
+ ConnectorPanel,
26157
+ {
26158
+ client,
26159
+ sessionId,
26160
+ pendingPlugins,
26161
+ onPendingPluginsChange,
26162
+ pendingDisabledReason: pendingPluginsDisabledReason,
26163
+ onPluginsChanged: () => {
26164
+ if (sessionId) {
26165
+ invalidateSlashSuggestions(client, sessionId);
26166
+ invalidation.pluginsChanged(sessionId);
26167
+ }
26168
+ onPluginsChanged?.();
26169
+ },
26170
+ onSelectedChange: setSelectedItems,
26171
+ renderComputerSection: ConnectorComputerSection ? (query) => /* @__PURE__ */ jsx16(
26172
+ ConnectorComputerSection,
26173
+ {
26174
+ sessionId,
26175
+ query,
26176
+ pendingSelection: pendingComputers,
26177
+ onPendingSelectionChange: onPendingComputersChange,
26178
+ closePanel: () => setOpen(false)
26179
+ }
26180
+ ) : void 0,
26181
+ renderExternalAccounts: ConnectorAccountsSection ? (query) => /* @__PURE__ */ jsx16(ConnectorAccountsSection, { query, closePanel: () => setOpen(false) }) : void 0
26182
+ }
26183
+ );
26184
+ if (variant === "submenu") {
26185
+ return /* @__PURE__ */ jsx16(
26186
+ InputActionSubmenu,
26187
+ {
26188
+ label: summary.total ? `\u8FDE\u63A5\u5668 \xB7 \u5DF2\u9009 ${summary.total}` : "\u8FDE\u63A5\u5668",
26189
+ icon: /* @__PURE__ */ jsx16(Plug, { size: 16, "aria-hidden": "true" }),
26190
+ open: isOpen,
26191
+ onOpenChange: setOpen,
26192
+ children: panel
26193
+ }
26194
+ );
26195
+ }
26196
+ return /* @__PURE__ */ jsxs7(dist_exports.Root, { open: isOpen, onOpenChange: setOpen, children: [
26197
+ /* @__PURE__ */ jsx16(dist_exports.Trigger, { asChild: true, children: /* @__PURE__ */ jsx16(
26074
26198
  "button",
26075
26199
  {
26076
26200
  type: "button",
26077
26201
  "aria-label": summary.total > 0 ? `\u8FDE\u63A5\u5668\uFF1A\u5DF2\u9009 ${summary.total} \u4E2A\u63D2\u4EF6` : "\u8FDE\u63A5\u5668",
26078
26202
  title: selectedLabels.length > 0 ? `\u8FDE\u63A5\u5668\uFF1A${selectedLabels.join("\u3001")}` : "\u8FDE\u63A5\u5668",
26079
26203
  className: `flex h-9 shrink-0 cursor-pointer items-center justify-center rounded-full border border-[hsl(var(--border))] transition-colors hover:border-[hsl(var(--ring))] hover:text-[hsl(var(--foreground))] ${triggerCls}`,
26080
- children: summary.total === 0 ? /* @__PURE__ */ jsx15(Plug, { size: 14, "aria-hidden": "true" }) : /* @__PURE__ */ jsx15(PluginTriggerStack, { client, sessionId, summary })
26204
+ children: summary.total === 0 ? /* @__PURE__ */ jsx16(Plug, { size: 14, "aria-hidden": "true" }) : /* @__PURE__ */ jsx16(PluginTriggerStack, { client, sessionId, summary })
26081
26205
  }
26082
26206
  ) }),
26083
- /* @__PURE__ */ jsx15(dist_exports.Portal, { children: /* @__PURE__ */ jsx15(
26207
+ /* @__PURE__ */ jsx16(dist_exports.Portal, { children: /* @__PURE__ */ jsx16(
26084
26208
  dist_exports.Content,
26085
26209
  {
26086
26210
  side: "top",
26087
26211
  align: "start",
26088
26212
  sideOffset: 8,
26089
26213
  className: "z-50 w-[min(320px,calc(100vw-2rem))] origin-(--radix-popover-content-transform-origin) overflow-hidden rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--popover))] text-[11px] text-[hsl(var(--popover-foreground))] shadow-[var(--swf-shadow-overlay)] outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
26090
- children: /* @__PURE__ */ jsx15("div", { className: "max-h-[min(70vh,32rem)] overflow-y-auto", children: /* @__PURE__ */ jsx15(
26091
- ConnectorPanel,
26092
- {
26093
- client,
26094
- sessionId,
26095
- pendingPlugins,
26096
- onPendingPluginsChange,
26097
- pendingDisabledReason: pendingPluginsDisabledReason,
26098
- onPluginsChanged: () => {
26099
- if (sessionId) {
26100
- invalidateSlashSuggestions(client, sessionId);
26101
- invalidation.pluginsChanged(sessionId);
26102
- }
26103
- onPluginsChanged?.();
26104
- },
26105
- onSelectedChange: setSelectedItems,
26106
- renderComputerSection: ConnectorComputerSection ? (query) => /* @__PURE__ */ jsx15(
26107
- ConnectorComputerSection,
26108
- {
26109
- sessionId,
26110
- query,
26111
- pendingSelection: pendingComputers,
26112
- onPendingSelectionChange: onPendingComputersChange,
26113
- closePanel: () => setOpen(false)
26114
- }
26115
- ) : void 0,
26116
- renderExternalAccounts: ConnectorAccountsSection ? (query) => /* @__PURE__ */ jsx15(ConnectorAccountsSection, { query, closePanel: () => setOpen(false) }) : void 0
26117
- }
26118
- ) })
26214
+ children: /* @__PURE__ */ jsx16("div", { className: "max-h-[min(70vh,32rem)] overflow-y-auto", children: panel })
26119
26215
  }
26120
26216
  ) })
26121
26217
  ] });
@@ -26821,7 +26917,7 @@ function listUserHomeDir(client, dirPath) {
26821
26917
  }
26822
26918
 
26823
26919
  // src/rich-input/FileCompletionMenu.tsx
26824
- import { Fragment as Fragment4, jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
26920
+ import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
26825
26921
  var ROOT_DIR = ".";
26826
26922
  function installSuggestionOutsideDismiss(container, onDismiss) {
26827
26923
  const onPointerDown = (event) => {
@@ -26968,7 +27064,7 @@ var FileCompletionMenu = forwardRef2(
26968
27064
  }
26969
27065
  return { pluginItems: pluginItems2, pluginError: pluginError2, fileItems: files, topicItems: topicItems2, topicError: topicError2 };
26970
27066
  }, [items]);
26971
- return /* @__PURE__ */ jsx16(
27067
+ return /* @__PURE__ */ jsx17(
26972
27068
  FileCompletionMenuContent,
26973
27069
  {
26974
27070
  ref,
@@ -27062,9 +27158,9 @@ var FileCompletionMenuContent = forwardRef2(function FileCompletionMenuContent2(
27062
27158
  };
27063
27159
  const showGroupLabels = pluginItems.length > 0 || topicItems.length > 0 || Boolean(topicError);
27064
27160
  const fileEmptyLabel = scope === "session" && !sessionId ? "\u6682\u65E0\u4F1A\u8BDD" : filteredEntries.length === 0 ? "\u6CA1\u6709\u6587\u4EF6" : null;
27065
- return /* @__PURE__ */ jsxs7("div", { className: "max-h-64 overflow-y-auto rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--popover))] py-1 shadow-[var(--swf-shadow-overlay)]", children: [
27066
- pluginError ? /* @__PURE__ */ jsx16("output", { className: "block px-3 py-2 text-xs text-muted-foreground", children: pluginError }) : null,
27067
- pluginItems.map((item, index) => /* @__PURE__ */ jsxs7(
27161
+ return /* @__PURE__ */ jsxs8("div", { className: "max-h-64 overflow-y-auto rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--popover))] py-1 shadow-[var(--swf-shadow-overlay)]", children: [
27162
+ pluginError ? /* @__PURE__ */ jsx17("output", { className: "block px-3 py-2 text-xs text-muted-foreground", children: pluginError }) : null,
27163
+ pluginItems.map((item, index) => /* @__PURE__ */ jsxs8(
27068
27164
  "button",
27069
27165
  {
27070
27166
  ref: selectedRef(index),
@@ -27075,31 +27171,31 @@ var FileCompletionMenuContent = forwardRef2(function FileCompletionMenuContent2(
27075
27171
  handleSelect(item);
27076
27172
  },
27077
27173
  children: [
27078
- item.icon ? /* @__PURE__ */ jsx16("img", { src: item.icon, alt: "", width: 16, height: 16, className: "shrink-0" }) : /* @__PURE__ */ jsx16(BookOpen, { size: 14 }),
27079
- /* @__PURE__ */ jsx16("span", { className: "truncate", children: item.label }),
27080
- /* @__PURE__ */ jsx16("span", { className: "ml-auto truncate text-xs text-muted-foreground", children: item.display_name })
27174
+ item.icon ? /* @__PURE__ */ jsx17("img", { src: item.icon, alt: "", width: 16, height: 16, className: "shrink-0" }) : /* @__PURE__ */ jsx17(BookOpen, { size: 14 }),
27175
+ /* @__PURE__ */ jsx17("span", { className: "truncate", children: item.label }),
27176
+ /* @__PURE__ */ jsx17("span", { className: "ml-auto truncate text-xs text-muted-foreground", children: item.display_name })
27081
27177
  ]
27082
27178
  },
27083
27179
  `${item.plugin}:${item.server}:${item.id}`
27084
27180
  )),
27085
- topicItems.length > 0 || topicError ? /* @__PURE__ */ jsxs7(Fragment4, { children: [
27086
- /* @__PURE__ */ jsx16("div", { className: "px-3 pt-1 pb-0.5 text-xs font-medium text-muted-foreground", children: "\u4E3B\u9898\u8D44\u4EA7" }),
27087
- topicError ? /* @__PURE__ */ jsx16("output", { className: "block px-3 py-2 text-xs text-muted-foreground", children: topicError }) : null,
27181
+ topicItems.length > 0 || topicError ? /* @__PURE__ */ jsxs8(Fragment4, { children: [
27182
+ /* @__PURE__ */ jsx17("div", { className: "px-3 pt-1 pb-0.5 text-xs font-medium text-muted-foreground", children: "\u5DE5\u4F5C\u7A7A\u95F4\u8D44\u4EA7" }),
27183
+ topicError ? /* @__PURE__ */ jsx17("output", { className: "block px-3 py-2 text-xs text-muted-foreground", children: topicError }) : null,
27088
27184
  topicItems.map((item, topicIndex) => {
27089
27185
  const index = pluginItems.length + topicIndex;
27090
- return /* @__PURE__ */ jsxs7("button", { ref: selectedRef(index), type: "button", title: item.path, className: rowClassName(index), onMouseDown: (event) => {
27186
+ return /* @__PURE__ */ jsxs8("button", { ref: selectedRef(index), type: "button", title: item.path, className: rowClassName(index), onMouseDown: (event) => {
27091
27187
  event.preventDefault();
27092
27188
  handleSelect(item);
27093
27189
  }, children: [
27094
- /* @__PURE__ */ jsx16(File, { size: 14, className: "shrink-0 text-muted-foreground" }),
27095
- /* @__PURE__ */ jsx16("span", { className: "truncate", children: item.path })
27190
+ /* @__PURE__ */ jsx17(File, { size: 14, className: "shrink-0 text-muted-foreground" }),
27191
+ /* @__PURE__ */ jsx17("span", { className: "truncate", children: item.path })
27096
27192
  ] }, `${item.topic_id}:${item.path}`);
27097
27193
  })
27098
27194
  ] }) : null,
27099
- showGroupLabels ? /* @__PURE__ */ jsx16("div", { className: "px-3 pt-1 pb-0.5 text-[10px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]", children: "\u6587\u4EF6" }) : null,
27100
- fileEmptyLabel ? /* @__PURE__ */ jsx16("div", { className: "px-3 py-2 text-xs text-[hsl(var(--muted-foreground))]", children: fileEmptyLabel }) : filteredEntries.map((entry, fileIndex) => {
27195
+ showGroupLabels ? /* @__PURE__ */ jsx17("div", { className: "px-3 pt-1 pb-0.5 text-[10px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]", children: "\u6587\u4EF6" }) : null,
27196
+ fileEmptyLabel ? /* @__PURE__ */ jsx17("div", { className: "px-3 py-2 text-xs text-[hsl(var(--muted-foreground))]", children: fileEmptyLabel }) : filteredEntries.map((entry, fileIndex) => {
27101
27197
  const index = pluginItems.length + topicItems.length + fileIndex;
27102
- return /* @__PURE__ */ jsxs7(
27198
+ return /* @__PURE__ */ jsxs8(
27103
27199
  "button",
27104
27200
  {
27105
27201
  ref: selectedRef(index),
@@ -27110,9 +27206,9 @@ var FileCompletionMenuContent = forwardRef2(function FileCompletionMenuContent2(
27110
27206
  },
27111
27207
  className: rowClassName(index),
27112
27208
  children: [
27113
- entry.is_dir ? /* @__PURE__ */ jsx16(Folder, { size: 14, className: "shrink-0 text-[hsl(var(--primary))]" }) : /* @__PURE__ */ jsx16(File, { size: 14, className: "shrink-0 text-[hsl(var(--muted-foreground))]" }),
27114
- /* @__PURE__ */ jsx16("span", { className: "truncate", children: entry.name }),
27115
- entry.is_dir && /* @__PURE__ */ jsx16(ChevronRight, { size: 12, className: "ml-auto shrink-0 opacity-40" })
27209
+ entry.is_dir ? /* @__PURE__ */ jsx17(Folder, { size: 14, className: "shrink-0 text-[hsl(var(--primary))]" }) : /* @__PURE__ */ jsx17(File, { size: 14, className: "shrink-0 text-[hsl(var(--muted-foreground))]" }),
27210
+ /* @__PURE__ */ jsx17("span", { className: "truncate", children: entry.name }),
27211
+ entry.is_dir && /* @__PURE__ */ jsx17(ChevronRight, { size: 12, className: "ml-auto shrink-0 opacity-40" })
27116
27212
  ]
27117
27213
  },
27118
27214
  entry.path
@@ -27123,7 +27219,7 @@ var FileCompletionMenuContent = forwardRef2(function FileCompletionMenuContent2(
27123
27219
 
27124
27220
  // src/rich-input/SkillCompletionMenu.tsx
27125
27221
  import { forwardRef as forwardRef3, useCallback as useCallback5, useImperativeHandle as useImperativeHandle2, useState as useState10 } from "react";
27126
- import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
27222
+ import { jsx as jsx18, jsxs as jsxs9 } from "react/jsx-runtime";
27127
27223
  var SkillCompletionMenu = forwardRef3(
27128
27224
  function SkillCompletionMenu2({ command: command2, items }, ref) {
27129
27225
  const [rawSelectedIndex, setRawSelectedIndex] = useState10(0);
@@ -27170,10 +27266,10 @@ var SkillCompletionMenu = forwardRef3(
27170
27266
  );
27171
27267
  const commandItems = items.filter((item) => item.type === "command");
27172
27268
  const skillItems = items.filter((item) => item.type === "skill");
27173
- return /* @__PURE__ */ jsx17("div", { className: "max-h-64 overflow-y-auto rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--popover))] py-1 shadow-[var(--swf-shadow-overlay)]", children: items.length === 0 ? /* @__PURE__ */ jsx17("div", { className: "px-3 py-2 text-xs text-[hsl(var(--muted-foreground))]", children: "\u6CA1\u6709\u5339\u914D\u7684\u547D\u4EE4\u6216\u6280\u80FD" }) : /* @__PURE__ */ jsxs8("div", { children: [
27174
- commandItems.length > 0 ? /* @__PURE__ */ jsxs8("div", { className: "px-2 pb-1 pt-1", children: [
27175
- /* @__PURE__ */ jsx17("div", { className: "px-1 pb-1 text-[10px] font-semibold uppercase tracking-[0.08em] text-[hsl(var(--muted-foreground))]", children: "\u547D\u4EE4" }),
27176
- commandItems.map((item, index) => /* @__PURE__ */ jsxs8(
27269
+ return /* @__PURE__ */ jsx18("div", { className: "max-h-64 overflow-y-auto rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--popover))] py-1 shadow-[var(--swf-shadow-overlay)]", children: items.length === 0 ? /* @__PURE__ */ jsx18("div", { className: "px-3 py-2 text-xs text-[hsl(var(--muted-foreground))]", children: "\u6CA1\u6709\u5339\u914D\u7684\u547D\u4EE4\u6216\u6280\u80FD" }) : /* @__PURE__ */ jsxs9("div", { children: [
27270
+ commandItems.length > 0 ? /* @__PURE__ */ jsxs9("div", { className: "px-2 pb-1 pt-1", children: [
27271
+ /* @__PURE__ */ jsx18("div", { className: "px-1 pb-1 text-[10px] font-semibold uppercase tracking-[0.08em] text-[hsl(var(--muted-foreground))]", children: "\u547D\u4EE4" }),
27272
+ commandItems.map((item, index) => /* @__PURE__ */ jsxs9(
27177
27273
  "button",
27178
27274
  {
27179
27275
  ref: (element) => {
@@ -27188,21 +27284,21 @@ var SkillCompletionMenu = forwardRef3(
27188
27284
  },
27189
27285
  className: `flex w-full items-start gap-2 rounded-lg px-2 py-1.5 text-left transition-colors ${index === selectedIndex ? "bg-[hsl(var(--accent))] text-[hsl(var(--accent-foreground))]" : "text-[hsl(var(--popover-foreground))] hover:bg-[hsl(var(--accent))]"}`,
27190
27286
  children: [
27191
- /* @__PURE__ */ jsx17("span", { className: "pt-0.5 text-sm", children: "\u21BB" }),
27192
- /* @__PURE__ */ jsxs8("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
27193
- /* @__PURE__ */ jsx17("span", { className: "text-sm font-medium", children: item.label }),
27194
- /* @__PURE__ */ jsx17("span", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: item.description })
27287
+ /* @__PURE__ */ jsx18("span", { className: "pt-0.5 text-sm", children: "\u21BB" }),
27288
+ /* @__PURE__ */ jsxs9("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
27289
+ /* @__PURE__ */ jsx18("span", { className: "text-sm font-medium", children: item.label }),
27290
+ /* @__PURE__ */ jsx18("span", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: item.description })
27195
27291
  ] })
27196
27292
  ]
27197
27293
  },
27198
27294
  item.id
27199
27295
  ))
27200
27296
  ] }) : null,
27201
- skillItems.length > 0 ? /* @__PURE__ */ jsxs8("div", { className: "px-2 pb-1 pt-1", children: [
27202
- /* @__PURE__ */ jsx17("div", { className: "px-1 pb-1 text-[10px] font-semibold uppercase tracking-[0.08em] text-[hsl(var(--muted-foreground))]", children: "\u6280\u80FD" }),
27297
+ skillItems.length > 0 ? /* @__PURE__ */ jsxs9("div", { className: "px-2 pb-1 pt-1", children: [
27298
+ /* @__PURE__ */ jsx18("div", { className: "px-1 pb-1 text-[10px] font-semibold uppercase tracking-[0.08em] text-[hsl(var(--muted-foreground))]", children: "\u6280\u80FD" }),
27203
27299
  skillItems.map((item, skillIndex) => {
27204
27300
  const index = commandItems.length + skillIndex;
27205
- return /* @__PURE__ */ jsxs8(
27301
+ return /* @__PURE__ */ jsxs9(
27206
27302
  "button",
27207
27303
  {
27208
27304
  ref: (element) => {
@@ -27217,9 +27313,9 @@ var SkillCompletionMenu = forwardRef3(
27217
27313
  },
27218
27314
  className: `flex w-full flex-col gap-0.5 rounded-lg px-2 py-1.5 text-left transition-colors ${index === selectedIndex ? "bg-[hsl(var(--accent))] text-[hsl(var(--accent-foreground))]" : "text-[hsl(var(--popover-foreground))] hover:bg-[hsl(var(--accent))]"}`,
27219
27315
  children: [
27220
- /* @__PURE__ */ jsxs8("span", { className: "flex items-center gap-1.5", children: [
27221
- /* @__PURE__ */ jsx17("span", { className: "text-sm font-medium", children: skillDisplayName(item) }),
27222
- item.hasFlow ? /* @__PURE__ */ jsx17(
27316
+ /* @__PURE__ */ jsxs9("span", { className: "flex items-center gap-1.5", children: [
27317
+ /* @__PURE__ */ jsx18("span", { className: "text-sm font-medium", children: skillDisplayName(item) }),
27318
+ item.hasFlow ? /* @__PURE__ */ jsx18(
27223
27319
  "span",
27224
27320
  {
27225
27321
  title: "\u8FD9\u4E2A\u6280\u80FD\u6309\u56FA\u5B9A\u6D41\u7A0B\u6267\u884C:\u6B65\u9AA4\u4E8B\u5148\u7F16\u6392\u597D,\u8FD0\u884C\u4E2D\u4E0D\u4F1A\u5373\u5174\u53D1\u6325,\u4E5F\u4E0D\u4F1A\u4E2D\u9014\u95EE\u4F60",
@@ -27227,9 +27323,9 @@ var SkillCompletionMenu = forwardRef3(
27227
27323
  children: "\u26A1 \u56FA\u5B9A\u6D41\u7A0B"
27228
27324
  }
27229
27325
  ) : null,
27230
- item.installed === false ? /* @__PURE__ */ jsx17("span", { className: "shrink-0 rounded-full bg-[hsl(var(--muted))] px-1.5 py-px text-[10px] text-[hsl(var(--muted-foreground))]", children: "\u672A\u5B89\u88C5" }) : null
27326
+ item.installed === false ? /* @__PURE__ */ jsx18("span", { className: "shrink-0 rounded-full bg-[hsl(var(--muted))] px-1.5 py-px text-[10px] text-[hsl(var(--muted-foreground))]", children: "\u672A\u5B89\u88C5" }) : null
27231
27327
  ] }),
27232
- /* @__PURE__ */ jsx17("span", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: item.description })
27328
+ /* @__PURE__ */ jsx18("span", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: item.description })
27233
27329
  ]
27234
27330
  },
27235
27331
  item.skillId
@@ -27241,7 +27337,7 @@ var SkillCompletionMenu = forwardRef3(
27241
27337
  );
27242
27338
 
27243
27339
  // src/rich-input/FileSizeLimitDialog.tsx
27244
- import { jsx as jsx18, jsxs as jsxs9 } from "react/jsx-runtime";
27340
+ import { jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
27245
27341
  function FileSizeLimitDialog({
27246
27342
  open,
27247
27343
  onOpenChange,
@@ -27252,37 +27348,37 @@ function FileSizeLimitDialog({
27252
27348
  return null;
27253
27349
  }
27254
27350
  const limitText = formatFileSize(limitBytes);
27255
- return /* @__PURE__ */ jsx18(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs9(DialogContent, { showCloseButton: false, className: "w-full max-w-lg gap-0 p-0", children: [
27256
- /* @__PURE__ */ jsxs9("div", { className: "flex items-center justify-between border-b border-[hsl(var(--border))] px-4 py-3", children: [
27257
- /* @__PURE__ */ jsxs9("div", { children: [
27258
- /* @__PURE__ */ jsx18(DialogTitle, { className: "text-sm font-semibold text-[hsl(var(--foreground))]", children: "\u9644\u4EF6\u8D85\u8FC7\u5927\u5C0F\u9650\u5236" }),
27259
- /* @__PURE__ */ jsxs9("p", { className: "mt-1 text-xs text-[hsl(var(--muted-foreground))]", children: [
27351
+ return /* @__PURE__ */ jsx19(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs10(DialogContent, { showCloseButton: false, className: "w-full max-w-lg gap-0 p-0", children: [
27352
+ /* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-between border-b border-[hsl(var(--border))] px-4 py-3", children: [
27353
+ /* @__PURE__ */ jsxs10("div", { children: [
27354
+ /* @__PURE__ */ jsx19(DialogTitle, { className: "text-sm font-semibold text-[hsl(var(--foreground))]", children: "\u9644\u4EF6\u8D85\u8FC7\u5927\u5C0F\u9650\u5236" }),
27355
+ /* @__PURE__ */ jsxs10("p", { className: "mt-1 text-xs text-[hsl(var(--muted-foreground))]", children: [
27260
27356
  "\u5355\u4E2A\u9644\u4EF6\u6700\u5927\u652F\u6301 ",
27261
27357
  limitText,
27262
27358
  "\u3002\u4EE5\u4E0B\u6587\u4EF6\u672A\u52A0\u5165\u9644\u4EF6\u5217\u8868\u3002"
27263
27359
  ] })
27264
27360
  ] }),
27265
- /* @__PURE__ */ jsx18(
27361
+ /* @__PURE__ */ jsx19(
27266
27362
  DialogClose,
27267
27363
  {
27268
27364
  title: "\u5173\u95ED",
27269
27365
  className: "flex h-7 w-7 items-center justify-center rounded-md text-[hsl(var(--muted-foreground))] transition-colors hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--foreground))]",
27270
- children: /* @__PURE__ */ jsx18(X, { size: 14 })
27366
+ children: /* @__PURE__ */ jsx19(X, { size: 14 })
27271
27367
  }
27272
27368
  )
27273
27369
  ] }),
27274
- /* @__PURE__ */ jsx18("div", { className: "max-h-[min(50vh,24rem)] overflow-auto px-4 py-3", children: /* @__PURE__ */ jsx18("div", { className: "flex flex-col gap-2", children: files.map((file) => /* @__PURE__ */ jsxs9(
27370
+ /* @__PURE__ */ jsx19("div", { className: "max-h-[min(50vh,24rem)] overflow-auto px-4 py-3", children: /* @__PURE__ */ jsx19("div", { className: "flex flex-col gap-2", children: files.map((file) => /* @__PURE__ */ jsxs10(
27275
27371
  "div",
27276
27372
  {
27277
27373
  className: "flex items-center justify-between gap-3 rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--accent))] px-3 py-2",
27278
27374
  children: [
27279
- /* @__PURE__ */ jsx18("span", { className: "min-w-0 truncate text-sm text-[hsl(var(--foreground))]", children: file.name }),
27280
- /* @__PURE__ */ jsx18("span", { className: "shrink-0 text-xs text-[hsl(var(--muted-foreground))]", children: formatFileSize(file.size) })
27375
+ /* @__PURE__ */ jsx19("span", { className: "min-w-0 truncate text-sm text-[hsl(var(--foreground))]", children: file.name }),
27376
+ /* @__PURE__ */ jsx19("span", { className: "shrink-0 text-xs text-[hsl(var(--muted-foreground))]", children: formatFileSize(file.size) })
27281
27377
  ]
27282
27378
  },
27283
27379
  `${file.name}:${file.size}`
27284
27380
  )) }) }),
27285
- /* @__PURE__ */ jsx18("div", { className: "flex justify-end border-t border-[hsl(var(--border))] px-4 py-3", children: /* @__PURE__ */ jsx18(
27381
+ /* @__PURE__ */ jsx19("div", { className: "flex justify-end border-t border-[hsl(var(--border))] px-4 py-3", children: /* @__PURE__ */ jsx19(
27286
27382
  "button",
27287
27383
  {
27288
27384
  type: "button",
@@ -27360,7 +27456,7 @@ function reasoningLevelLabel(level) {
27360
27456
  }
27361
27457
 
27362
27458
  // src/rich-input/ReasoningModeSelect.tsx
27363
- import { jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
27459
+ import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
27364
27460
  function ReasoningModeSelect({
27365
27461
  level,
27366
27462
  levels,
@@ -27368,11 +27464,11 @@ function ReasoningModeSelect({
27368
27464
  disabledReason,
27369
27465
  onChange
27370
27466
  }) {
27371
- return /* @__PURE__ */ jsxs10("label", { className: "flex w-full flex-col gap-1 px-3 py-2", children: [
27372
- /* @__PURE__ */ jsxs10("span", { className: "flex w-full items-center gap-2", children: [
27373
- /* @__PURE__ */ jsx19(Brain, { size: 14, className: `shrink-0 ${chatTone("reasoning").text}`, "aria-hidden": "true" }),
27374
- /* @__PURE__ */ jsx19("span", { className: "shrink-0", children: "\u601D\u8003\u6A21\u5F0F" }),
27375
- /* @__PURE__ */ jsx19(
27467
+ return /* @__PURE__ */ jsxs11("label", { className: "flex w-full flex-col gap-1 px-3 py-2", children: [
27468
+ /* @__PURE__ */ jsxs11("span", { className: "flex w-full items-center gap-2", children: [
27469
+ /* @__PURE__ */ jsx20(Brain, { size: 14, className: `shrink-0 ${chatTone("reasoning").text}`, "aria-hidden": "true" }),
27470
+ /* @__PURE__ */ jsx20("span", { className: "shrink-0", children: "\u601D\u8003\u6A21\u5F0F" }),
27471
+ /* @__PURE__ */ jsx20(
27376
27472
  "select",
27377
27473
  {
27378
27474
  value: level,
@@ -27381,18 +27477,18 @@ function ReasoningModeSelect({
27381
27477
  "aria-label": "\u601D\u8003\u6A21\u5F0F",
27382
27478
  title: "\u9009\u62E9\u601D\u8003\u6863\u4F4D\u3002\u6863\u4F4D\u8D8A\u9AD8\uFF0C\u6A21\u578B\u601D\u8003\u8D8A\u6DF1\u5165\uFF0C\u4F46\u54CD\u5E94\u53EF\u80FD\u66F4\u6162",
27383
27479
  className: "ml-auto h-6 min-w-20 rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--background))] px-1.5 disabled:cursor-not-allowed disabled:opacity-50",
27384
- children: levels.map((item) => /* @__PURE__ */ jsx19("option", { value: item, children: reasoningLevelLabel(item) }, item))
27480
+ children: levels.map((item) => /* @__PURE__ */ jsx20("option", { value: item, children: reasoningLevelLabel(item) }, item))
27385
27481
  }
27386
27482
  )
27387
27483
  ] }),
27388
- disabled && disabledReason ? /* @__PURE__ */ jsx19("span", { className: "pl-[22px] text-xs text-[hsl(var(--muted-foreground))]", children: disabledReason }) : null
27484
+ disabled && disabledReason ? /* @__PURE__ */ jsx20("span", { className: "pl-[22px] text-xs text-[hsl(var(--muted-foreground))]", children: disabledReason }) : null
27389
27485
  ] });
27390
27486
  }
27391
27487
 
27392
27488
  // src/rich-input/PlanningToggle.tsx
27393
- import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
27489
+ import { jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
27394
27490
  function PlanningToggle({ enabled, onChange, disabled }) {
27395
- return /* @__PURE__ */ jsxs11(
27491
+ return /* @__PURE__ */ jsxs12(
27396
27492
  "button",
27397
27493
  {
27398
27494
  type: "button",
@@ -27404,18 +27500,18 @@ function PlanningToggle({ enabled, onChange, disabled }) {
27404
27500
  disabled,
27405
27501
  className: "flex w-full items-center justify-between gap-3 px-3 py-2 text-left transition-colors hover:bg-[hsl(var(--accent))] disabled:cursor-not-allowed disabled:opacity-50",
27406
27502
  children: [
27407
- /* @__PURE__ */ jsxs11("span", { className: "flex items-center gap-2", children: [
27408
- /* @__PURE__ */ jsx20(Lightbulb, { size: 14, className: "text-[#F97316]", "aria-hidden": "true" }),
27503
+ /* @__PURE__ */ jsxs12("span", { className: "flex items-center gap-2", children: [
27504
+ /* @__PURE__ */ jsx21(Lightbulb, { size: 14, className: "text-[#F97316]", "aria-hidden": "true" }),
27409
27505
  "\u89C4\u5212\u6A21\u5F0F"
27410
27506
  ] }),
27411
- /* @__PURE__ */ jsxs11("span", { className: "flex items-center gap-2", children: [
27412
- /* @__PURE__ */ jsx20("span", { className: "text-[hsl(var(--muted-foreground))]", children: enabled ? "\u5F00" : "\u5173" }),
27413
- /* @__PURE__ */ jsx20(
27507
+ /* @__PURE__ */ jsxs12("span", { className: "flex items-center gap-2", children: [
27508
+ /* @__PURE__ */ jsx21("span", { className: "text-[hsl(var(--muted-foreground))]", children: enabled ? "\u5F00" : "\u5173" }),
27509
+ /* @__PURE__ */ jsx21(
27414
27510
  "span",
27415
27511
  {
27416
27512
  className: `flex h-4 w-7 items-center rounded-full p-0.5 transition-colors ${enabled ? "justify-end bg-[hsl(var(--primary))]" : "justify-start bg-[hsl(var(--muted))]"}`,
27417
27513
  "aria-hidden": "true",
27418
- children: /* @__PURE__ */ jsx20("span", { className: "h-3 w-3 rounded-full bg-[hsl(var(--background))]" })
27514
+ children: /* @__PURE__ */ jsx21("span", { className: "h-3 w-3 rounded-full bg-[hsl(var(--background))]" })
27419
27515
  }
27420
27516
  )
27421
27517
  ] })
@@ -27436,12 +27532,12 @@ function shouldHandleHistoryKey(event, menuOpen) {
27436
27532
  }
27437
27533
 
27438
27534
  // src/rich-input/ComposerAttachmentViewport.tsx
27439
- import { jsx as jsx21 } from "react/jsx-runtime";
27535
+ import { jsx as jsx23 } from "react/jsx-runtime";
27440
27536
  function ComposerAttachmentViewport({
27441
27537
  className,
27442
27538
  ...props
27443
27539
  }) {
27444
- return /* @__PURE__ */ jsx21(
27540
+ return /* @__PURE__ */ jsx23(
27445
27541
  "div",
27446
27542
  {
27447
27543
  className: cn("min-h-0 max-h-40 overflow-y-auto overscroll-contain", className),
@@ -27451,7 +27547,7 @@ function ComposerAttachmentViewport({
27451
27547
  }
27452
27548
 
27453
27549
  // src/rich-input/ChatInput.tsx
27454
- import { Fragment as Fragment5, jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
27550
+ import { Fragment as Fragment5, jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
27455
27551
  var RECENT_SESSION_LIMIT = 50;
27456
27552
  var DOUBLE_ESCAPE_MS = 450;
27457
27553
  function getEditorText(editor) {
@@ -27622,31 +27718,31 @@ function ComposerFilePill({
27622
27718
  const isFailed = isFile && attachment.status === "failed";
27623
27719
  const isUploading = isFile && attachment.status === "uploading";
27624
27720
  const uploadPercent = isUploading && typeof attachment.uploadProgress === "number" ? Math.max(0, Math.min(100, Math.round(attachment.uploadProgress * 100))) : null;
27625
- return /* @__PURE__ */ jsxs12(
27721
+ return /* @__PURE__ */ jsxs13(
27626
27722
  "div",
27627
27723
  {
27628
27724
  className: `relative flex shrink-0 items-center gap-1.5 overflow-hidden rounded-full border px-2.5 py-1 text-[11px] ${isFailed ? "border-[hsl(var(--swf-danger)/0.3)] bg-[hsl(var(--swf-danger-soft))] text-[hsl(var(--swf-danger))]" : "border-[hsl(var(--border))] bg-[hsl(var(--card))] text-[hsl(var(--foreground))]"}`,
27629
27725
  children: [
27630
- uploadPercent !== null ? /* @__PURE__ */ jsx23(
27726
+ uploadPercent !== null ? /* @__PURE__ */ jsx24(
27631
27727
  "span",
27632
27728
  {
27633
27729
  className: "absolute inset-y-0 left-0 bg-[hsl(var(--primary))]/10 transition-[width]",
27634
27730
  style: { width: `${uploadPercent}%` }
27635
27731
  }
27636
27732
  ) : null,
27637
- isUploading ? /* @__PURE__ */ jsx23(
27733
+ isUploading ? /* @__PURE__ */ jsx24(
27638
27734
  LoaderCircle,
27639
27735
  {
27640
27736
  size: 12,
27641
27737
  className: "relative z-10 shrink-0 animate-spin text-[hsl(var(--muted-foreground))]"
27642
27738
  }
27643
- ) : /* @__PURE__ */ jsx23(Icon, { size: 12, className: "relative z-10 shrink-0 text-[hsl(var(--muted-foreground))]" }),
27644
- /* @__PURE__ */ jsx23("span", { className: "relative z-10 max-w-32 truncate", children: attachment.name }),
27645
- uploadPercent !== null ? /* @__PURE__ */ jsxs12("span", { className: "relative z-10 font-mono text-[10px] tabular-nums text-[hsl(var(--muted-foreground))]", children: [
27739
+ ) : /* @__PURE__ */ jsx24(Icon, { size: 12, className: "relative z-10 shrink-0 text-[hsl(var(--muted-foreground))]" }),
27740
+ /* @__PURE__ */ jsx24("span", { className: "relative z-10 max-w-32 truncate", children: attachment.name }),
27741
+ uploadPercent !== null ? /* @__PURE__ */ jsxs13("span", { className: "relative z-10 font-mono text-[10px] tabular-nums text-[hsl(var(--muted-foreground))]", children: [
27646
27742
  uploadPercent,
27647
27743
  "%"
27648
27744
  ] }) : null,
27649
- /* @__PURE__ */ jsx23(
27745
+ /* @__PURE__ */ jsx24(
27650
27746
  "button",
27651
27747
  {
27652
27748
  type: "button",
@@ -27654,7 +27750,7 @@ function ComposerFilePill({
27654
27750
  "aria-label": `\u79FB\u9664 ${attachment.name}`,
27655
27751
  title: "\u79FB\u9664",
27656
27752
  className: "relative z-10 ml-0.5 inline-flex shrink-0 items-center justify-center rounded-full text-[hsl(var(--muted-foreground))] transition hover:text-[hsl(var(--swf-danger))]",
27657
- children: /* @__PURE__ */ jsx23(X, { size: 10 })
27753
+ children: /* @__PURE__ */ jsx24(X, { size: 10 })
27658
27754
  }
27659
27755
  )
27660
27756
  ]
@@ -27777,7 +27873,7 @@ ${upload.rawResultStr.slice(0, CONTEXT_INLINE_THRESHOLD)}...`
27777
27873
  setImportingId(null);
27778
27874
  }
27779
27875
  };
27780
- return /* @__PURE__ */ jsx23(
27876
+ return /* @__PURE__ */ jsx24(
27781
27877
  "div",
27782
27878
  {
27783
27879
  className: "fixed inset-0 z-[60] flex items-center justify-center bg-black/55 p-4",
@@ -27785,44 +27881,44 @@ ${upload.rawResultStr.slice(0, CONTEXT_INLINE_THRESHOLD)}...`
27785
27881
  onKeyDown: (e) => {
27786
27882
  if (e.key === "Escape") onClose();
27787
27883
  },
27788
- children: /* @__PURE__ */ jsxs12(
27884
+ children: /* @__PURE__ */ jsxs13(
27789
27885
  "div",
27790
27886
  {
27791
27887
  className: "w-full max-w-lg flex flex-col rounded-2xl border border-[hsl(var(--border))] bg-[hsl(var(--card))] shadow-[var(--swf-shadow-overlay)]",
27792
27888
  onClick: (e) => e.stopPropagation(),
27793
27889
  onKeyDown: (e) => e.stopPropagation(),
27794
27890
  children: [
27795
- /* @__PURE__ */ jsxs12("div", { className: "flex items-center justify-between border-b border-[hsl(var(--border))] px-5 py-3", children: [
27796
- /* @__PURE__ */ jsx23("h4", { className: "text-sm font-semibold text-[hsl(var(--foreground))]", children: "\u6DFB\u52A0\u4E0A\u4E0B\u6587" }),
27797
- /* @__PURE__ */ jsx23(
27891
+ /* @__PURE__ */ jsxs13("div", { className: "flex items-center justify-between border-b border-[hsl(var(--border))] px-5 py-3", children: [
27892
+ /* @__PURE__ */ jsx24("h4", { className: "text-sm font-semibold text-[hsl(var(--foreground))]", children: "\u6DFB\u52A0\u4E0A\u4E0B\u6587" }),
27893
+ /* @__PURE__ */ jsx24(
27798
27894
  "button",
27799
27895
  {
27800
27896
  type: "button",
27801
27897
  onClick: onClose,
27802
27898
  className: "rounded-md p-1 text-[hsl(var(--muted-foreground))] transition-colors hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--foreground))]",
27803
- children: /* @__PURE__ */ jsx23(X, { size: 14 })
27899
+ children: /* @__PURE__ */ jsx24(X, { size: 14 })
27804
27900
  }
27805
27901
  )
27806
27902
  ] }),
27807
- /* @__PURE__ */ jsxs12("div", { className: "px-5 py-4 space-y-3", children: [
27808
- /* @__PURE__ */ jsxs12("div", { className: "relative", children: [
27809
- /* @__PURE__ */ jsxs12(
27903
+ /* @__PURE__ */ jsxs13("div", { className: "px-5 py-4 space-y-3", children: [
27904
+ /* @__PURE__ */ jsxs13("div", { className: "relative", children: [
27905
+ /* @__PURE__ */ jsxs13(
27810
27906
  "button",
27811
27907
  {
27812
27908
  type: "button",
27813
27909
  onClick: handleLoadSessions,
27814
27910
  className: "inline-flex items-center gap-1.5 rounded-md border border-[hsl(var(--border))] px-2.5 py-1.5 text-xs text-[hsl(var(--foreground))] transition-colors hover:bg-[hsl(var(--accent))]",
27815
27911
  children: [
27816
- /* @__PURE__ */ jsx23(Import, { size: 12 }),
27912
+ /* @__PURE__ */ jsx24(Import, { size: 12 }),
27817
27913
  "\u4ECE\u5176\u4ED6\u4F1A\u8BDD\u5BFC\u5165",
27818
- /* @__PURE__ */ jsx23(ChevronDown, { size: 10, className: `transition-transform ${showSessionPicker ? "rotate-180" : ""}` })
27914
+ /* @__PURE__ */ jsx24(ChevronDown, { size: 10, className: `transition-transform ${showSessionPicker ? "rotate-180" : ""}` })
27819
27915
  ]
27820
27916
  }
27821
27917
  ),
27822
- showSessionPicker && /* @__PURE__ */ jsx23("div", { className: "absolute left-0 top-full z-10 mt-1 max-h-48 w-full overflow-y-auto rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))] shadow-[var(--swf-shadow-overlay)]", children: loadingSessions ? /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-2 px-3 py-2.5 text-xs text-[hsl(var(--muted-foreground))]", children: [
27823
- /* @__PURE__ */ jsx23(LoaderCircle, { size: 12, className: "animate-spin" }),
27918
+ showSessionPicker && /* @__PURE__ */ jsx24("div", { className: "absolute left-0 top-full z-10 mt-1 max-h-48 w-full overflow-y-auto rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))] shadow-[var(--swf-shadow-overlay)]", children: loadingSessions ? /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-2 px-3 py-2.5 text-xs text-[hsl(var(--muted-foreground))]", children: [
27919
+ /* @__PURE__ */ jsx24(LoaderCircle, { size: 12, className: "animate-spin" }),
27824
27920
  "\u52A0\u8F7D\u4F1A\u8BDD\u5217\u8868\u2026"
27825
- ] }) : sessions.length === 0 ? /* @__PURE__ */ jsx23("div", { className: "px-3 py-2.5 text-xs text-[hsl(var(--muted-foreground))]", children: "\u6682\u65E0\u5176\u4ED6\u4F1A\u8BDD" }) : sessions.map((s) => /* @__PURE__ */ jsxs12(
27921
+ ] }) : sessions.length === 0 ? /* @__PURE__ */ jsx24("div", { className: "px-3 py-2.5 text-xs text-[hsl(var(--muted-foreground))]", children: "\u6682\u65E0\u5176\u4ED6\u4F1A\u8BDD" }) : sessions.map((s) => /* @__PURE__ */ jsxs13(
27826
27922
  "button",
27827
27923
  {
27828
27924
  type: "button",
@@ -27830,16 +27926,16 @@ ${upload.rawResultStr.slice(0, CONTEXT_INLINE_THRESHOLD)}...`
27830
27926
  onClick: () => handleImportSession(s.id),
27831
27927
  className: "flex w-full items-center gap-2 px-3 py-2 text-left text-xs text-[hsl(var(--foreground))] transition-colors hover:bg-[hsl(var(--accent))] disabled:opacity-50",
27832
27928
  children: [
27833
- importingId === s.id && /* @__PURE__ */ jsx23(LoaderCircle, { size: 10, className: "shrink-0 animate-spin" }),
27834
- /* @__PURE__ */ jsx23("span", { className: "truncate", children: s.intent })
27929
+ importingId === s.id && /* @__PURE__ */ jsx24(LoaderCircle, { size: 10, className: "shrink-0 animate-spin" }),
27930
+ /* @__PURE__ */ jsx24("span", { className: "truncate", children: s.intent })
27835
27931
  ]
27836
27932
  },
27837
27933
  s.id
27838
27934
  )) })
27839
27935
  ] }),
27840
- /* @__PURE__ */ jsxs12("div", { children: [
27841
- /* @__PURE__ */ jsx23("label", { htmlFor: "ctx-label", className: "block text-xs font-medium text-[hsl(var(--foreground))] mb-1", children: "\u6807\u7B7E" }),
27842
- /* @__PURE__ */ jsx23(
27936
+ /* @__PURE__ */ jsxs13("div", { children: [
27937
+ /* @__PURE__ */ jsx24("label", { htmlFor: "ctx-label", className: "block text-xs font-medium text-[hsl(var(--foreground))] mb-1", children: "\u6807\u7B7E" }),
27938
+ /* @__PURE__ */ jsx24(
27843
27939
  "input",
27844
27940
  {
27845
27941
  id: "ctx-label",
@@ -27850,13 +27946,13 @@ ${upload.rawResultStr.slice(0, CONTEXT_INLINE_THRESHOLD)}...`
27850
27946
  }
27851
27947
  )
27852
27948
  ] }),
27853
- /* @__PURE__ */ jsxs12("div", { children: [
27854
- /* @__PURE__ */ jsx23("label", { htmlFor: "ctx-content", className: "block text-xs font-medium text-[hsl(var(--foreground))] mb-1", children: "\u5185\u5BB9" }),
27855
- isImportProcessing && /* @__PURE__ */ jsxs12("div", { className: "mb-1.5 flex items-center gap-1.5 text-[11px] text-[hsl(var(--muted-foreground))]", children: [
27856
- /* @__PURE__ */ jsx23(LoaderCircle, { size: 12, className: "animate-spin" }),
27949
+ /* @__PURE__ */ jsxs13("div", { children: [
27950
+ /* @__PURE__ */ jsx24("label", { htmlFor: "ctx-content", className: "block text-xs font-medium text-[hsl(var(--foreground))] mb-1", children: "\u5185\u5BB9" }),
27951
+ isImportProcessing && /* @__PURE__ */ jsxs13("div", { className: "mb-1.5 flex items-center gap-1.5 text-[11px] text-[hsl(var(--muted-foreground))]", children: [
27952
+ /* @__PURE__ */ jsx24(LoaderCircle, { size: 12, className: "animate-spin" }),
27857
27953
  "\u6B63\u5728\u5904\u7406\u5BFC\u5165\u5185\u5BB9\u5E76\u5199\u5165 workspace/context\uFF0C\u5B8C\u6210\u540E\u53EF\u70B9\u51FB\u201C\u786E\u5B9A\u201D"
27858
27954
  ] }),
27859
- /* @__PURE__ */ jsx23(
27955
+ /* @__PURE__ */ jsx24(
27860
27956
  "textarea",
27861
27957
  {
27862
27958
  id: "ctx-content",
@@ -27869,8 +27965,8 @@ ${upload.rawResultStr.slice(0, CONTEXT_INLINE_THRESHOLD)}...`
27869
27965
  )
27870
27966
  ] })
27871
27967
  ] }),
27872
- /* @__PURE__ */ jsxs12("div", { className: "flex justify-end gap-2 border-t border-[hsl(var(--border))] px-5 py-3", children: [
27873
- /* @__PURE__ */ jsx23(
27968
+ /* @__PURE__ */ jsxs13("div", { className: "flex justify-end gap-2 border-t border-[hsl(var(--border))] px-5 py-3", children: [
27969
+ /* @__PURE__ */ jsx24(
27874
27970
  "button",
27875
27971
  {
27876
27972
  type: "button",
@@ -27879,7 +27975,7 @@ ${upload.rawResultStr.slice(0, CONTEXT_INLINE_THRESHOLD)}...`
27879
27975
  children: "\u53D6\u6D88"
27880
27976
  }
27881
27977
  ),
27882
- /* @__PURE__ */ jsx23(
27978
+ /* @__PURE__ */ jsx24(
27883
27979
  "button",
27884
27980
  {
27885
27981
  type: "button",
@@ -27910,19 +28006,19 @@ function ComposerContextPill({
27910
28006
  }) {
27911
28007
  const [showDetail, setShowDetail] = useState11(false);
27912
28008
  const tokenK = formatTokenK(content);
27913
- return /* @__PURE__ */ jsxs12(Fragment5, { children: [
27914
- /* @__PURE__ */ jsxs12("div", { className: "flex shrink-0 items-center gap-1.5 rounded-full border border-[hsl(var(--border))] bg-[hsl(var(--accent))] px-2.5 py-1 text-[11px] text-[hsl(var(--foreground))]", children: [
27915
- imageUrl ? /* @__PURE__ */ jsx23(
28009
+ return /* @__PURE__ */ jsxs13(Fragment5, { children: [
28010
+ /* @__PURE__ */ jsxs13("div", { className: "flex shrink-0 items-center gap-1.5 rounded-full border border-[hsl(var(--border))] bg-[hsl(var(--accent))] px-2.5 py-1 text-[11px] text-[hsl(var(--foreground))]", children: [
28011
+ imageUrl ? /* @__PURE__ */ jsx24(
27916
28012
  "button",
27917
28013
  {
27918
28014
  type: "button",
27919
28015
  onClick: () => setShowDetail(true),
27920
28016
  className: "h-6 w-6 overflow-hidden rounded-md border border-[hsl(var(--border))] bg-white",
27921
28017
  title: "\u67E5\u770B\u9009\u4E2D\u533A\u57DF\u622A\u56FE",
27922
- children: /* @__PURE__ */ jsx23("img", { src: imageUrl, alt: "\u9009\u4E2D\u533A\u57DF\u622A\u56FE", className: "h-full w-full object-cover" })
28018
+ children: /* @__PURE__ */ jsx24("img", { src: imageUrl, alt: "\u9009\u4E2D\u533A\u57DF\u622A\u56FE", className: "h-full w-full object-cover" })
27923
28019
  }
27924
28020
  ) : null,
27925
- /* @__PURE__ */ jsx23(
28021
+ /* @__PURE__ */ jsx24(
27926
28022
  "button",
27927
28023
  {
27928
28024
  type: "button",
@@ -27932,7 +28028,7 @@ function ComposerContextPill({
27932
28028
  children: label
27933
28029
  }
27934
28030
  ),
27935
- /* @__PURE__ */ jsx23(
28031
+ /* @__PURE__ */ jsx24(
27936
28032
  "span",
27937
28033
  {
27938
28034
  className: "shrink-0 rounded bg-[hsl(var(--background))] px-1.5 py-0.5 text-[10px] text-[hsl(var(--muted-foreground))]",
@@ -27940,7 +28036,7 @@ function ComposerContextPill({
27940
28036
  children: tokenK
27941
28037
  }
27942
28038
  ),
27943
- /* @__PURE__ */ jsx23(
28039
+ /* @__PURE__ */ jsx24(
27944
28040
  "button",
27945
28041
  {
27946
28042
  type: "button",
@@ -27948,11 +28044,11 @@ function ComposerContextPill({
27948
28044
  "aria-label": `\u79FB\u9664\u4E0A\u4E0B\u6587 ${label}`,
27949
28045
  title: "\u79FB\u9664",
27950
28046
  className: "ml-0.5 inline-flex shrink-0 items-center justify-center rounded-full text-[hsl(var(--muted-foreground))] transition hover:text-[hsl(var(--swf-danger))]",
27951
- children: /* @__PURE__ */ jsx23(X, { size: 10 })
28047
+ children: /* @__PURE__ */ jsx24(X, { size: 10 })
27952
28048
  }
27953
28049
  )
27954
28050
  ] }),
27955
- showDetail && /* @__PURE__ */ jsx23(
28051
+ showDetail && /* @__PURE__ */ jsx24(
27956
28052
  "div",
27957
28053
  {
27958
28054
  className: "fixed inset-0 z-[60] flex items-center justify-center bg-black/55 p-6",
@@ -27960,31 +28056,31 @@ function ComposerContextPill({
27960
28056
  onKeyDown: (e) => {
27961
28057
  if (e.key === "Escape") setShowDetail(false);
27962
28058
  },
27963
- children: /* @__PURE__ */ jsxs12(
28059
+ children: /* @__PURE__ */ jsxs13(
27964
28060
  "div",
27965
28061
  {
27966
28062
  className: "w-full max-w-4xl max-h-[85vh] flex flex-col rounded-2xl border border-[hsl(var(--border))] bg-[hsl(var(--card))] shadow-[var(--swf-shadow-overlay)]",
27967
28063
  onClick: (e) => e.stopPropagation(),
27968
28064
  onKeyDown: (e) => e.stopPropagation(),
27969
28065
  children: [
27970
- /* @__PURE__ */ jsxs12("div", { className: "flex items-center justify-between border-b border-[hsl(var(--border))] px-6 py-3", children: [
27971
- /* @__PURE__ */ jsxs12("div", { className: "min-w-0", children: [
27972
- /* @__PURE__ */ jsx23("h4", { className: "truncate text-xs font-semibold text-[hsl(var(--foreground))]", children: label }),
27973
- imageUrl ? /* @__PURE__ */ jsx23("p", { className: "mt-0.5 text-[11px] text-[hsl(var(--muted-foreground))]", children: "\u5DF2\u9644\u52A0\u9009\u4E2D\u533A\u57DF\u622A\u56FE\uFF0C\u975E\u591A\u6A21\u6001\u6A21\u578B\u4F1A\u81EA\u52A8\u5FFD\u7565\u56FE\u7247\u3002" }) : null
28066
+ /* @__PURE__ */ jsxs13("div", { className: "flex items-center justify-between border-b border-[hsl(var(--border))] px-6 py-3", children: [
28067
+ /* @__PURE__ */ jsxs13("div", { className: "min-w-0", children: [
28068
+ /* @__PURE__ */ jsx24("h4", { className: "truncate text-xs font-semibold text-[hsl(var(--foreground))]", children: label }),
28069
+ imageUrl ? /* @__PURE__ */ jsx24("p", { className: "mt-0.5 text-[11px] text-[hsl(var(--muted-foreground))]", children: "\u5DF2\u9644\u52A0\u9009\u4E2D\u533A\u57DF\u622A\u56FE\uFF0C\u975E\u591A\u6A21\u6001\u6A21\u578B\u4F1A\u81EA\u52A8\u5FFD\u7565\u56FE\u7247\u3002" }) : null
27974
28070
  ] }),
27975
- /* @__PURE__ */ jsx23(
28071
+ /* @__PURE__ */ jsx24(
27976
28072
  "button",
27977
28073
  {
27978
28074
  type: "button",
27979
28075
  onClick: () => setShowDetail(false),
27980
28076
  className: "rounded-md p-1 text-[hsl(var(--muted-foreground))] transition-colors hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--foreground))]",
27981
- children: /* @__PURE__ */ jsx23(X, { size: 14 })
28077
+ children: /* @__PURE__ */ jsx24(X, { size: 14 })
27982
28078
  }
27983
28079
  )
27984
28080
  ] }),
27985
- /* @__PURE__ */ jsxs12("div", { className: "min-h-0 flex-1 overflow-y-auto px-6 py-4", children: [
27986
- imageUrl ? /* @__PURE__ */ jsx23("div", { className: "mb-4 rounded-xl border border-[hsl(var(--border))] bg-white p-2", children: /* @__PURE__ */ jsx23("img", { src: imageUrl, alt: "\u9009\u4E2D\u533A\u57DF\u622A\u56FE", className: "max-h-72 max-w-full rounded-lg object-contain" }) }) : null,
27987
- /* @__PURE__ */ jsx23("pre", { className: "whitespace-pre-wrap break-words font-mono text-[11px] leading-[1.6] text-[hsl(var(--foreground)/0.85)]", children: content })
28081
+ /* @__PURE__ */ jsxs13("div", { className: "min-h-0 flex-1 overflow-y-auto px-6 py-4", children: [
28082
+ imageUrl ? /* @__PURE__ */ jsx24("div", { className: "mb-4 rounded-xl border border-[hsl(var(--border))] bg-white p-2", children: /* @__PURE__ */ jsx24("img", { src: imageUrl, alt: "\u9009\u4E2D\u533A\u57DF\u622A\u56FE", className: "max-h-72 max-w-full rounded-lg object-contain" }) }) : null,
28083
+ /* @__PURE__ */ jsx24("pre", { className: "whitespace-pre-wrap break-words font-mono text-[11px] leading-[1.6] text-[hsl(var(--foreground)/0.85)]", children: content })
27988
28084
  ] })
27989
28085
  ]
27990
28086
  }
@@ -28165,7 +28261,7 @@ function ChatInput({
28165
28261
  const detail = await client.sessions.getSession(activeSessionId);
28166
28262
  return getTopicAssetSuggestionItems(client, detail.chat_group_id, query);
28167
28263
  } catch {
28168
- return [{ kind: "topicAssetError", message: "\u4E3B\u9898\u8D44\u4EA7\u6682\u65F6\u65E0\u6CD5\u52A0\u8F7D\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165 @ \u91CD\u8BD5" }];
28264
+ return [{ kind: "topicAssetError", message: "\u5DE5\u4F5C\u7A7A\u95F4\u8D44\u4EA7\u6682\u65F6\u65E0\u6CD5\u52A0\u8F7D\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165 @ \u91CD\u8BD5" }];
28169
28265
  }
28170
28266
  });
28171
28267
  const getSessionId = useEffectEvent(() => activeSessionId);
@@ -28282,7 +28378,7 @@ function ChatInput({
28282
28378
  if (!container || !root) return;
28283
28379
  updateSuggestionPosition(container, props.clientRect);
28284
28380
  root.render(
28285
- /* @__PURE__ */ jsx23(
28381
+ /* @__PURE__ */ jsx24(
28286
28382
  FileCompletionMenu,
28287
28383
  {
28288
28384
  ref: (instance) => {
@@ -28375,7 +28471,7 @@ function ChatInput({
28375
28471
  if (!container || !root) return;
28376
28472
  updateSuggestionPosition(container, props.clientRect);
28377
28473
  root.render(
28378
- /* @__PURE__ */ jsx23(
28474
+ /* @__PURE__ */ jsx24(
28379
28475
  SkillCompletionMenu,
28380
28476
  {
28381
28477
  ref: (instance) => {
@@ -28713,7 +28809,7 @@ ${append2.text}` : append2.text;
28713
28809
  }
28714
28810
  const topicAssetRefs = collectTopicAssetMentions(json);
28715
28811
  if (topicAssetRefs.length > 20) {
28716
- notifyChat(environment, "error", "\u6BCF\u6761\u6D88\u606F\u6700\u591A\u5F15\u7528 20 \u4E2A\u4E3B\u9898\u8D44\u4EA7");
28812
+ notifyChat(environment, "error", "\u6BCF\u6761\u6D88\u606F\u6700\u591A\u5F15\u7528 20 \u4E2A\u5DE5\u4F5C\u7A7A\u95F4\u8D44\u4EA7");
28717
28813
  return;
28718
28814
  }
28719
28815
  const text = rawText;
@@ -28946,11 +29042,11 @@ ${append2.text}` : append2.text;
28946
29042
  const hasComposerContent = Boolean(input.trim()) || hasValidAttachments || hasRenderedAttachments || hasPendingContexts;
28947
29043
  const isSendDisabled = connectionStatus !== "connected" || isCompacting || !submitWhileRunning && isModelLoading || !submitWhileRunning && !hasAvailableModel || isSubmitting || hasUploadingFiles || !input.trim() && !hasValidAttachments && !hasRenderedAttachments && !hasPendingContexts;
28948
29044
  const showQueueShortcut = Boolean(input.trim()) && !isSendDisabled && !isStopping && !isRecording && (!isStreaming || queueWhileRunning && !hasRunningSendBlockers());
28949
- return /* @__PURE__ */ jsxs12(Fragment5, { children: [
28950
- /* @__PURE__ */ jsx23("div", { className: `px-5 pb-3 pt-0 ${className ?? ""}`, children: /* @__PURE__ */ jsxs12("div", { className: `mx-auto ${maxWidthClassName} ${innerClassName ?? ""}`, children: [
28951
- statusBarAddon ? /* @__PURE__ */ jsx23("div", { className: "mb-2 flex flex-wrap items-center gap-2", children: statusBarAddon }) : null,
28952
- !isModelLoading && !hasAvailableModel ? /* @__PURE__ */ jsx23("div", { className: "mb-2 rounded-lg border border-[hsl(var(--destructive))]/30 bg-[hsl(var(--destructive))]/8 px-3 py-2 text-xs text-[hsl(var(--destructive))]", children: modelAvailabilityMessage }) : null,
28953
- /* @__PURE__ */ jsx23(
29045
+ return /* @__PURE__ */ jsxs13(Fragment5, { children: [
29046
+ /* @__PURE__ */ jsx24("div", { className: `px-5 pb-3 pt-0 ${className ?? ""}`, children: /* @__PURE__ */ jsxs13("div", { className: `mx-auto ${maxWidthClassName} ${innerClassName ?? ""}`, children: [
29047
+ statusBarAddon ? /* @__PURE__ */ jsx24("div", { className: "mb-2 flex flex-wrap items-center gap-2", children: statusBarAddon }) : null,
29048
+ !isModelLoading && !hasAvailableModel ? /* @__PURE__ */ jsx24("div", { className: "mb-2 rounded-lg border border-[hsl(var(--destructive))]/30 bg-[hsl(var(--destructive))]/8 px-3 py-2 text-xs text-[hsl(var(--destructive))]", children: modelAvailabilityMessage }) : null,
29049
+ /* @__PURE__ */ jsx24(
28954
29050
  "div",
28955
29051
  {
28956
29052
  className: "relative",
@@ -28984,20 +29080,20 @@ ${append2.text}` : append2.text;
28984
29080
  if (files.length > 0) void stableAppendFiles(files);
28985
29081
  });
28986
29082
  },
28987
- children: /* @__PURE__ */ jsxs12(
29083
+ children: /* @__PURE__ */ jsxs13(
28988
29084
  "div",
28989
29085
  {
28990
29086
  className: `overflow-visible border bg-[hsl(var(--card))] transition-[box-shadow,border-color] duration-300 ${mergesWithPanelAbove ? "rounded-b-[22px]" : "rounded-[22px]"} ${isRecording ? "border-[hsl(var(--swf-success))]!" : isPlanning ? dragging || isEditorFocused ? "border-[hsl(var(--swf-warning)/0.6)]" : "border-[hsl(var(--swf-warning)/0.3)]" : dragging || isEditorFocused ? "border-[hsl(213_94%_60%/0.55)] shadow-[0_0_0_3px_hsl(213_94%_60%/0.16),0_8px_24px_-6px_hsl(213_94%_60%/0.3)]" : "border-[hsl(213_94%_60%/0.28)] shadow-[0_0_0_2px_hsl(213_94%_60%/0.08),0_4px_14px_-6px_hsl(213_94%_60%/0.16)]"}`,
28991
29087
  children: [
28992
- dragging && /* @__PURE__ */ jsx23("div", { className: `pointer-events-none absolute inset-0 z-10 flex items-center justify-center bg-[hsl(var(--primary)/0.06)] ${mergesWithPanelAbove ? "rounded-b-[22px]" : "rounded-2xl"}`, children: /* @__PURE__ */ jsx23("span", { className: "rounded-full bg-[hsl(var(--primary)/0.12)] px-4 py-2 text-sm font-medium text-[hsl(var(--primary))]", children: "\u677E\u624B\u5F15\u7528\u6587\u4EF6" }) }),
29088
+ dragging && /* @__PURE__ */ jsx24("div", { className: `pointer-events-none absolute inset-0 z-10 flex items-center justify-center bg-[hsl(var(--primary)/0.06)] ${mergesWithPanelAbove ? "rounded-b-[22px]" : "rounded-2xl"}`, children: /* @__PURE__ */ jsx24("span", { className: "rounded-full bg-[hsl(var(--primary)/0.12)] px-4 py-2 text-sm font-medium text-[hsl(var(--primary))]", children: "\u677E\u624B\u5F15\u7528\u6587\u4EF6" }) }),
28993
29089
  planPanel,
28994
- composerAttachments.length > 0 && /* @__PURE__ */ jsxs12(ComposerAttachmentViewport, { className: "flex flex-col gap-2 border-b border-[hsl(var(--border))] px-4 py-2", children: [
28995
- imageAttachments.length > 0 && /* @__PURE__ */ jsx23("div", { className: "grid grid-cols-3 gap-2", children: imageAttachments.map((attachment) => /* @__PURE__ */ jsxs12(
29090
+ composerAttachments.length > 0 && /* @__PURE__ */ jsxs13(ComposerAttachmentViewport, { className: "flex flex-col gap-2 border-b border-[hsl(var(--border))] px-4 py-2", children: [
29091
+ imageAttachments.length > 0 && /* @__PURE__ */ jsx24("div", { className: "grid grid-cols-3 gap-2", children: imageAttachments.map((attachment) => /* @__PURE__ */ jsxs13(
28996
29092
  "div",
28997
29093
  {
28998
29094
  className: "relative overflow-hidden rounded-xl border border-[hsl(var(--border))]",
28999
29095
  children: [
29000
- /* @__PURE__ */ jsx23(
29096
+ /* @__PURE__ */ jsx24(
29001
29097
  "img",
29002
29098
  {
29003
29099
  src: getImagePreviewUrl(client, attachment, activeSessionId, localImageUrls),
@@ -29005,7 +29101,7 @@ ${append2.text}` : append2.text;
29005
29101
  className: "h-24 w-full object-cover"
29006
29102
  }
29007
29103
  ),
29008
- /* @__PURE__ */ jsx23(
29104
+ /* @__PURE__ */ jsx24(
29009
29105
  "button",
29010
29106
  {
29011
29107
  type: "button",
@@ -29013,14 +29109,14 @@ ${append2.text}` : append2.text;
29013
29109
  "aria-label": `\u79FB\u9664 ${attachment.name || "\u56FE\u7247"}`,
29014
29110
  title: "\u79FB\u9664",
29015
29111
  className: "absolute right-1.5 top-1.5 flex h-6 w-6 items-center justify-center rounded-full bg-[hsl(var(--background)/0.85)] text-[hsl(var(--foreground))]",
29016
- children: /* @__PURE__ */ jsx23(X, { size: 12 })
29112
+ children: /* @__PURE__ */ jsx24(X, { size: 12 })
29017
29113
  }
29018
29114
  )
29019
29115
  ]
29020
29116
  },
29021
29117
  attachment.id
29022
29118
  )) }),
29023
- fileAttachments.length > 0 && /* @__PURE__ */ jsx23("div", { className: "flex flex-wrap gap-1.5", children: fileAttachments.map((attachment) => /* @__PURE__ */ jsx23(
29119
+ fileAttachments.length > 0 && /* @__PURE__ */ jsx24("div", { className: "flex flex-wrap gap-1.5", children: fileAttachments.map((attachment) => /* @__PURE__ */ jsx24(
29024
29120
  ComposerFilePill,
29025
29121
  {
29026
29122
  attachment,
@@ -29029,8 +29125,8 @@ ${append2.text}` : append2.text;
29029
29125
  attachment.id
29030
29126
  )) })
29031
29127
  ] }),
29032
- hasPendingContexts || isSkillEditor ? /* @__PURE__ */ jsxs12("div", { className: "flex flex-wrap items-center gap-1.5 border-b border-[hsl(var(--border))] px-4 py-2", children: [
29033
- pendingContexts?.map((context) => /* @__PURE__ */ jsx23(
29128
+ hasPendingContexts || isSkillEditor ? /* @__PURE__ */ jsxs13("div", { className: "flex flex-wrap items-center gap-1.5 border-b border-[hsl(var(--border))] px-4 py-2", children: [
29129
+ pendingContexts?.map((context) => /* @__PURE__ */ jsx24(
29034
29130
  ComposerContextPill,
29035
29131
  {
29036
29132
  id: context.id,
@@ -29046,18 +29142,18 @@ ${append2.text}` : append2.text;
29046
29142
  },
29047
29143
  context.id
29048
29144
  )),
29049
- isSkillEditor && /* @__PURE__ */ jsx23(
29145
+ isSkillEditor && /* @__PURE__ */ jsx24(
29050
29146
  "button",
29051
29147
  {
29052
29148
  type: "button",
29053
29149
  onClick: () => setShowAddContext(true),
29054
29150
  title: "\u6DFB\u52A0\u4E0A\u4E0B\u6587",
29055
29151
  className: "inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full border border-dashed border-[hsl(var(--border))] text-[hsl(var(--muted-foreground))] transition-colors hover:border-[hsl(var(--ring))] hover:text-[hsl(var(--foreground))]",
29056
- children: /* @__PURE__ */ jsx23(Plus, { size: 12 })
29152
+ children: /* @__PURE__ */ jsx24(Plus, { size: 12 })
29057
29153
  }
29058
29154
  )
29059
29155
  ] }) : null,
29060
- showAddContext && activeSessionId && /* @__PURE__ */ jsx23(
29156
+ showAddContext && activeSessionId && /* @__PURE__ */ jsx24(
29061
29157
  AddContextDialog,
29062
29158
  {
29063
29159
  sessionId: activeSessionId,
@@ -29069,15 +29165,15 @@ ${append2.text}` : append2.text;
29069
29165
  }
29070
29166
  }
29071
29167
  ),
29072
- attachments ? /* @__PURE__ */ jsx23("div", { className: "border-b border-[hsl(var(--border))] px-4 py-3", children: attachments }) : null,
29073
- slotAboveTextarea ? /* @__PURE__ */ jsx23("div", { className: "border-b border-[hsl(var(--border))] px-4 py-2", children: slotAboveTextarea }) : null,
29074
- /* @__PURE__ */ jsxs12("div", { className: "relative", children: [
29075
- input.length === 0 && /* @__PURE__ */ jsx23("div", { className: "pointer-events-none absolute left-5 top-3 text-sm leading-relaxed text-[hsl(var(--muted-foreground)/0.6)]", children: placeholder }),
29076
- /* @__PURE__ */ jsx23(EditorContent, { editor })
29168
+ attachments ? /* @__PURE__ */ jsx24("div", { className: "border-b border-[hsl(var(--border))] px-4 py-3", children: attachments }) : null,
29169
+ slotAboveTextarea ? /* @__PURE__ */ jsx24("div", { className: "border-b border-[hsl(var(--border))] px-4 py-2", children: slotAboveTextarea }) : null,
29170
+ /* @__PURE__ */ jsxs13("div", { className: "relative", children: [
29171
+ input.length === 0 && /* @__PURE__ */ jsx24("div", { className: "pointer-events-none absolute left-5 top-3 text-sm leading-relaxed text-[hsl(var(--muted-foreground)/0.6)]", children: placeholder }),
29172
+ /* @__PURE__ */ jsx24(EditorContent, { editor })
29077
29173
  ] }),
29078
- /* @__PURE__ */ jsxs12("div", { className: "flex items-center justify-between px-4 pb-3 pt-1", children: [
29079
- /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-2", children: [
29080
- /* @__PURE__ */ jsx23(
29174
+ /* @__PURE__ */ jsxs13("div", { className: "flex items-center justify-between px-4 pb-3 pt-1", children: [
29175
+ /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-2", children: [
29176
+ /* @__PURE__ */ jsx24(
29081
29177
  "input",
29082
29178
  {
29083
29179
  ref: fileInputRef,
@@ -29093,7 +29189,7 @@ ${append2.text}` : append2.text;
29093
29189
  className: "hidden"
29094
29190
  }
29095
29191
  ),
29096
- /* @__PURE__ */ jsx23(
29192
+ /* @__PURE__ */ jsx24(
29097
29193
  "input",
29098
29194
  {
29099
29195
  ref: folderInputRef,
@@ -29109,7 +29205,7 @@ ${append2.text}` : append2.text;
29109
29205
  ...{ webkitdirectory: "" }
29110
29206
  }
29111
29207
  ),
29112
- /* @__PURE__ */ jsxs12(
29208
+ /* @__PURE__ */ jsxs13(
29113
29209
  dist_exports.Root,
29114
29210
  {
29115
29211
  open: actionMenuOpen,
@@ -29118,17 +29214,17 @@ ${append2.text}` : append2.text;
29118
29214
  if (open) setConnectMenuOpen(false);
29119
29215
  },
29120
29216
  children: [
29121
- /* @__PURE__ */ jsx23(dist_exports.Trigger, { asChild: true, children: /* @__PURE__ */ jsx23(
29217
+ /* @__PURE__ */ jsx24(dist_exports.Trigger, { asChild: true, children: /* @__PURE__ */ jsx24(
29122
29218
  "button",
29123
29219
  {
29124
29220
  type: "button",
29125
29221
  "aria-label": "\u6DFB\u52A0\u5185\u5BB9",
29126
29222
  title: "\u6DFB\u52A0\u5185\u5BB9",
29127
29223
  className: "flex h-9 w-9 shrink-0 cursor-pointer items-center justify-center rounded-full border border-[hsl(var(--border))] text-[hsl(var(--muted-foreground))] transition-colors hover:border-[hsl(var(--ring))] hover:text-[hsl(var(--foreground))]",
29128
- children: /* @__PURE__ */ jsx23(Plus, { size: 14 })
29224
+ children: /* @__PURE__ */ jsx24(Plus, { size: 14 })
29129
29225
  }
29130
29226
  ) }),
29131
- /* @__PURE__ */ jsx23(dist_exports.Portal, { children: /* @__PURE__ */ jsxs12(
29227
+ /* @__PURE__ */ jsx24(dist_exports.Portal, { children: /* @__PURE__ */ jsxs13(
29132
29228
  dist_exports.Content,
29133
29229
  {
29134
29230
  side: "top",
@@ -29136,7 +29232,7 @@ ${append2.text}` : append2.text;
29136
29232
  sideOffset: 8,
29137
29233
  className: "z-30 w-[min(380px,calc(100vw-2rem))] origin-(--radix-popover-content-transform-origin) overflow-visible rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--popover))] py-1 text-[11px] text-[hsl(var(--popover-foreground))] shadow-[var(--swf-shadow-overlay)] outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
29138
29234
  children: [
29139
- /* @__PURE__ */ jsxs12(
29235
+ /* @__PURE__ */ jsxs13(
29140
29236
  "button",
29141
29237
  {
29142
29238
  type: "button",
@@ -29146,12 +29242,12 @@ ${append2.text}` : append2.text;
29146
29242
  },
29147
29243
  className: "flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-[hsl(var(--accent))]",
29148
29244
  children: [
29149
- /* @__PURE__ */ jsx23(Paperclip, { size: 14 }),
29245
+ /* @__PURE__ */ jsx24(Paperclip, { size: 14 }),
29150
29246
  "\u4E0A\u4F20\u6587\u4EF6"
29151
29247
  ]
29152
29248
  }
29153
29249
  ),
29154
- /* @__PURE__ */ jsxs12(
29250
+ /* @__PURE__ */ jsxs13(
29155
29251
  "button",
29156
29252
  {
29157
29253
  type: "button",
@@ -29161,12 +29257,12 @@ ${append2.text}` : append2.text;
29161
29257
  },
29162
29258
  className: "flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-[hsl(var(--accent))]",
29163
29259
  children: [
29164
- /* @__PURE__ */ jsx23(FolderUp, { size: 14 }),
29260
+ /* @__PURE__ */ jsx24(FolderUp, { size: 14 }),
29165
29261
  "\u4E0A\u4F20\u6587\u4EF6\u5939"
29166
29262
  ]
29167
29263
  }
29168
29264
  ),
29169
- onCommand && canCreateBoardTask && !lite ? /* @__PURE__ */ jsxs12(
29265
+ onCommand && canCreateBoardTask && !lite ? /* @__PURE__ */ jsxs13(
29170
29266
  "button",
29171
29267
  {
29172
29268
  type: "button",
@@ -29176,12 +29272,12 @@ ${append2.text}` : append2.text;
29176
29272
  },
29177
29273
  className: "flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-[hsl(var(--accent))]",
29178
29274
  children: [
29179
- /* @__PURE__ */ jsx23(ListPlus, { size: 14 }),
29275
+ /* @__PURE__ */ jsx24(ListPlus, { size: 14 }),
29180
29276
  "\u521B\u5EFA\u540E\u53F0\u4EFB\u52A1"
29181
29277
  ]
29182
29278
  }
29183
29279
  ) : null,
29184
- onDoubleEscape ? /* @__PURE__ */ jsxs12(
29280
+ onDoubleEscape ? /* @__PURE__ */ jsxs13(
29185
29281
  "button",
29186
29282
  {
29187
29283
  type: "button",
@@ -29193,13 +29289,13 @@ ${append2.text}` : append2.text;
29193
29289
  },
29194
29290
  className: "flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-[hsl(var(--accent))]",
29195
29291
  children: [
29196
- /* @__PURE__ */ jsx23(RotateCcw, { size: 14 }),
29292
+ /* @__PURE__ */ jsx24(RotateCcw, { size: 14 }),
29197
29293
  "\u56DE\u5230\u4E4B\u524D\u7684\u67D0\u4E00\u6B65"
29198
29294
  ]
29199
29295
  }
29200
29296
  ) : null,
29201
- onCommand && !lite ? /* @__PURE__ */ jsxs12(Fragment5, { children: [
29202
- developer ? /* @__PURE__ */ jsxs12(
29297
+ onCommand && !lite ? /* @__PURE__ */ jsxs13(Fragment5, { children: [
29298
+ developer ? /* @__PURE__ */ jsxs13(
29203
29299
  "button",
29204
29300
  {
29205
29301
  type: "button",
@@ -29210,12 +29306,12 @@ ${append2.text}` : append2.text;
29210
29306
  disabled: isBusy,
29211
29307
  className: "flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-[hsl(var(--accent))] disabled:cursor-not-allowed disabled:opacity-50",
29212
29308
  children: [
29213
- isCompacting ? /* @__PURE__ */ jsx23(LoaderCircle, { size: 14, className: "animate-spin" }) : /* @__PURE__ */ jsx23(Scissors, { size: 14 }),
29309
+ isCompacting ? /* @__PURE__ */ jsx24(LoaderCircle, { size: 14, className: "animate-spin" }) : /* @__PURE__ */ jsx24(Scissors, { size: 14 }),
29214
29310
  "\u6574\u7406\u5BF9\u8BDD"
29215
29311
  ]
29216
29312
  }
29217
29313
  ) : null,
29218
- /* @__PURE__ */ jsxs12(
29314
+ /* @__PURE__ */ jsxs13(
29219
29315
  "button",
29220
29316
  {
29221
29317
  type: "button",
@@ -29225,12 +29321,12 @@ ${append2.text}` : append2.text;
29225
29321
  },
29226
29322
  className: "flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-[hsl(var(--accent))]",
29227
29323
  children: [
29228
- /* @__PURE__ */ jsx23(Download, { size: 14 }),
29324
+ /* @__PURE__ */ jsx24(Download, { size: 14 }),
29229
29325
  "\u5BFC\u51FA\u4F1A\u8BDD"
29230
29326
  ]
29231
29327
  }
29232
29328
  ),
29233
- /* @__PURE__ */ jsxs12(
29329
+ /* @__PURE__ */ jsxs13(
29234
29330
  "button",
29235
29331
  {
29236
29332
  type: "button",
@@ -29240,12 +29336,12 @@ ${append2.text}` : append2.text;
29240
29336
  },
29241
29337
  className: "flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-[hsl(var(--accent))]",
29242
29338
  children: [
29243
- /* @__PURE__ */ jsx23(Play, { size: 14 }),
29339
+ /* @__PURE__ */ jsx24(Play, { size: 14 }),
29244
29340
  "\u56DE\u653E\u8FD9\u4E2A\u5BF9\u8BDD"
29245
29341
  ]
29246
29342
  }
29247
29343
  ),
29248
- canShareSession ? /* @__PURE__ */ jsxs12(
29344
+ canShareSession ? /* @__PURE__ */ jsxs13(
29249
29345
  "button",
29250
29346
  {
29251
29347
  type: "button",
@@ -29255,12 +29351,12 @@ ${append2.text}` : append2.text;
29255
29351
  },
29256
29352
  className: "flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-[hsl(var(--accent))]",
29257
29353
  children: [
29258
- /* @__PURE__ */ jsx23(Share2, { size: 14 }),
29354
+ /* @__PURE__ */ jsx24(Share2, { size: 14 }),
29259
29355
  "\u5206\u4EAB\u4F1A\u8BDD"
29260
29356
  ]
29261
29357
  }
29262
29358
  ) : null,
29263
- /* @__PURE__ */ jsxs12(
29359
+ /* @__PURE__ */ jsxs13(
29264
29360
  "button",
29265
29361
  {
29266
29362
  type: "button",
@@ -29270,12 +29366,12 @@ ${append2.text}` : append2.text;
29270
29366
  },
29271
29367
  className: "flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-[hsl(var(--accent))]",
29272
29368
  children: [
29273
- /* @__PURE__ */ jsx23(FlaskConical, { size: 14 }),
29369
+ /* @__PURE__ */ jsx24(FlaskConical, { size: 14 }),
29274
29370
  "\u63D0\u53D6\u6280\u80FD"
29275
29371
  ]
29276
29372
  }
29277
29373
  ),
29278
- /* @__PURE__ */ jsxs12(
29374
+ /* @__PURE__ */ jsxs13(
29279
29375
  "button",
29280
29376
  {
29281
29377
  type: "button",
@@ -29285,13 +29381,13 @@ ${append2.text}` : append2.text;
29285
29381
  },
29286
29382
  className: "flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-[hsl(var(--accent))]",
29287
29383
  children: [
29288
- /* @__PURE__ */ jsx23(Rocket, { size: 14 }),
29384
+ /* @__PURE__ */ jsx24(Rocket, { size: 14 }),
29289
29385
  "\u751F\u6210\u5E94\u7528"
29290
29386
  ]
29291
29387
  }
29292
29388
  )
29293
29389
  ] }) : null,
29294
- onToggleMode && !lite ? /* @__PURE__ */ jsx23(
29390
+ onToggleMode && !lite ? /* @__PURE__ */ jsx24(
29295
29391
  PlanningToggle,
29296
29392
  {
29297
29393
  enabled: isPlanning,
@@ -29302,7 +29398,7 @@ ${append2.text}` : append2.text;
29302
29398
  disabled: isBusy
29303
29399
  }
29304
29400
  ) : null,
29305
- !lite && thinkingAvailable && reasoningLevels.length > 0 ? /* @__PURE__ */ jsx23(
29401
+ !lite && thinkingAvailable && reasoningLevels.length > 0 ? /* @__PURE__ */ jsx24(
29306
29402
  ReasoningModeSelect,
29307
29403
  {
29308
29404
  level: selectedReasoningLevel,
@@ -29312,12 +29408,13 @@ ${append2.text}` : append2.text;
29312
29408
  onChange: model.setReasoningLevel
29313
29409
  }
29314
29410
  ) : null,
29315
- !lite ? /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-2 px-3 py-2", children: [
29316
- /* @__PURE__ */ jsx23(Sparkles, { size: 14, className: "shrink-0", "aria-hidden": "true" }),
29317
- /* @__PURE__ */ jsx23("span", { className: "shrink-0", children: "\u6A21\u578B" }),
29318
- /* @__PURE__ */ jsx23(
29411
+ !lite ? /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-2 px-3 py-2", children: [
29412
+ /* @__PURE__ */ jsx24(Sparkles, { size: 14, className: "shrink-0", "aria-hidden": "true" }),
29413
+ /* @__PURE__ */ jsx24("span", { className: "shrink-0", children: "\u6A21\u578B" }),
29414
+ /* @__PURE__ */ jsx24(
29319
29415
  ModelSelector,
29320
29416
  {
29417
+ disabled: isModelLoading,
29321
29418
  value: selectedModel,
29322
29419
  onValueChange: model.selectModel,
29323
29420
  compact: true,
@@ -29325,8 +29422,8 @@ ${append2.text}` : append2.text;
29325
29422
  }
29326
29423
  )
29327
29424
  ] }) : null,
29328
- !lite && activeSessionId && actionMenuOpen ? /* @__PURE__ */ jsxs12("div", { className: "border-t border-[hsl(var(--border))] px-3 py-2.5", children: [
29329
- /* @__PURE__ */ jsx23(
29425
+ !lite && activeSessionId && actionMenuOpen ? /* @__PURE__ */ jsxs13("div", { className: "border-t border-[hsl(var(--border))] px-3 py-2.5", children: [
29426
+ /* @__PURE__ */ jsx24(
29330
29427
  SkillStatusBarComponent,
29331
29428
  {
29332
29429
  sessionId: activeSessionId,
@@ -29336,7 +29433,7 @@ ${append2.text}` : append2.text;
29336
29433
  innerClassName: skillStatusBarInnerClassName
29337
29434
  }
29338
29435
  ),
29339
- composerHint ? /* @__PURE__ */ jsx23("div", { className: "mt-2 border-t border-[hsl(var(--border))] pt-2 text-[hsl(var(--muted-foreground))]", children: composerHint }) : null
29436
+ composerHint ? /* @__PURE__ */ jsx24("div", { className: "mt-2 border-t border-[hsl(var(--border))] pt-2 text-[hsl(var(--muted-foreground))]", children: composerHint }) : null
29340
29437
  ] }) : null
29341
29438
  ]
29342
29439
  }
@@ -29344,7 +29441,7 @@ ${append2.text}` : append2.text;
29344
29441
  ]
29345
29442
  }
29346
29443
  ),
29347
- /* @__PURE__ */ jsx23(
29444
+ /* @__PURE__ */ jsx24(
29348
29445
  ConnectButton,
29349
29446
  {
29350
29447
  sessionId: activeSessionId,
@@ -29357,15 +29454,15 @@ ${append2.text}` : append2.text;
29357
29454
  }
29358
29455
  }
29359
29456
  ),
29360
- !lite && activeSessionId ? /* @__PURE__ */ jsx23(BackgroundTasksPill, { sessionId: activeSessionId }) : null
29457
+ !lite && activeSessionId ? /* @__PURE__ */ jsx24(BackgroundTasksPill, { sessionId: activeSessionId }) : null
29361
29458
  ] }),
29362
- /* @__PURE__ */ jsxs12("div", { className: "flex min-h-10 items-center gap-1.5", children: [
29363
- showQueueShortcut && /* @__PURE__ */ jsxs12("span", { className: "mr-1 text-[11px] text-[hsl(var(--muted-foreground))]", children: [
29459
+ /* @__PURE__ */ jsxs13("div", { className: "flex min-h-10 items-center gap-1.5", children: [
29460
+ showQueueShortcut && /* @__PURE__ */ jsxs13("span", { className: "mr-1 text-[11px] text-[hsl(var(--muted-foreground))]", children: [
29364
29461
  queueShortcutLabel(),
29365
29462
  " \xB7 \u6392\u961F\u6D88\u606F"
29366
29463
  ] }),
29367
29464
  slotBeforeSend,
29368
- !isStreaming && !isCompacting && asrEnabled && (isRecording || isVoiceStarting || !hasComposerContent) ? /* @__PURE__ */ jsx23(
29465
+ !isStreaming && !isCompacting && asrEnabled && (isRecording || isVoiceStarting || !hasComposerContent) ? /* @__PURE__ */ jsx24(
29369
29466
  "button",
29370
29467
  {
29371
29468
  type: "button",
@@ -29373,11 +29470,11 @@ ${append2.text}` : append2.text;
29373
29470
  "aria-label": isRecording || isVoiceStarting ? "\u505C\u6B62\u8BED\u97F3\u8F93\u5165" : "\u5F00\u59CB\u8BED\u97F3\u8F93\u5165",
29374
29471
  title: isVoiceStarting ? "\u6B63\u5728\u8FDE\u63A5\u8BED\u97F3\u8F93\u5165\uFF0C\u70B9\u51FB\u53D6\u6D88" : isRecording ? "\u505C\u6B62\u8BED\u97F3\u8F93\u5165" : "\u8BED\u97F3\u8F93\u5165",
29375
29472
  className: `flex items-center justify-center rounded-full transition-[width,height,background-color,color,box-shadow] duration-300 disabled:opacity-40 ${isRecording ? "h-10 w-10 bg-[hsl(var(--swf-success-soft))] text-[hsl(var(--swf-success))]" : "h-10 w-10 bg-[hsl(213_94%_60%/0.10)] text-[hsl(213_94%_45%)] hover:bg-[hsl(213_94%_60%/0.18)]"}`,
29376
- children: isVoiceStarting ? /* @__PURE__ */ jsx23(LoaderCircle, { size: 20, className: "animate-spin" }) : isRecording ? /* @__PURE__ */ jsx23(VoiceWaveform, { level: voiceLevel, size: 20 }) : /* @__PURE__ */ jsx23(Mic, { size: 20 })
29473
+ children: isVoiceStarting ? /* @__PURE__ */ jsx24(LoaderCircle, { size: 20, className: "animate-spin" }) : isRecording ? /* @__PURE__ */ jsx24(VoiceWaveform, { level: voiceLevel, size: 20 }) : /* @__PURE__ */ jsx24(Mic, { size: 20 })
29377
29474
  }
29378
29475
  ) : null,
29379
- isStreaming ? /* @__PURE__ */ jsxs12(Fragment5, { children: [
29380
- submitWhileRunning ? /* @__PURE__ */ jsx23(
29476
+ isStreaming ? /* @__PURE__ */ jsxs13(Fragment5, { children: [
29477
+ submitWhileRunning ? /* @__PURE__ */ jsx24(
29381
29478
  "button",
29382
29479
  {
29383
29480
  type: "button",
@@ -29386,10 +29483,10 @@ ${append2.text}` : append2.text;
29386
29483
  "aria-label": "\u53D1\u9001\u5F15\u5BFC\u6D88\u606F",
29387
29484
  title: "\u53D1\u9001\u5F15\u5BFC\u6D88\u606F",
29388
29485
  className: "flex h-10 w-10 items-center justify-center rounded-full bg-[hsl(213_94%_55%)] text-white disabled:opacity-25",
29389
- children: isSubmitting ? /* @__PURE__ */ jsx23(LoaderCircle, { size: 16, className: "animate-spin" }) : /* @__PURE__ */ jsx23(Send, { size: 16 })
29486
+ children: isSubmitting ? /* @__PURE__ */ jsx24(LoaderCircle, { size: 16, className: "animate-spin" }) : /* @__PURE__ */ jsx24(Send, { size: 16 })
29390
29487
  }
29391
29488
  ) : null,
29392
- /* @__PURE__ */ jsx23(
29489
+ /* @__PURE__ */ jsx24(
29393
29490
  "button",
29394
29491
  {
29395
29492
  type: "button",
@@ -29398,10 +29495,10 @@ ${append2.text}` : append2.text;
29398
29495
  "aria-label": isStopping ? "\u6B63\u5728\u505C\u6B62" : "\u505C\u6B62\u751F\u6210",
29399
29496
  title: isStopping ? "\u6B63\u5728\u505C\u6B62" : "\u505C\u6B62\u751F\u6210",
29400
29497
  className: "flex h-10 w-10 items-center justify-center rounded-full bg-[hsl(var(--destructive))] text-[hsl(var(--destructive-foreground))] transition-opacity hover:opacity-80 disabled:cursor-wait disabled:opacity-70",
29401
- children: isStopping ? /* @__PURE__ */ jsx23(LoaderCircle, { size: 16, className: "animate-spin" }) : /* @__PURE__ */ jsx23(Square, { size: 16 })
29498
+ children: isStopping ? /* @__PURE__ */ jsx24(LoaderCircle, { size: 16, className: "animate-spin" }) : /* @__PURE__ */ jsx24(Square, { size: 16 })
29402
29499
  }
29403
29500
  )
29404
- ] }) : isCompacting ? /* @__PURE__ */ jsx23(
29501
+ ] }) : isCompacting ? /* @__PURE__ */ jsx24(
29405
29502
  "button",
29406
29503
  {
29407
29504
  type: "button",
@@ -29409,9 +29506,9 @@ ${append2.text}` : append2.text;
29409
29506
  "aria-label": developer ? "\u6B63\u5728\u6574\u7406\u5BF9\u8BDD" : "\u6B63\u5728\u5904\u7406",
29410
29507
  title: developer ? "\u6B63\u5728\u6574\u7406\u5BF9\u8BDD" : "\u6B63\u5728\u5904\u7406",
29411
29508
  className: "flex h-10 w-10 items-center justify-center rounded-full bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))] opacity-50",
29412
- children: /* @__PURE__ */ jsx23(LoaderCircle, { size: 16, className: "animate-spin" })
29509
+ children: /* @__PURE__ */ jsx24(LoaderCircle, { size: 16, className: "animate-spin" })
29413
29510
  }
29414
- ) : !isRecording && hasComposerContent ? /* @__PURE__ */ jsx23(
29511
+ ) : !isRecording && hasComposerContent ? /* @__PURE__ */ jsx24(
29415
29512
  "button",
29416
29513
  {
29417
29514
  type: "button",
@@ -29420,19 +29517,19 @@ ${append2.text}` : append2.text;
29420
29517
  "aria-label": "\u53D1\u9001\u5F15\u5BFC\u6D88\u606F",
29421
29518
  title: isModelLoading ? "\u6B63\u5728\u52A0\u8F7D\u6A21\u578B\u914D\u7F6E" : !hasAvailableModel ? modelAvailabilityMessage : "\u53D1\u9001\u5F15\u5BFC\u6D88\u606F",
29422
29519
  className: "flex h-10 w-10 items-center justify-center rounded-full bg-[hsl(213_94%_55%)] text-white transition-colors duration-[120ms] ease-out hover:bg-[hsl(213_94%_48%)] disabled:opacity-25",
29423
- children: isSubmitting ? /* @__PURE__ */ jsx23(LoaderCircle, { size: 16, className: "animate-spin" }) : /* @__PURE__ */ jsx23(Send, { size: 16 })
29520
+ children: isSubmitting ? /* @__PURE__ */ jsx24(LoaderCircle, { size: 16, className: "animate-spin" }) : /* @__PURE__ */ jsx24(Send, { size: 16 })
29424
29521
  }
29425
29522
  ) : null
29426
29523
  ] })
29427
29524
  ] }),
29428
- slotBelowActions ? /* @__PURE__ */ jsx23("div", { className: "border-t border-[hsl(var(--border))] px-4 py-1.5", children: slotBelowActions }) : null
29525
+ slotBelowActions ? /* @__PURE__ */ jsx24("div", { className: "border-t border-[hsl(var(--border))] px-4 py-1.5", children: slotBelowActions }) : null
29429
29526
  ]
29430
29527
  }
29431
29528
  )
29432
29529
  }
29433
29530
  )
29434
29531
  ] }) }),
29435
- /* @__PURE__ */ jsx23(
29532
+ /* @__PURE__ */ jsx24(
29436
29533
  FileSizeLimitDialog,
29437
29534
  {
29438
29535
  open: oversizedFiles.length > 0,
@@ -29447,6 +29544,42 @@ ${append2.text}` : append2.text;
29447
29544
  )
29448
29545
  ] });
29449
29546
  }
29547
+
29548
+ // src/rich-input/SkillActionMenu.tsx
29549
+ import { useEffect as useEffect9, useState as useState12 } from "react";
29550
+ import { Fragment as Fragment6, jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
29551
+ function SkillActionMenu({ open, onOpenChange, renderMode, onSelect, onManage, disabled }) {
29552
+ return /* @__PURE__ */ jsx25(InputActionSubmenu, { label: "\u6280\u80FD", icon: /* @__PURE__ */ jsx25(Sparkles, { size: 16, "aria-hidden": "true" }), open, onOpenChange, disabled, children: /* @__PURE__ */ jsx25(SkillPicker, { renderMode, onSelect, onManage }) });
29553
+ }
29554
+ function SkillPicker({ renderMode, onSelect, onManage }) {
29555
+ const client = useBladeClient();
29556
+ const [query, setQuery] = useState12("");
29557
+ const [skills, setSkills] = useState12(null);
29558
+ useEffect9(() => {
29559
+ let active = true;
29560
+ setSkills(null);
29561
+ getSlashSuggestions(query, { client, sessionId: null, renderMode }).then((items) => {
29562
+ if (active) setSkills(items);
29563
+ }).catch(() => {
29564
+ if (active) setSkills([]);
29565
+ });
29566
+ return () => {
29567
+ active = false;
29568
+ };
29569
+ }, [client, renderMode, query]);
29570
+ return /* @__PURE__ */ jsxs14(Fragment6, { children: [
29571
+ /* @__PURE__ */ jsxs14("label", { className: "m-1 flex items-center gap-2 rounded-lg bg-[hsl(var(--muted))] px-3 py-2", children: [
29572
+ /* @__PURE__ */ jsx25(Search, { size: 14, "aria-hidden": "true" }),
29573
+ /* @__PURE__ */ jsx25("input", { "aria-label": "\u641C\u7D22\u6280\u80FD", placeholder: "\u641C\u7D22\u6280\u80FD", value: query, onChange: (event) => setQuery(event.target.value), className: "min-w-0 flex-1 bg-transparent outline-none" })
29574
+ ] }),
29575
+ /* @__PURE__ */ jsx25("div", { className: "max-h-60 overflow-y-auto", children: skills === null ? /* @__PURE__ */ jsx25("p", { className: "px-3 py-2 text-[hsl(var(--muted-foreground))]", children: "\u52A0\u8F7D\u6280\u80FD\u4E2D\u2026" }) : skills.length ? skills.map((skill) => skill.type === "skill" ? /* @__PURE__ */ jsxs14("button", { type: "button", onClick: () => onSelect(skill), className: "flex w-full flex-col gap-1 rounded-lg px-3 py-2 text-left hover:bg-[hsl(var(--accent))] focus-visible:bg-[hsl(var(--accent))]", children: [
29576
+ /* @__PURE__ */ jsx25("span", { children: skillDisplayName(skill) }),
29577
+ /* @__PURE__ */ jsx25("span", { className: "line-clamp-2 text-[11px] text-[hsl(var(--muted-foreground))]", children: skill.description })
29578
+ ] }, skill.skillId) : null) : /* @__PURE__ */ jsx25("p", { className: "px-3 py-2 text-[hsl(var(--muted-foreground))]", children: "\u6CA1\u6709\u5339\u914D\u7684\u6280\u80FD" }) }),
29579
+ /* @__PURE__ */ jsx25("div", { className: "my-1 border-t border-[hsl(var(--border))]" }),
29580
+ /* @__PURE__ */ jsx25("button", { type: "button", onClick: onManage, className: "w-full rounded-lg px-3 py-2 text-left hover:bg-[hsl(var(--accent))]", children: "\u7BA1\u7406\u6280\u80FD \u2192" })
29581
+ ] });
29582
+ }
29450
29583
  export {
29451
29584
  ATTACHMENT_SIZE_LIMIT_BYTES,
29452
29585
  ATTENTION_STATUSES,
@@ -29458,6 +29591,7 @@ export {
29458
29591
  FileMention,
29459
29592
  FileSizeLimitDialog,
29460
29593
  IMAGE_INPUT_UNSUPPORTED_MESSAGE,
29594
+ InputActionSubmenu,
29461
29595
  LIVE_STATUSES,
29462
29596
  MODEL_LOADING_SEND_HINT,
29463
29597
  MODEL_REASONING_LEVELS_KEY,
@@ -29470,6 +29604,7 @@ export {
29470
29604
  RichInputServicesProvider,
29471
29605
  STATUS_LABELS,
29472
29606
  STOPPABLE_STATUSES,
29607
+ SkillActionMenu,
29473
29608
  SkillCompletionMenu,
29474
29609
  SkillMention,
29475
29610
  SkillStatusBar,