@blade-hq/agent-react 2612.0.0-beta.97 → 2612.0.0-beta.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/McpAppCard-ADVDKC2C.js +171 -0
- package/dist/McpAppCard-ADVDKC2C.js.map +1 -0
- package/dist/McpAppFrame-VEOUJL5E.js +9 -0
- package/dist/PlanGraph-3D5PCSIJ.js +189 -0
- package/dist/PlanGraph-3D5PCSIJ.js.map +1 -0
- package/dist/{chunk-FTBMG7TK.js → SessionPluginConfigForm-DWVDFK6A.js} +2 -3
- package/dist/chat/AskUserQuestionBlock.d.ts +2 -1
- package/dist/chat/ChatPanel.d.ts +3 -1
- package/dist/chat/CurrentPlanPanel.d.ts +2 -1
- package/dist/chat/LightComposer.d.ts +1 -1
- package/dist/chat/LiteMessageList.d.ts +9 -0
- package/dist/chat/RelatedWork.d.ts +24 -0
- package/dist/chat/index.d.ts +1 -0
- package/dist/chat/plan/PlanGraph.d.ts +26 -0
- package/dist/chat/plan/PlanSurface.d.ts +9 -0
- package/dist/chat/plan/presentation.d.ts +18 -0
- package/dist/chat/runtime/actions.d.ts +1 -0
- package/dist/chat/runtime/environment.d.ts +5 -0
- package/dist/chat/runtime/session-source.d.ts +2 -0
- package/dist/chat.css +181 -0
- package/dist/{chunk-CJQINCIP.js → chunk-3RFYXI6V.js} +51 -71
- package/dist/chunk-3RFYXI6V.js.map +1 -0
- package/dist/chunk-5JAFIDDP.js +1386 -0
- package/dist/chunk-5JAFIDDP.js.map +1 -0
- package/dist/{chunk-RULD2XDA.js → chunk-67JW6ASD.js} +1561 -1199
- package/dist/chunk-67JW6ASD.js.map +1 -0
- package/dist/chunk-7WR2KG5O.js +50 -0
- package/dist/chunk-7WR2KG5O.js.map +1 -0
- package/dist/chunk-FR3ON5R4.js +30 -0
- package/dist/chunk-FR3ON5R4.js.map +1 -0
- package/dist/chunk-GRUDJLWG.js +8 -0
- package/dist/chunk-GRUDJLWG.js.map +1 -0
- package/dist/{chunk-EM7X2QZ2.js → chunk-GZHQQXYI.js} +19 -16
- package/dist/chunk-GZHQQXYI.js.map +1 -0
- package/dist/{chunk-RHUJ77ZZ.js → chunk-IOIKCFRO.js} +36 -1566
- package/dist/chunk-IOIKCFRO.js.map +1 -0
- package/dist/{chunk-IOKIQSWP.js → chunk-J6BSKVVK.js} +37 -19
- package/dist/chunk-J6BSKVVK.js.map +1 -0
- package/dist/{chunk-4VBPNAAT.js → chunk-MG4RF573.js} +33 -15
- package/dist/chunk-MG4RF573.js.map +1 -0
- package/dist/{chunk-KJDDAZZY.js → chunk-SVCTJ4VS.js} +145 -25
- package/dist/chunk-SVCTJ4VS.js.map +1 -0
- package/dist/{chunk-FXTAY3LE.js → chunk-WEOW475M.js} +17 -17
- package/dist/{chunk-FXTAY3LE.js.map → chunk-WEOW475M.js.map} +1 -1
- package/dist/{chunk-6Z7T6BOB.js → chunk-YBTELD7P.js} +7 -5
- package/dist/{chunk-6Z7T6BOB.js.map → chunk-YBTELD7P.js.map} +1 -1
- package/dist/components/AgentChat.d.ts +3 -0
- package/dist/components/McpAppCard.d.ts +1 -7
- package/dist/components/ReplayBar.d.ts +7 -1
- package/dist/components/lazy-mcp-app-card.d.ts +1 -0
- package/dist/components/lazy-mcp-app-frame.d.ts +1 -0
- package/dist/components/lazy-session-plugin-config-form.d.ts +1 -0
- package/dist/components/mcp-app-context.d.ts +7 -0
- package/dist/connectors.js +3 -3
- package/dist/embed/entry.d.ts +4 -0
- package/dist/embed/load-plan-graph.d.ts +2 -0
- package/dist/embed/plan-graph-chunk.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +14 -9
- package/dist/internal.d.ts +4 -4
- package/dist/internal.js +29 -17
- package/dist/internal.js.map +1 -1
- package/dist/questions.js +5 -4
- package/dist/questions.js.map +1 -1
- package/dist/rich-input/ChatInput.d.ts +3 -1
- package/dist/rich-input/ComposerControls.d.ts +21 -0
- package/dist/rich-input/index.d.ts +1 -0
- package/dist/rich-input/model/resolve-model.d.ts +8 -2
- package/dist/rich-input.js +341 -267
- package/dist/rich-input.js.map +1 -1
- package/dist/style.full.css +182 -1
- package/dist/tool-details.js +6 -5
- package/dist/tool-details.js.map +1 -1
- package/package.json +2 -2
- package/public-api.md +31 -2
- package/dist/SessionPluginConfigForm-DWLJEYBY.js +0 -9
- package/dist/chunk-4VBPNAAT.js.map +0 -1
- package/dist/chunk-CJQINCIP.js.map +0 -1
- package/dist/chunk-EM7X2QZ2.js.map +0 -1
- package/dist/chunk-IOKIQSWP.js.map +0 -1
- package/dist/chunk-KJDDAZZY.js.map +0 -1
- package/dist/chunk-RHUJ77ZZ.js.map +0 -1
- package/dist/chunk-RULD2XDA.js.map +0 -1
- /package/dist/{SessionPluginConfigForm-DWLJEYBY.js.map → McpAppFrame-VEOUJL5E.js.map} +0 -0
- /package/dist/{chunk-FTBMG7TK.js.map → SessionPluginConfigForm-DWVDFK6A.js.map} +0 -0
package/dist/rich-input.js
CHANGED
|
@@ -9,8 +9,9 @@ import {
|
|
|
9
9
|
useComposerChannels,
|
|
10
10
|
useDismissedBackgroundTasks,
|
|
11
11
|
visibleSkills
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-GZHQQXYI.js";
|
|
13
13
|
import {
|
|
14
|
+
BackgroundLogDialog,
|
|
14
15
|
MODEL_REASONING_LEVELS_KEY,
|
|
15
16
|
PREFERRED_MODEL_KEY,
|
|
16
17
|
RichInputServicesProvider,
|
|
@@ -46,12 +47,11 @@ import {
|
|
|
46
47
|
useSessionDataInvalidation,
|
|
47
48
|
useSessionSkills,
|
|
48
49
|
useSkillStats
|
|
49
|
-
} from "./chunk-
|
|
50
|
-
import "./chunk-
|
|
50
|
+
} from "./chunk-SVCTJ4VS.js";
|
|
51
|
+
import "./chunk-MG4RF573.js";
|
|
51
52
|
import {
|
|
52
53
|
cn,
|
|
53
54
|
notifyChat,
|
|
54
|
-
useBladeClient,
|
|
55
55
|
useChatEnvironment,
|
|
56
56
|
useChatRenderMode,
|
|
57
57
|
useChatSessionDetail,
|
|
@@ -59,7 +59,10 @@ import {
|
|
|
59
59
|
useSessionHandle,
|
|
60
60
|
useSessionSource,
|
|
61
61
|
useSessionState
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-3RFYXI6V.js";
|
|
63
|
+
import {
|
|
64
|
+
useBladeClient
|
|
65
|
+
} from "./chunk-FR3ON5R4.js";
|
|
63
66
|
import {
|
|
64
67
|
Dialog,
|
|
65
68
|
DialogClose,
|
|
@@ -68,8 +71,7 @@ import {
|
|
|
68
71
|
cn as cn2,
|
|
69
72
|
dist_exports4 as dist_exports,
|
|
70
73
|
usePortalContainer
|
|
71
|
-
} from "./chunk-
|
|
72
|
-
import "./chunk-FTBMG7TK.js";
|
|
74
|
+
} from "./chunk-WEOW475M.js";
|
|
73
75
|
import {
|
|
74
76
|
Archive,
|
|
75
77
|
ArrowUp,
|
|
@@ -78,6 +80,7 @@ import {
|
|
|
78
80
|
Check,
|
|
79
81
|
ChevronDown,
|
|
80
82
|
ChevronRight,
|
|
83
|
+
Ellipsis,
|
|
81
84
|
EyeOff,
|
|
82
85
|
File,
|
|
83
86
|
FileCode2,
|
|
@@ -102,7 +105,7 @@ import {
|
|
|
102
105
|
Square,
|
|
103
106
|
Terminal,
|
|
104
107
|
X
|
|
105
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-J6BSKVVK.js";
|
|
106
109
|
import {
|
|
107
110
|
__commonJS,
|
|
108
111
|
__require,
|
|
@@ -394,14 +397,12 @@ function TaskCard({
|
|
|
394
397
|
] });
|
|
395
398
|
}
|
|
396
399
|
function BackgroundTasksPill({ sessionId }) {
|
|
397
|
-
const client = useBladeClient();
|
|
398
400
|
const session = useSessionHandle(sessionId);
|
|
399
401
|
const { data: tasks = NO_TASKS } = useBackgroundTaskList(sessionId);
|
|
400
402
|
const dismissed = useDismissedBackgroundTasks(sessionId);
|
|
401
403
|
const [open, setOpen] = useState(false);
|
|
402
404
|
const [historyOverride, setHistoryOverride] = useState(null);
|
|
403
405
|
const [logTask, setLogTask] = useState(null);
|
|
404
|
-
const [logDialogOpen, setLogDialogOpen] = useState(false);
|
|
405
406
|
const { activeTasks, historyTasks, runningCount, attentionCount } = useMemo(
|
|
406
407
|
() => splitTasks(tasks, dismissed),
|
|
407
408
|
[tasks, dismissed]
|
|
@@ -417,29 +418,7 @@ function BackgroundTasksPill({ sessionId }) {
|
|
|
417
418
|
backgroundTaskDismissals.dismiss(sessionId, taskId);
|
|
418
419
|
setHistoryOverride(false);
|
|
419
420
|
};
|
|
420
|
-
const openTaskLog =
|
|
421
|
-
const title = `${task.id} ${task.description || task.command || "\u540E\u53F0\u4EFB\u52A1"}`;
|
|
422
|
-
setLogTask({ id: task.id, title, output: "", loading: true, error: null });
|
|
423
|
-
setLogDialogOpen(true);
|
|
424
|
-
try {
|
|
425
|
-
const detail = await client.sessions.getBackgroundTask(sessionId, task.id, 300);
|
|
426
|
-
setLogTask({
|
|
427
|
-
id: task.id,
|
|
428
|
-
title,
|
|
429
|
-
output: detail.output || "\u6682\u65E0\u8F93\u51FA",
|
|
430
|
-
loading: false,
|
|
431
|
-
error: null
|
|
432
|
-
});
|
|
433
|
-
} catch {
|
|
434
|
-
setLogTask({
|
|
435
|
-
id: task.id,
|
|
436
|
-
title,
|
|
437
|
-
output: "",
|
|
438
|
-
loading: false,
|
|
439
|
-
error: "\u65E5\u5FD7\u5DF2\u65E0\u6CD5\u8BFB\u53D6\uFF0C\u53EF\u80FD\u5DF2\u88AB\u6E05\u7406"
|
|
440
|
-
});
|
|
441
|
-
}
|
|
442
|
-
};
|
|
421
|
+
const openTaskLog = setLogTask;
|
|
443
422
|
const requestStopTask = (task) => {
|
|
444
423
|
const name = `${task.id}\uFF08${task.description || task.command || "\u540E\u53F0\u4EFB\u52A1"}\uFF09`;
|
|
445
424
|
if (session) {
|
|
@@ -448,39 +427,15 @@ function BackgroundTasksPill({ sessionId }) {
|
|
|
448
427
|
closePanel();
|
|
449
428
|
};
|
|
450
429
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
451
|
-
/* @__PURE__ */ jsx(
|
|
452
|
-
|
|
430
|
+
logTask && /* @__PURE__ */ jsx(
|
|
431
|
+
BackgroundLogDialog,
|
|
453
432
|
{
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
{
|
|
461
|
-
showCloseButton: false,
|
|
462
|
-
className: "flex max-h-[82vh] w-full max-w-3xl flex-col gap-0 overflow-hidden p-0",
|
|
463
|
-
children: [
|
|
464
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3 border-b border-[hsl(var(--border))] px-4 py-3", children: [
|
|
465
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
466
|
-
/* @__PURE__ */ jsx(DialogTitle, { className: "truncate text-sm font-medium text-[hsl(var(--foreground))]", children: logTask?.title }),
|
|
467
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: "\u540E\u53F0\u4EFB\u52A1\u65E5\u5FD7" })
|
|
468
|
-
] }),
|
|
469
|
-
/* @__PURE__ */ jsx(
|
|
470
|
-
"button",
|
|
471
|
-
{
|
|
472
|
-
type: "button",
|
|
473
|
-
onClick: () => setLogDialogOpen(false),
|
|
474
|
-
className: "rounded-md border border-[hsl(var(--border))] px-2.5 py-1 text-xs text-[hsl(var(--foreground))] hover:bg-[hsl(var(--accent))]",
|
|
475
|
-
children: "\u5173\u95ED"
|
|
476
|
-
}
|
|
477
|
-
)
|
|
478
|
-
] }),
|
|
479
|
-
/* @__PURE__ */ jsx("pre", { className: "min-h-64 flex-1 overflow-auto whitespace-pre-wrap p-4 font-mono text-xs leading-5 text-[hsl(var(--foreground))]", children: logTask?.loading ? "\u52A0\u8F7D\u4E2D..." : logTask?.error || logTask?.output })
|
|
480
|
-
]
|
|
481
|
-
}
|
|
482
|
-
)
|
|
483
|
-
}
|
|
433
|
+
sessionId,
|
|
434
|
+
taskId: logTask.id,
|
|
435
|
+
title: logTask.description || "\u540E\u53F0\u4EFB\u52A1\u65E5\u5FD7",
|
|
436
|
+
onClose: () => setLogTask(null)
|
|
437
|
+
},
|
|
438
|
+
logTask.id
|
|
484
439
|
),
|
|
485
440
|
/* @__PURE__ */ jsxs(
|
|
486
441
|
"div",
|
|
@@ -568,6 +523,44 @@ function BackgroundTasksPill({ sessionId }) {
|
|
|
568
523
|
] });
|
|
569
524
|
}
|
|
570
525
|
|
|
526
|
+
// src/rich-input/ChatInput.tsx
|
|
527
|
+
import { BladeApiError } from "@blade-hq/agent-client";
|
|
528
|
+
|
|
529
|
+
// src/rich-input/ComposerControls.tsx
|
|
530
|
+
import { useState as useState2 } from "react";
|
|
531
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
532
|
+
var originalOrder = ["upload", "reference", "voice", "model", "mode", "workspace"];
|
|
533
|
+
function hasCustomComposerPlacement(placement) {
|
|
534
|
+
return Boolean(placement && (placement.more.length || placement.direct.length !== originalOrder.length || placement.direct.some((id, index) => id !== originalOrder[index])));
|
|
535
|
+
}
|
|
536
|
+
function ComposerControlMenu({ label, icon, children }) {
|
|
537
|
+
return /* @__PURE__ */ jsxs2(dist_exports.Root, { children: [
|
|
538
|
+
/* @__PURE__ */ jsx2(dist_exports.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs2("button", { type: "button", "aria-label": label, title: label, className: "inline-flex h-8 shrink-0 items-center gap-1 rounded-full px-2 text-xs text-[hsl(var(--muted-foreground))] hover:bg-[hsl(var(--accent))]", children: [
|
|
539
|
+
icon,
|
|
540
|
+
/* @__PURE__ */ jsx2("span", { "data-composer-label": true, className: "hidden sm:inline", children: label })
|
|
541
|
+
] }) }),
|
|
542
|
+
/* @__PURE__ */ jsx2(dist_exports.Portal, { children: /* @__PURE__ */ jsx2(dist_exports.Content, { side: "top", align: "start", sideOffset: 8, collisionPadding: 12, className: "z-50 max-h-[70vh] w-[min(300px,calc(100vw-2rem))] overflow-y-auto rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--popover))] p-2 text-[hsl(var(--popover-foreground))] shadow-lg", children }) })
|
|
543
|
+
] });
|
|
544
|
+
}
|
|
545
|
+
function ComposerControls({ placement, controls, moreContent, children }) {
|
|
546
|
+
const [open, setOpen] = useState2(false);
|
|
547
|
+
if (!hasCustomComposerPlacement(placement)) return children;
|
|
548
|
+
const more = placement.more.filter((id) => controls[id]);
|
|
549
|
+
return /* @__PURE__ */ jsxs2("div", { className: "flex min-w-0 flex-wrap items-center gap-1", "aria-label": "\u8F93\u5165\u9009\u9879", children: [
|
|
550
|
+
placement.direct.filter((id) => controls[id]).map((id) => /* @__PURE__ */ jsx2("div", { "data-composer-control": id, children: controls[id] }, id)),
|
|
551
|
+
more.length || moreContent ? /* @__PURE__ */ jsxs2(dist_exports.Root, { open, onOpenChange: setOpen, children: [
|
|
552
|
+
/* @__PURE__ */ jsx2(dist_exports.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs2("button", { type: "button", "aria-label": "\u66F4\u591A", title: "\u66F4\u591A", className: "inline-flex h-8 items-center gap-1 rounded-full px-2 text-xs text-[hsl(var(--muted-foreground))] hover:bg-[hsl(var(--accent))]", children: [
|
|
553
|
+
/* @__PURE__ */ jsx2(Ellipsis, { size: 17 }),
|
|
554
|
+
/* @__PURE__ */ jsx2("span", { className: "hidden sm:inline", children: "\u66F4\u591A" })
|
|
555
|
+
] }) }),
|
|
556
|
+
/* @__PURE__ */ jsx2(dist_exports.Portal, { children: /* @__PURE__ */ jsxs2(dist_exports.Content, { side: "top", align: "start", sideOffset: 8, collisionPadding: 12, className: "z-40 max-h-[70vh] w-[min(320px,calc(100vw-2rem))] overflow-y-auto rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--popover))] p-2 text-[hsl(var(--popover-foreground))] shadow-lg [&_[data-composer-label]]:inline", children: [
|
|
557
|
+
more.map((id) => /* @__PURE__ */ jsx2("div", { "data-composer-control": id, children: controls[id] }, id)),
|
|
558
|
+
moreContent
|
|
559
|
+
] }) })
|
|
560
|
+
] }) : null
|
|
561
|
+
] });
|
|
562
|
+
}
|
|
563
|
+
|
|
571
564
|
// ../../node_modules/.pnpm/orderedmap@2.1.1/node_modules/orderedmap/dist/index.js
|
|
572
565
|
function OrderedMap(content) {
|
|
573
566
|
this.content = content;
|
|
@@ -18910,9 +18903,9 @@ var import_shim = __toESM(require_shim(), 1);
|
|
|
18910
18903
|
import { createContext, useContext, useMemo as useMemo2 } from "react";
|
|
18911
18904
|
import React, { forwardRef } from "react";
|
|
18912
18905
|
import ReactDOM from "react-dom";
|
|
18913
|
-
import { Fragment as Fragment3, jsx as
|
|
18906
|
+
import { Fragment as Fragment3, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
18914
18907
|
var import_shim2 = __toESM(require_shim(), 1);
|
|
18915
|
-
import { useDebugValue as useDebugValue2, useEffect as useEffect2, useRef as useRef2, useState as
|
|
18908
|
+
import { useDebugValue as useDebugValue2, useEffect as useEffect2, useRef as useRef2, useState as useState22 } from "react";
|
|
18916
18909
|
|
|
18917
18910
|
// ../../node_modules/.pnpm/fast-equals@5.4.0/node_modules/fast-equals/dist/es/index.mjs
|
|
18918
18911
|
var { getOwnPropertyNames, getOwnPropertySymbols } = Object;
|
|
@@ -19357,7 +19350,7 @@ var import_with_selector = __toESM(require_with_selector(), 1);
|
|
|
19357
19350
|
import { useDebugValue, useEffect as useEffect3, useLayoutEffect, useState as useState3 } from "react";
|
|
19358
19351
|
import { jsx as jsx22, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
19359
19352
|
import { createContext as createContext2, createElement, useContext as useContext2 } from "react";
|
|
19360
|
-
import { jsx as
|
|
19353
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
19361
19354
|
import React3 from "react";
|
|
19362
19355
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
19363
19356
|
import React4 from "react";
|
|
@@ -19387,7 +19380,7 @@ var Portals = ({ contentComponent }) => {
|
|
|
19387
19380
|
contentComponent.getSnapshot,
|
|
19388
19381
|
contentComponent.getServerSnapshot
|
|
19389
19382
|
);
|
|
19390
|
-
return /* @__PURE__ */
|
|
19383
|
+
return /* @__PURE__ */ jsx3(Fragment3, { children: Object.values(renderers) });
|
|
19391
19384
|
};
|
|
19392
19385
|
function getInstance() {
|
|
19393
19386
|
const subscribers = /* @__PURE__ */ new Set();
|
|
@@ -19507,9 +19500,9 @@ var PureEditorContent = class extends React.Component {
|
|
|
19507
19500
|
}
|
|
19508
19501
|
render() {
|
|
19509
19502
|
const { editor, innerRef, ...rest } = this.props;
|
|
19510
|
-
return /* @__PURE__ */
|
|
19511
|
-
/* @__PURE__ */
|
|
19512
|
-
(editor == null ? void 0 : editor.contentComponent) && /* @__PURE__ */
|
|
19503
|
+
return /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
19504
|
+
/* @__PURE__ */ jsx3("div", { ref: mergeRefs(innerRef, this.editorContentRef), ...rest }),
|
|
19505
|
+
(editor == null ? void 0 : editor.contentComponent) && /* @__PURE__ */ jsx3(Portals, { contentComponent: editor.contentComponent })
|
|
19513
19506
|
] });
|
|
19514
19507
|
}
|
|
19515
19508
|
};
|
|
@@ -19836,7 +19829,7 @@ var EditorInstanceManager = class _EditorInstanceManager {
|
|
|
19836
19829
|
function useEditor(options = {}, deps = []) {
|
|
19837
19830
|
const mostRecentOptions = useRef2(options);
|
|
19838
19831
|
mostRecentOptions.current = options;
|
|
19839
|
-
const [instanceManager] =
|
|
19832
|
+
const [instanceManager] = useState22(() => new EditorInstanceManager(mostRecentOptions));
|
|
19840
19833
|
const editor = (0, import_shim2.useSyncExternalStore)(
|
|
19841
19834
|
instanceManager.subscribe,
|
|
19842
19835
|
instanceManager.getEditor,
|
|
@@ -25091,7 +25084,8 @@ function resolveModelChoice({
|
|
|
25091
25084
|
preferredModel,
|
|
25092
25085
|
defaultModel,
|
|
25093
25086
|
models,
|
|
25094
|
-
isLoading
|
|
25087
|
+
isLoading,
|
|
25088
|
+
fallbackFromUnavailablePreference = false
|
|
25095
25089
|
}) {
|
|
25096
25090
|
if (isLoading) {
|
|
25097
25091
|
const optimistic = activeSessionModel || preferredModel || defaultModel || "";
|
|
@@ -25109,7 +25103,7 @@ function resolveModelChoice({
|
|
|
25109
25103
|
if (inList(preferredModel)) {
|
|
25110
25104
|
return { resolvedModel: preferredModel, hasAvailableModel: true, isLoading };
|
|
25111
25105
|
}
|
|
25112
|
-
if (preferredModel) {
|
|
25106
|
+
if (preferredModel && !fallbackFromUnavailablePreference) {
|
|
25113
25107
|
return { resolvedModel: preferredModel, hasAvailableModel: false, isLoading };
|
|
25114
25108
|
}
|
|
25115
25109
|
if (inList(defaultModel)) {
|
|
@@ -25120,7 +25114,7 @@ function resolveModelChoice({
|
|
|
25120
25114
|
}
|
|
25121
25115
|
return { resolvedModel: "", hasAvailableModel: false, isLoading };
|
|
25122
25116
|
}
|
|
25123
|
-
function useResolvedModel(activeSessionModel) {
|
|
25117
|
+
function useResolvedModel(activeSessionModel, fallbackFromUnavailablePreference = false) {
|
|
25124
25118
|
const { models, defaultModel, thinkingAvailable, isLoading, unavailableProviderIds, unavailableModelIds } = useModelCatalog();
|
|
25125
25119
|
const { preferredModel } = useModelPreferences();
|
|
25126
25120
|
const resolved = useMemo3(() => {
|
|
@@ -25130,13 +25124,18 @@ function useResolvedModel(activeSessionModel) {
|
|
|
25130
25124
|
defaultModel,
|
|
25131
25125
|
models,
|
|
25132
25126
|
isLoading,
|
|
25127
|
+
fallbackFromUnavailablePreference,
|
|
25133
25128
|
unavailableProviderIds,
|
|
25134
25129
|
unavailableModelIds
|
|
25135
25130
|
});
|
|
25136
|
-
}, [activeSessionModel, preferredModel, defaultModel, models, isLoading, unavailableProviderIds, unavailableModelIds]);
|
|
25131
|
+
}, [activeSessionModel, preferredModel, defaultModel, models, isLoading, fallbackFromUnavailablePreference, unavailableProviderIds, unavailableModelIds]);
|
|
25137
25132
|
const selectedThinkingAvailable = models.find((model) => model.id === resolved.resolvedModel)?.thinkingAvailable ?? thinkingAvailable;
|
|
25138
25133
|
const selectedModel = models.find((model) => model.id === resolved.resolvedModel);
|
|
25139
|
-
const
|
|
25134
|
+
const modelId = resolved.resolvedModel;
|
|
25135
|
+
const selectedProviderUnavailable = !modelId ? !!unavailableProviderIds?.length : !!unavailableProviderIds?.includes(
|
|
25136
|
+
modelId.includes("::") ? modelId.split("::", 1)[0] : "default"
|
|
25137
|
+
);
|
|
25138
|
+
const modelAvailabilityMessage = resolved.hasAvailableModel ? "" : selectedProviderUnavailable ? "\u6A21\u578B\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u6216\u91CD\u65B0\u9009\u62E9\u6A21\u578B" : activeSessionModel || preferredModel ? "\u5DF2\u9009\u6A21\u578B\u5F53\u524D\u4E0D\u53EF\u7528\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6A21\u578B" : "\u6CA1\u6709\u53EF\u7528\u4E8E\u6587\u672C\u5BF9\u8BDD\u7684\u6A21\u578B\uFF0C\u8BF7\u68C0\u67E5\u6A21\u578B\u670D\u52A1\u914D\u7F6E";
|
|
25140
25139
|
return {
|
|
25141
25140
|
...resolved,
|
|
25142
25141
|
thinkingAvailable: selectedThinkingAvailable,
|
|
@@ -25293,7 +25292,7 @@ function PopoverContent({
|
|
|
25293
25292
|
|
|
25294
25293
|
// src/rich-input/ModelSelector.tsx
|
|
25295
25294
|
import { useEffect as useEffect6, useMemo as useMemo4, useState as useState5 } from "react";
|
|
25296
|
-
import { Fragment as Fragment4, jsx as jsx12, jsxs as
|
|
25295
|
+
import { Fragment as Fragment4, jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
25297
25296
|
var inputModalityLabels = {
|
|
25298
25297
|
text: "\u6587\u672C",
|
|
25299
25298
|
image: "\u56FE\u7247",
|
|
@@ -25327,14 +25326,18 @@ function ModelCatalogPopoverBody({
|
|
|
25327
25326
|
}, []);
|
|
25328
25327
|
const filteredModels = useMemo4(() => {
|
|
25329
25328
|
const normalized = query.trim().toLowerCase();
|
|
25330
|
-
|
|
25331
|
-
|
|
25329
|
+
const matches2 = models.filter((model) => {
|
|
25330
|
+
if (!normalized) return true;
|
|
25332
25331
|
const inputLabel = formatInputModalities(model).toLowerCase();
|
|
25333
25332
|
return model.id.toLowerCase().includes(normalized) || model.label.toLowerCase().includes(normalized) || inputLabel.includes(normalized);
|
|
25334
25333
|
});
|
|
25334
|
+
return [
|
|
25335
|
+
...matches2.filter((model) => model.personal === true),
|
|
25336
|
+
...matches2.filter((model) => model.personal !== true)
|
|
25337
|
+
];
|
|
25335
25338
|
}, [models, query]);
|
|
25336
|
-
return /* @__PURE__ */
|
|
25337
|
-
/* @__PURE__ */
|
|
25339
|
+
return /* @__PURE__ */ jsxs4(Fragment4, { children: [
|
|
25340
|
+
/* @__PURE__ */ jsxs4("div", { className: "border-b border-border p-2", children: [
|
|
25338
25341
|
/* @__PURE__ */ jsx12(
|
|
25339
25342
|
"input",
|
|
25340
25343
|
{
|
|
@@ -25351,12 +25354,12 @@ function ModelCatalogPopoverBody({
|
|
|
25351
25354
|
{
|
|
25352
25355
|
className: "overflow-y-auto p-1",
|
|
25353
25356
|
style: { maxHeight: "min(220px, max(0px, calc(var(--radix-popover-content-available-height) - 49px)))" },
|
|
25354
|
-
children: isFetching ? /* @__PURE__ */
|
|
25357
|
+
children: isFetching ? /* @__PURE__ */ jsxs4("output", { className: "flex items-center justify-center gap-2 px-3 py-6 text-xs text-muted-foreground", children: [
|
|
25355
25358
|
/* @__PURE__ */ jsx12(LoaderCircle, { size: 14, className: "animate-spin", "aria-hidden": "true" }),
|
|
25356
25359
|
"\u6B63\u5728\u52A0\u8F7D\u5019\u9009\u6A21\u578B..."
|
|
25357
|
-
] }) : models.length === 0 ? /* @__PURE__ */
|
|
25360
|
+
] }) : models.length === 0 ? /* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-between gap-2 px-3 py-3 text-xs text-muted-foreground", children: [
|
|
25358
25361
|
/* @__PURE__ */ jsx12("span", { children: "\u5F53\u524D\u6682\u65E0\u53EF\u7528\u6A21\u578B" }),
|
|
25359
|
-
/* @__PURE__ */
|
|
25362
|
+
/* @__PURE__ */ jsxs4(
|
|
25360
25363
|
"button",
|
|
25361
25364
|
{
|
|
25362
25365
|
type: "button",
|
|
@@ -25371,7 +25374,7 @@ function ModelCatalogPopoverBody({
|
|
|
25371
25374
|
] }) : filteredModels.length === 0 ? /* @__PURE__ */ jsx12("div", { className: "px-3 py-2 text-xs text-muted-foreground", children: "\u6CA1\u6709\u5339\u914D\u7684\u6A21\u578B" }) : filteredModels.map((model) => {
|
|
25372
25375
|
const inputLabel = formatInputModalities(model);
|
|
25373
25376
|
const title = model.id === model.label ? `${model.id}\uFF0C\u652F\u6301\u8F93\u5165\uFF1A${inputLabel}` : `${model.label} (${model.id})\uFF0C\u652F\u6301\u8F93\u5165\uFF1A${inputLabel}`;
|
|
25374
|
-
return /* @__PURE__ */
|
|
25377
|
+
return /* @__PURE__ */ jsxs4(
|
|
25375
25378
|
"button",
|
|
25376
25379
|
{
|
|
25377
25380
|
type: "button",
|
|
@@ -25379,11 +25382,11 @@ function ModelCatalogPopoverBody({
|
|
|
25379
25382
|
className: `flex w-full items-center justify-between gap-3 rounded-lg px-3 py-2 text-left text-xs transition-colors ${model.id === value ? "bg-accent text-foreground" : "text-muted-foreground hover:bg-accent hover:text-foreground"}`,
|
|
25380
25383
|
title,
|
|
25381
25384
|
children: [
|
|
25382
|
-
/* @__PURE__ */
|
|
25385
|
+
/* @__PURE__ */ jsxs4("span", { className: "min-w-0 truncate", children: [
|
|
25383
25386
|
model.label,
|
|
25384
|
-
model.personal ? /* @__PURE__ */ jsx12("span", { className: "ml-1.5 rounded bg-
|
|
25387
|
+
model.personal ? /* @__PURE__ */ jsx12("span", { className: "ml-1.5 rounded border border-border/70 bg-background/80 px-1 py-0.5 text-[10px] font-normal text-muted-foreground", children: "\u6211\u7684" }) : null
|
|
25385
25388
|
] }),
|
|
25386
|
-
/* @__PURE__ */
|
|
25389
|
+
/* @__PURE__ */ jsxs4("span", { className: "flex shrink-0 items-center gap-1.5 text-[11px] text-muted-foreground", children: [
|
|
25387
25390
|
inputLabel,
|
|
25388
25391
|
model.id === value ? /* @__PURE__ */ jsx12(Check, { size: 13, "aria-label": "\u5DF2\u9009\u62E9" }) : null
|
|
25389
25392
|
] })
|
|
@@ -25417,9 +25420,9 @@ function BannerModelSelector({
|
|
|
25417
25420
|
setMobileAnchor(null);
|
|
25418
25421
|
}
|
|
25419
25422
|
}
|
|
25420
|
-
return /* @__PURE__ */ jsx12("div", { className: "relative shrink-0", children: /* @__PURE__ */
|
|
25423
|
+
return /* @__PURE__ */ jsx12("div", { className: "relative shrink-0", children: /* @__PURE__ */ jsxs4(Popover, { open: isOpen, onOpenChange: handleOpenChange, children: [
|
|
25421
25424
|
mobileAnchor ? /* @__PURE__ */ jsx12(PopoverAnchor, { virtualRef: mobileAnchor }) : null,
|
|
25422
|
-
/* @__PURE__ */ jsx12(PopoverTrigger, { asChild: true, children: /* @__PURE__ */
|
|
25425
|
+
/* @__PURE__ */ jsx12(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs4(
|
|
25423
25426
|
"button",
|
|
25424
25427
|
{
|
|
25425
25428
|
type: "button",
|
|
@@ -25508,7 +25511,7 @@ function StandardModelSelector({
|
|
|
25508
25511
|
const activeInputLabel = activeModel ? formatInputModalities(activeModel) : "";
|
|
25509
25512
|
const selectorTitle = selectedUnavailable ? `${label}\uFF0C\u5F53\u524D\u6A21\u578B\u76EE\u5F55\u4E2D\u4E0D\u53EF\u7528` : activeInputLabel ? `${label}\uFF0C\u652F\u6301\u8F93\u5165\uFF1A${activeInputLabel}` : label;
|
|
25510
25513
|
if (!canSelect) {
|
|
25511
|
-
return /* @__PURE__ */
|
|
25514
|
+
return /* @__PURE__ */ jsxs4(
|
|
25512
25515
|
"div",
|
|
25513
25516
|
{
|
|
25514
25517
|
className: `flex min-w-0 items-center gap-1 rounded-lg py-[5px] text-muted-foreground ${compact ? "ml-auto px-1.5" : "px-2.5"}`,
|
|
@@ -25527,9 +25530,9 @@ function StandardModelSelector({
|
|
|
25527
25530
|
}
|
|
25528
25531
|
);
|
|
25529
25532
|
}
|
|
25530
|
-
return /* @__PURE__ */ jsx12("div", { className: `relative min-w-0 ${compact ? "ml-auto" : ""}`, children: /* @__PURE__ */
|
|
25533
|
+
return /* @__PURE__ */ jsx12("div", { className: `relative min-w-0 ${compact ? "ml-auto" : ""}`, children: /* @__PURE__ */ jsxs4(Popover, { open: isOpen, onOpenChange: handleOpenChange, children: [
|
|
25531
25534
|
mobileAnchor ? /* @__PURE__ */ jsx12(PopoverAnchor, { virtualRef: mobileAnchor }) : null,
|
|
25532
|
-
/* @__PURE__ */ jsx12(PopoverTrigger, { asChild: true, children: /* @__PURE__ */
|
|
25535
|
+
/* @__PURE__ */ jsx12(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs4(
|
|
25533
25536
|
"button",
|
|
25534
25537
|
{
|
|
25535
25538
|
type: "button",
|
|
@@ -25595,7 +25598,7 @@ function tokenPressureOf(stats) {
|
|
|
25595
25598
|
}
|
|
25596
25599
|
|
|
25597
25600
|
// src/rich-input/ProgressCircle.tsx
|
|
25598
|
-
import { jsx as jsx13, jsxs as
|
|
25601
|
+
import { jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
25599
25602
|
var LEVEL_STYLES = {
|
|
25600
25603
|
normal: {
|
|
25601
25604
|
strokeClass: "stroke-slate-400",
|
|
@@ -25626,14 +25629,14 @@ function ProgressCircle({
|
|
|
25626
25629
|
const circumference = 2 * Math.PI * radius;
|
|
25627
25630
|
const dashOffset = circumference * (1 - clamped / 100);
|
|
25628
25631
|
const styles = LEVEL_STYLES[level];
|
|
25629
|
-
return /* @__PURE__ */
|
|
25632
|
+
return /* @__PURE__ */ jsxs5("div", { className: cn("group/context relative inline-flex", className), children: [
|
|
25630
25633
|
/* @__PURE__ */ jsx13(
|
|
25631
25634
|
"button",
|
|
25632
25635
|
{
|
|
25633
25636
|
type: "button",
|
|
25634
25637
|
"aria-label": `\u4E0A\u4E0B\u6587\u5DF2\u4F7F\u7528 ${Math.round(clamped)}%`,
|
|
25635
25638
|
className: "relative inline-flex cursor-help items-center justify-center rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--ring))] focus-visible:ring-offset-2 focus-visible:ring-offset-[hsl(var(--background))]",
|
|
25636
|
-
children: /* @__PURE__ */
|
|
25639
|
+
children: /* @__PURE__ */ jsxs5("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, "aria-hidden": "true", children: [
|
|
25637
25640
|
/* @__PURE__ */ jsx13(
|
|
25638
25641
|
"circle",
|
|
25639
25642
|
{
|
|
@@ -25668,7 +25671,7 @@ function ProgressCircle({
|
|
|
25668
25671
|
}
|
|
25669
25672
|
|
|
25670
25673
|
// src/rich-input/SkillStatusBar.tsx
|
|
25671
|
-
import { jsx as jsx14, jsxs as
|
|
25674
|
+
import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
25672
25675
|
var EMPTY_SKILL_STATS = {
|
|
25673
25676
|
loaded_skill_count: 0,
|
|
25674
25677
|
loaded_skill_names: [],
|
|
@@ -25720,7 +25723,7 @@ function HoverPanel({
|
|
|
25720
25723
|
title,
|
|
25721
25724
|
children
|
|
25722
25725
|
}) {
|
|
25723
|
-
return /* @__PURE__ */ jsx14("div", { className: "absolute bottom-full left-0 z-40 hidden w-80 max-w-[min(22rem,calc(100vw-2rem))] pb-2 group-hover/skill:block group-focus-within/skill:block", children: /* @__PURE__ */
|
|
25726
|
+
return /* @__PURE__ */ jsx14("div", { className: "absolute bottom-full left-0 z-40 hidden w-80 max-w-[min(22rem,calc(100vw-2rem))] pb-2 group-hover/skill:block group-focus-within/skill:block", children: /* @__PURE__ */ jsxs6("div", { className: "rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--popover))] px-3 py-2 text-[11px] text-[hsl(var(--popover-foreground))] shadow-[var(--swf-shadow-overlay)]", children: [
|
|
25724
25727
|
/* @__PURE__ */ jsx14("div", { className: "mb-1 text-[10px] font-semibold uppercase tracking-[0.08em] text-[hsl(var(--muted-foreground))]", children: title }),
|
|
25725
25728
|
children
|
|
25726
25729
|
] }) });
|
|
@@ -25780,16 +25783,16 @@ function SkillStatusBar({
|
|
|
25780
25783
|
};
|
|
25781
25784
|
}
|
|
25782
25785
|
return {
|
|
25783
|
-
detail: /* @__PURE__ */
|
|
25784
|
-
/* @__PURE__ */
|
|
25786
|
+
detail: /* @__PURE__ */ jsxs6("div", { className: "space-y-1", children: [
|
|
25787
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex items-center justify-between gap-3 border-t border-[hsl(var(--border))] pt-1", children: [
|
|
25785
25788
|
/* @__PURE__ */ jsx14("span", { className: "text-[hsl(var(--muted-foreground))]", children: "\u4F1A\u8BDD\u6D88\u606F\u4F30\u7B97" }),
|
|
25786
25789
|
/* @__PURE__ */ jsx14("span", { className: "font-mono", children: formatTokenNumber(contextStats.tokens_used) })
|
|
25787
25790
|
] }),
|
|
25788
|
-
contextStats.context_window > 0 ? /* @__PURE__ */
|
|
25791
|
+
contextStats.context_window > 0 ? /* @__PURE__ */ jsxs6("div", { className: "flex items-center justify-between gap-3", children: [
|
|
25789
25792
|
/* @__PURE__ */ jsx14("span", { className: "text-[hsl(var(--muted-foreground))]", children: "\u4E0A\u4E0B\u6587\u7A97\u53E3" }),
|
|
25790
25793
|
/* @__PURE__ */ jsx14("span", { className: "font-mono", children: formatCompactNumber(contextStats.context_window) })
|
|
25791
25794
|
] }) : /* @__PURE__ */ jsx14("div", { className: "pt-1 text-[hsl(var(--muted-foreground))]", children: "\u672A\u914D\u7F6E\u4E0A\u4E0B\u6587\u7A97\u53E3\u5927\u5C0F\uFF0C\u53EF\u901A\u8FC7 CONTEXT_WINDOW \u73AF\u5883\u53D8\u91CF\u8BBE\u7F6E" }),
|
|
25792
|
-
/* @__PURE__ */
|
|
25795
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex items-center justify-between gap-3", children: [
|
|
25793
25796
|
/* @__PURE__ */ jsx14("span", { className: "text-[hsl(var(--muted-foreground))]", children: "\u6574\u7406\u9608\u503C" }),
|
|
25794
25797
|
/* @__PURE__ */ jsx14("span", { className: "font-mono", children: contextStats.compaction_ratio > 0 ? `${Math.round(contextStats.compaction_ratio * 100)}%` : "\u5DF2\u7981\u7528" })
|
|
25795
25798
|
] })
|
|
@@ -25801,8 +25804,8 @@ function SkillStatusBar({
|
|
|
25801
25804
|
const containerClass = vertical ? "text-[11px] text-[hsl(var(--muted-foreground))]" : "bg-[hsl(var(--background))] px-5 pt-2";
|
|
25802
25805
|
const innerClass = vertical ? "" : "mx-auto max-w-3xl";
|
|
25803
25806
|
const listClass = vertical ? "flex flex-col items-stretch gap-1.5 text-[11px] text-[hsl(var(--muted-foreground))]" : "flex flex-wrap items-center gap-2 text-[10px] text-[hsl(var(--muted-foreground))]";
|
|
25804
|
-
return /* @__PURE__ */ jsx14("div", { className: cn(containerClass, className), children: /* @__PURE__ */ jsx14("div", { className: cn(innerClass, innerClassName), children: /* @__PURE__ */
|
|
25805
|
-
tokenSummary ? /* @__PURE__ */
|
|
25807
|
+
return /* @__PURE__ */ jsx14("div", { className: cn(containerClass, className), children: /* @__PURE__ */ jsx14("div", { className: cn(innerClass, innerClassName), children: /* @__PURE__ */ jsxs6("div", { className: listClass, children: [
|
|
25808
|
+
tokenSummary ? /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-2 rounded-full border border-[hsl(var(--border))] bg-[hsl(var(--card))] px-2.5 py-1", children: [
|
|
25806
25809
|
/* @__PURE__ */ jsx14(
|
|
25807
25810
|
ProgressCircle,
|
|
25808
25811
|
{
|
|
@@ -25814,7 +25817,7 @@ function SkillStatusBar({
|
|
|
25814
25817
|
/* @__PURE__ */ jsx14("span", { className: "font-mono", children: tokenSummary.label }),
|
|
25815
25818
|
tokenSummary.warn ? /* @__PURE__ */ jsx14("span", { className: "rounded-full border border-[hsl(var(--swf-danger)/0.25)] bg-[hsl(var(--swf-danger-soft))] px-1.5 py-0.5 text-[10px] font-medium text-[hsl(var(--swf-danger))]", children: "\u5EFA\u8BAE\u6574\u7406\u5BF9\u8BDD" }) : null
|
|
25816
25819
|
] }) : null,
|
|
25817
|
-
connectionStatus !== "connected" ? /* @__PURE__ */
|
|
25820
|
+
connectionStatus !== "connected" ? /* @__PURE__ */ jsxs6(
|
|
25818
25821
|
"div",
|
|
25819
25822
|
{
|
|
25820
25823
|
className: cn(
|
|
@@ -25827,16 +25830,16 @@ function SkillStatusBar({
|
|
|
25827
25830
|
]
|
|
25828
25831
|
}
|
|
25829
25832
|
) : null,
|
|
25830
|
-
items.map((item, index) => /* @__PURE__ */
|
|
25833
|
+
items.map((item, index) => /* @__PURE__ */ jsxs6(
|
|
25831
25834
|
"div",
|
|
25832
25835
|
{
|
|
25833
25836
|
className: "flex items-center gap-2 rounded-full border border-[hsl(var(--border))] bg-[hsl(var(--card))] px-2.5 py-1",
|
|
25834
25837
|
children: [
|
|
25835
25838
|
index > 0 && !tokenPressure && /* @__PURE__ */ jsx14("span", { className: "hidden text-[hsl(var(--border))]", children: "\xB7" }),
|
|
25836
25839
|
/* @__PURE__ */ jsx14("span", { className: `inline-block h-1.5 w-1.5 rounded-full ${item.dotClass}` }),
|
|
25837
|
-
item.key === "loaded" ? /* @__PURE__ */
|
|
25840
|
+
item.key === "loaded" ? /* @__PURE__ */ jsxs6("div", { className: "group/skill relative flex items-center gap-1.5", children: [
|
|
25838
25841
|
/* @__PURE__ */ jsx14("span", { className: "font-mono", children: item.text }),
|
|
25839
|
-
loadedReady && sessionSkills.length > 0 ? /* @__PURE__ */ jsx14(HoverPanel, { title: "\u5DF2\u52A0\u8F7D\u6280\u80FD", children: sessionSkills.length > 0 ? /* @__PURE__ */ jsx14("div", { className: "max-h-40 overflow-y-auto", children: sessionSkills.map((skill) => /* @__PURE__ */
|
|
25842
|
+
loadedReady && sessionSkills.length > 0 ? /* @__PURE__ */ jsx14(HoverPanel, { title: "\u5DF2\u52A0\u8F7D\u6280\u80FD", children: sessionSkills.length > 0 ? /* @__PURE__ */ jsx14("div", { className: "max-h-40 overflow-y-auto", children: sessionSkills.map((skill) => /* @__PURE__ */ jsxs6("div", { className: "flex items-start gap-2 py-1 leading-relaxed", children: [
|
|
25840
25843
|
/* @__PURE__ */ jsx14("span", { className: "mt-1.5 inline-block h-2 w-2 shrink-0 rounded-full border border-[hsl(var(--swf-success))] bg-transparent" }),
|
|
25841
25844
|
/* @__PURE__ */ jsx14("span", { className: "break-words", children: skillDisplayName(skill) })
|
|
25842
25845
|
] }, skill.skill_id)) }) : null }) : null
|
|
@@ -25859,7 +25862,7 @@ function SkillStatusBar({
|
|
|
25859
25862
|
|
|
25860
25863
|
// src/rich-input/InputActionSubmenu.tsx
|
|
25861
25864
|
import { useSyncExternalStore as useSyncExternalStore3 } from "react";
|
|
25862
|
-
import { jsx as jsx15, jsxs as
|
|
25865
|
+
import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
25863
25866
|
var narrowQuery = "(max-width: 639px)";
|
|
25864
25867
|
function subscribeToViewport(onChange) {
|
|
25865
25868
|
const media = window.matchMedia(narrowQuery);
|
|
@@ -25869,8 +25872,8 @@ function subscribeToViewport(onChange) {
|
|
|
25869
25872
|
var isNarrowViewport = () => window.matchMedia(narrowQuery).matches;
|
|
25870
25873
|
function InputActionSubmenu({ label, icon, open, onOpenChange, children, disabled = false }) {
|
|
25871
25874
|
const narrow = useSyncExternalStore3(subscribeToViewport, isNarrowViewport, () => false);
|
|
25872
|
-
return /* @__PURE__ */
|
|
25873
|
-
/* @__PURE__ */ jsx15(dist_exports.Trigger, { asChild: true, children: /* @__PURE__ */
|
|
25875
|
+
return /* @__PURE__ */ jsxs7(dist_exports.Root, { open, onOpenChange, children: [
|
|
25876
|
+
/* @__PURE__ */ jsx15(dist_exports.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs7(
|
|
25874
25877
|
"button",
|
|
25875
25878
|
{
|
|
25876
25879
|
type: "button",
|
|
@@ -26041,7 +26044,7 @@ async function getSkillSuggestions(query, options) {
|
|
|
26041
26044
|
}
|
|
26042
26045
|
|
|
26043
26046
|
// src/rich-input/ConnectButton.tsx
|
|
26044
|
-
import { jsx as jsx16, jsxs as
|
|
26047
|
+
import { jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
26045
26048
|
function ConnectButton({
|
|
26046
26049
|
sessionId,
|
|
26047
26050
|
open,
|
|
@@ -26121,7 +26124,7 @@ function ConnectButton({
|
|
|
26121
26124
|
}
|
|
26122
26125
|
);
|
|
26123
26126
|
}
|
|
26124
|
-
return /* @__PURE__ */
|
|
26127
|
+
return /* @__PURE__ */ jsxs8(dist_exports.Root, { open: isOpen, onOpenChange: setOpen, children: [
|
|
26125
26128
|
/* @__PURE__ */ jsx16(dist_exports.Trigger, { asChild: true, children: /* @__PURE__ */ jsx16(
|
|
26126
26129
|
"button",
|
|
26127
26130
|
{
|
|
@@ -26848,7 +26851,7 @@ function listUserHomeDir(client, dirPath) {
|
|
|
26848
26851
|
}
|
|
26849
26852
|
|
|
26850
26853
|
// src/rich-input/FileCompletionMenu.tsx
|
|
26851
|
-
import { Fragment as Fragment5, jsx as jsx17, jsxs as
|
|
26854
|
+
import { Fragment as Fragment5, jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
26852
26855
|
var ROOT_DIR = ".";
|
|
26853
26856
|
function installSuggestionOutsideDismiss(container, onDismiss) {
|
|
26854
26857
|
const onPointerDown = (event) => {
|
|
@@ -27089,9 +27092,9 @@ var FileCompletionMenuContent = forwardRef2(function FileCompletionMenuContent2(
|
|
|
27089
27092
|
};
|
|
27090
27093
|
const showGroupLabels = pluginItems.length > 0 || topicItems.length > 0 || Boolean(topicError);
|
|
27091
27094
|
const fileEmptyLabel = scope === "session" && !sessionId ? "\u6682\u65E0\u4F1A\u8BDD" : filteredEntries.length === 0 ? "\u6CA1\u6709\u6587\u4EF6" : null;
|
|
27092
|
-
return /* @__PURE__ */
|
|
27095
|
+
return /* @__PURE__ */ jsxs9("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: [
|
|
27093
27096
|
pluginError ? /* @__PURE__ */ jsx17("output", { className: "block px-3 py-2 text-xs text-muted-foreground", children: pluginError }) : null,
|
|
27094
|
-
pluginItems.map((item, index) => /* @__PURE__ */
|
|
27097
|
+
pluginItems.map((item, index) => /* @__PURE__ */ jsxs9(
|
|
27095
27098
|
"button",
|
|
27096
27099
|
{
|
|
27097
27100
|
ref: selectedRef(index),
|
|
@@ -27109,12 +27112,12 @@ var FileCompletionMenuContent = forwardRef2(function FileCompletionMenuContent2(
|
|
|
27109
27112
|
},
|
|
27110
27113
|
`${item.plugin}:${item.server}:${item.id}`
|
|
27111
27114
|
)),
|
|
27112
|
-
topicItems.length > 0 || topicError ? /* @__PURE__ */
|
|
27115
|
+
topicItems.length > 0 || topicError ? /* @__PURE__ */ jsxs9(Fragment5, { children: [
|
|
27113
27116
|
/* @__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" }),
|
|
27114
27117
|
topicError ? /* @__PURE__ */ jsx17("output", { className: "block px-3 py-2 text-xs text-muted-foreground", children: topicError }) : null,
|
|
27115
27118
|
topicItems.map((item, topicIndex) => {
|
|
27116
27119
|
const index = pluginItems.length + topicIndex;
|
|
27117
|
-
return /* @__PURE__ */
|
|
27120
|
+
return /* @__PURE__ */ jsxs9("button", { ref: selectedRef(index), type: "button", title: item.path, className: rowClassName(index), onMouseDown: (event) => {
|
|
27118
27121
|
event.preventDefault();
|
|
27119
27122
|
handleSelect(item);
|
|
27120
27123
|
}, children: [
|
|
@@ -27126,7 +27129,7 @@ var FileCompletionMenuContent = forwardRef2(function FileCompletionMenuContent2(
|
|
|
27126
27129
|
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,
|
|
27127
27130
|
fileEmptyLabel ? /* @__PURE__ */ jsx17("div", { className: "px-3 py-2 text-xs text-[hsl(var(--muted-foreground))]", children: fileEmptyLabel }) : filteredEntries.map((entry, fileIndex) => {
|
|
27128
27131
|
const index = pluginItems.length + topicItems.length + fileIndex;
|
|
27129
|
-
return /* @__PURE__ */
|
|
27132
|
+
return /* @__PURE__ */ jsxs9(
|
|
27130
27133
|
"button",
|
|
27131
27134
|
{
|
|
27132
27135
|
ref: selectedRef(index),
|
|
@@ -27150,7 +27153,7 @@ var FileCompletionMenuContent = forwardRef2(function FileCompletionMenuContent2(
|
|
|
27150
27153
|
|
|
27151
27154
|
// src/rich-input/SkillCompletionMenu.tsx
|
|
27152
27155
|
import { forwardRef as forwardRef3, useCallback as useCallback5, useImperativeHandle as useImperativeHandle2, useState as useState10 } from "react";
|
|
27153
|
-
import { jsx as jsx18, jsxs as
|
|
27156
|
+
import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
27154
27157
|
var SkillCompletionMenu = forwardRef3(
|
|
27155
27158
|
function SkillCompletionMenu2({ command: command2, items }, ref) {
|
|
27156
27159
|
const [rawSelectedIndex, setRawSelectedIndex] = useState10(0);
|
|
@@ -27197,10 +27200,10 @@ var SkillCompletionMenu = forwardRef3(
|
|
|
27197
27200
|
);
|
|
27198
27201
|
const commandItems = items.filter((item) => item.type === "command");
|
|
27199
27202
|
const skillItems = items.filter((item) => item.type === "skill");
|
|
27200
|
-
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__ */
|
|
27201
|
-
commandItems.length > 0 ? /* @__PURE__ */
|
|
27203
|
+
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__ */ jsxs10("div", { children: [
|
|
27204
|
+
commandItems.length > 0 ? /* @__PURE__ */ jsxs10("div", { className: "px-2 pb-1 pt-1", children: [
|
|
27202
27205
|
/* @__PURE__ */ jsx18("div", { className: "px-1 pb-1 text-[10px] font-semibold uppercase tracking-[0.08em] text-[hsl(var(--muted-foreground))]", children: "\u547D\u4EE4" }),
|
|
27203
|
-
commandItems.map((item, index) => /* @__PURE__ */
|
|
27206
|
+
commandItems.map((item, index) => /* @__PURE__ */ jsxs10(
|
|
27204
27207
|
"button",
|
|
27205
27208
|
{
|
|
27206
27209
|
ref: (element) => {
|
|
@@ -27216,7 +27219,7 @@ var SkillCompletionMenu = forwardRef3(
|
|
|
27216
27219
|
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))]"}`,
|
|
27217
27220
|
children: [
|
|
27218
27221
|
/* @__PURE__ */ jsx18("span", { className: "pt-0.5 text-sm", children: "\u21BB" }),
|
|
27219
|
-
/* @__PURE__ */
|
|
27222
|
+
/* @__PURE__ */ jsxs10("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
27220
27223
|
/* @__PURE__ */ jsx18("span", { className: "text-sm font-medium", children: item.label }),
|
|
27221
27224
|
/* @__PURE__ */ jsx18("span", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: item.description })
|
|
27222
27225
|
] })
|
|
@@ -27225,11 +27228,11 @@ var SkillCompletionMenu = forwardRef3(
|
|
|
27225
27228
|
item.id
|
|
27226
27229
|
))
|
|
27227
27230
|
] }) : null,
|
|
27228
|
-
skillItems.length > 0 ? /* @__PURE__ */
|
|
27231
|
+
skillItems.length > 0 ? /* @__PURE__ */ jsxs10("div", { className: "px-2 pb-1 pt-1", children: [
|
|
27229
27232
|
/* @__PURE__ */ jsx18("div", { className: "px-1 pb-1 text-[10px] font-semibold uppercase tracking-[0.08em] text-[hsl(var(--muted-foreground))]", children: "\u6280\u80FD" }),
|
|
27230
27233
|
skillItems.map((item, skillIndex) => {
|
|
27231
27234
|
const index = commandItems.length + skillIndex;
|
|
27232
|
-
return /* @__PURE__ */
|
|
27235
|
+
return /* @__PURE__ */ jsxs10(
|
|
27233
27236
|
"button",
|
|
27234
27237
|
{
|
|
27235
27238
|
ref: (element) => {
|
|
@@ -27244,7 +27247,7 @@ var SkillCompletionMenu = forwardRef3(
|
|
|
27244
27247
|
},
|
|
27245
27248
|
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))]"}`,
|
|
27246
27249
|
children: [
|
|
27247
|
-
/* @__PURE__ */
|
|
27250
|
+
/* @__PURE__ */ jsxs10("span", { className: "flex items-center gap-1.5", children: [
|
|
27248
27251
|
/* @__PURE__ */ jsx18("span", { className: "text-sm font-medium", children: skillDisplayName(item) }),
|
|
27249
27252
|
item.hasFlow ? /* @__PURE__ */ jsx18(
|
|
27250
27253
|
"span",
|
|
@@ -27268,7 +27271,7 @@ var SkillCompletionMenu = forwardRef3(
|
|
|
27268
27271
|
);
|
|
27269
27272
|
|
|
27270
27273
|
// src/rich-input/FileSizeLimitDialog.tsx
|
|
27271
|
-
import { jsx as jsx19, jsxs as
|
|
27274
|
+
import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
27272
27275
|
function FileSizeLimitDialog({
|
|
27273
27276
|
open,
|
|
27274
27277
|
onOpenChange,
|
|
@@ -27279,11 +27282,11 @@ function FileSizeLimitDialog({
|
|
|
27279
27282
|
return null;
|
|
27280
27283
|
}
|
|
27281
27284
|
const limitText = formatFileSize(limitBytes);
|
|
27282
|
-
return /* @__PURE__ */ jsx19(Dialog, { open, onOpenChange, children: /* @__PURE__ */
|
|
27283
|
-
/* @__PURE__ */
|
|
27284
|
-
/* @__PURE__ */
|
|
27285
|
+
return /* @__PURE__ */ jsx19(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs11(DialogContent, { showCloseButton: false, className: "w-full max-w-lg gap-0 p-0", children: [
|
|
27286
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between border-b border-[hsl(var(--border))] px-4 py-3", children: [
|
|
27287
|
+
/* @__PURE__ */ jsxs11("div", { children: [
|
|
27285
27288
|
/* @__PURE__ */ jsx19(DialogTitle, { className: "text-sm font-semibold text-[hsl(var(--foreground))]", children: "\u9644\u4EF6\u8D85\u8FC7\u5927\u5C0F\u9650\u5236" }),
|
|
27286
|
-
/* @__PURE__ */
|
|
27289
|
+
/* @__PURE__ */ jsxs11("p", { className: "mt-1 text-xs text-[hsl(var(--muted-foreground))]", children: [
|
|
27287
27290
|
"\u5355\u4E2A\u9644\u4EF6\u6700\u5927\u652F\u6301 ",
|
|
27288
27291
|
limitText,
|
|
27289
27292
|
"\u3002\u4EE5\u4E0B\u6587\u4EF6\u672A\u52A0\u5165\u9644\u4EF6\u5217\u8868\u3002"
|
|
@@ -27298,7 +27301,7 @@ function FileSizeLimitDialog({
|
|
|
27298
27301
|
}
|
|
27299
27302
|
)
|
|
27300
27303
|
] }),
|
|
27301
|
-
/* @__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__ */
|
|
27304
|
+
/* @__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__ */ jsxs11(
|
|
27302
27305
|
"div",
|
|
27303
27306
|
{
|
|
27304
27307
|
className: "flex items-center justify-between gap-3 rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--accent))] px-3 py-2",
|
|
@@ -27387,7 +27390,7 @@ function reasoningLevelLabel(level) {
|
|
|
27387
27390
|
}
|
|
27388
27391
|
|
|
27389
27392
|
// src/rich-input/ReasoningModeSelect.tsx
|
|
27390
|
-
import { jsx as jsx20, jsxs as
|
|
27393
|
+
import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
27391
27394
|
function ReasoningModeSelect({
|
|
27392
27395
|
level,
|
|
27393
27396
|
levels,
|
|
@@ -27395,8 +27398,8 @@ function ReasoningModeSelect({
|
|
|
27395
27398
|
disabledReason,
|
|
27396
27399
|
onChange
|
|
27397
27400
|
}) {
|
|
27398
|
-
return /* @__PURE__ */
|
|
27399
|
-
/* @__PURE__ */
|
|
27401
|
+
return /* @__PURE__ */ jsxs12("label", { className: "flex w-full flex-col gap-1 px-3 py-2", children: [
|
|
27402
|
+
/* @__PURE__ */ jsxs12("span", { className: "flex w-full items-center gap-2", children: [
|
|
27400
27403
|
/* @__PURE__ */ jsx20(Brain, { size: 14, className: `shrink-0 ${chatTone("reasoning").text}`, "aria-hidden": "true" }),
|
|
27401
27404
|
/* @__PURE__ */ jsx20("span", { className: "shrink-0", children: "\u601D\u8003\u6A21\u5F0F" }),
|
|
27402
27405
|
/* @__PURE__ */ jsx20(
|
|
@@ -27417,9 +27420,9 @@ function ReasoningModeSelect({
|
|
|
27417
27420
|
}
|
|
27418
27421
|
|
|
27419
27422
|
// src/rich-input/PlanningToggle.tsx
|
|
27420
|
-
import { jsx as jsx21, jsxs as
|
|
27423
|
+
import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
27421
27424
|
function PlanningToggle({ enabled, onChange, disabled }) {
|
|
27422
|
-
return /* @__PURE__ */
|
|
27425
|
+
return /* @__PURE__ */ jsxs13(
|
|
27423
27426
|
"button",
|
|
27424
27427
|
{
|
|
27425
27428
|
type: "button",
|
|
@@ -27431,11 +27434,11 @@ function PlanningToggle({ enabled, onChange, disabled }) {
|
|
|
27431
27434
|
disabled,
|
|
27432
27435
|
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",
|
|
27433
27436
|
children: [
|
|
27434
|
-
/* @__PURE__ */
|
|
27437
|
+
/* @__PURE__ */ jsxs13("span", { className: "flex items-center gap-2", children: [
|
|
27435
27438
|
/* @__PURE__ */ jsx21(Lightbulb, { size: 14, className: "text-[#F97316]", "aria-hidden": "true" }),
|
|
27436
27439
|
"\u89C4\u5212\u6A21\u5F0F"
|
|
27437
27440
|
] }),
|
|
27438
|
-
/* @__PURE__ */
|
|
27441
|
+
/* @__PURE__ */ jsxs13("span", { className: "flex items-center gap-2", children: [
|
|
27439
27442
|
/* @__PURE__ */ jsx21("span", { className: "text-[hsl(var(--muted-foreground))]", children: enabled ? "\u5F00" : "\u5173" }),
|
|
27440
27443
|
/* @__PURE__ */ jsx21(
|
|
27441
27444
|
"span",
|
|
@@ -27478,7 +27481,7 @@ function ComposerAttachmentViewport({
|
|
|
27478
27481
|
}
|
|
27479
27482
|
|
|
27480
27483
|
// src/rich-input/ChatInput.tsx
|
|
27481
|
-
import { Fragment as Fragment6, jsx as jsx24, jsxs as
|
|
27484
|
+
import { Fragment as Fragment6, jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
27482
27485
|
var RECENT_SESSION_LIMIT = 50;
|
|
27483
27486
|
var DOUBLE_ESCAPE_MS = 450;
|
|
27484
27487
|
function getEditorText(editor) {
|
|
@@ -27649,7 +27652,7 @@ function ComposerFilePill({
|
|
|
27649
27652
|
const isFailed = isFile && attachment.status === "failed";
|
|
27650
27653
|
const isUploading = isFile && attachment.status === "uploading";
|
|
27651
27654
|
const uploadPercent = isUploading && typeof attachment.uploadProgress === "number" ? Math.max(0, Math.min(100, Math.round(attachment.uploadProgress * 100))) : null;
|
|
27652
|
-
return /* @__PURE__ */
|
|
27655
|
+
return /* @__PURE__ */ jsxs14(
|
|
27653
27656
|
"div",
|
|
27654
27657
|
{
|
|
27655
27658
|
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))]"}`,
|
|
@@ -27669,7 +27672,7 @@ function ComposerFilePill({
|
|
|
27669
27672
|
}
|
|
27670
27673
|
) : /* @__PURE__ */ jsx24(Icon, { size: 12, className: "relative z-10 shrink-0 text-[hsl(var(--muted-foreground))]" }),
|
|
27671
27674
|
/* @__PURE__ */ jsx24("span", { className: "relative z-10 max-w-32 truncate", children: attachment.name }),
|
|
27672
|
-
uploadPercent !== null ? /* @__PURE__ */
|
|
27675
|
+
uploadPercent !== null ? /* @__PURE__ */ jsxs14("span", { className: "relative z-10 font-mono text-[10px] tabular-nums text-[hsl(var(--muted-foreground))]", children: [
|
|
27673
27676
|
uploadPercent,
|
|
27674
27677
|
"%"
|
|
27675
27678
|
] }) : null,
|
|
@@ -27737,7 +27740,14 @@ function AddContextDialog({
|
|
|
27737
27740
|
setImportingId(sid);
|
|
27738
27741
|
setIsImportProcessing(false);
|
|
27739
27742
|
try {
|
|
27740
|
-
const
|
|
27743
|
+
const pages = [];
|
|
27744
|
+
let before;
|
|
27745
|
+
do {
|
|
27746
|
+
const page = await client.sessions.getSessionTurnsPage(sid, { before });
|
|
27747
|
+
pages.push(page.turns);
|
|
27748
|
+
before = page.nextBefore ?? void 0;
|
|
27749
|
+
} while (before !== void 0);
|
|
27750
|
+
const turns = pages.reverse().flat();
|
|
27741
27751
|
const session = sessions.find((s) => s.id === sid);
|
|
27742
27752
|
const nextLabel = session?.intent || "\u5BFC\u5165\u7684\u4F1A\u8BDD";
|
|
27743
27753
|
const folder = sanitizeContextFolderName(nextLabel);
|
|
@@ -27812,14 +27822,14 @@ ${upload.rawResultStr.slice(0, CONTEXT_INLINE_THRESHOLD)}...`
|
|
|
27812
27822
|
onKeyDown: (e) => {
|
|
27813
27823
|
if (e.key === "Escape") onClose();
|
|
27814
27824
|
},
|
|
27815
|
-
children: /* @__PURE__ */
|
|
27825
|
+
children: /* @__PURE__ */ jsxs14(
|
|
27816
27826
|
"div",
|
|
27817
27827
|
{
|
|
27818
27828
|
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)]",
|
|
27819
27829
|
onClick: (e) => e.stopPropagation(),
|
|
27820
27830
|
onKeyDown: (e) => e.stopPropagation(),
|
|
27821
27831
|
children: [
|
|
27822
|
-
/* @__PURE__ */
|
|
27832
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-center justify-between border-b border-[hsl(var(--border))] px-5 py-3", children: [
|
|
27823
27833
|
/* @__PURE__ */ jsx24("h4", { className: "text-sm font-semibold text-[hsl(var(--foreground))]", children: "\u6DFB\u52A0\u4E0A\u4E0B\u6587" }),
|
|
27824
27834
|
/* @__PURE__ */ jsx24(
|
|
27825
27835
|
"button",
|
|
@@ -27831,9 +27841,9 @@ ${upload.rawResultStr.slice(0, CONTEXT_INLINE_THRESHOLD)}...`
|
|
|
27831
27841
|
}
|
|
27832
27842
|
)
|
|
27833
27843
|
] }),
|
|
27834
|
-
/* @__PURE__ */
|
|
27835
|
-
/* @__PURE__ */
|
|
27836
|
-
/* @__PURE__ */
|
|
27844
|
+
/* @__PURE__ */ jsxs14("div", { className: "px-5 py-4 space-y-3", children: [
|
|
27845
|
+
/* @__PURE__ */ jsxs14("div", { className: "relative", children: [
|
|
27846
|
+
/* @__PURE__ */ jsxs14(
|
|
27837
27847
|
"button",
|
|
27838
27848
|
{
|
|
27839
27849
|
type: "button",
|
|
@@ -27846,10 +27856,10 @@ ${upload.rawResultStr.slice(0, CONTEXT_INLINE_THRESHOLD)}...`
|
|
|
27846
27856
|
]
|
|
27847
27857
|
}
|
|
27848
27858
|
),
|
|
27849
|
-
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__ */
|
|
27859
|
+
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__ */ jsxs14("div", { className: "flex items-center gap-2 px-3 py-2.5 text-xs text-[hsl(var(--muted-foreground))]", children: [
|
|
27850
27860
|
/* @__PURE__ */ jsx24(LoaderCircle, { size: 12, className: "animate-spin" }),
|
|
27851
27861
|
"\u52A0\u8F7D\u4F1A\u8BDD\u5217\u8868\u2026"
|
|
27852
|
-
] }) : 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__ */
|
|
27862
|
+
] }) : 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__ */ jsxs14(
|
|
27853
27863
|
"button",
|
|
27854
27864
|
{
|
|
27855
27865
|
type: "button",
|
|
@@ -27864,7 +27874,7 @@ ${upload.rawResultStr.slice(0, CONTEXT_INLINE_THRESHOLD)}...`
|
|
|
27864
27874
|
s.id
|
|
27865
27875
|
)) })
|
|
27866
27876
|
] }),
|
|
27867
|
-
/* @__PURE__ */
|
|
27877
|
+
/* @__PURE__ */ jsxs14("div", { children: [
|
|
27868
27878
|
/* @__PURE__ */ jsx24("label", { htmlFor: "ctx-label", className: "block text-xs font-medium text-[hsl(var(--foreground))] mb-1", children: "\u6807\u7B7E" }),
|
|
27869
27879
|
/* @__PURE__ */ jsx24(
|
|
27870
27880
|
"input",
|
|
@@ -27877,9 +27887,9 @@ ${upload.rawResultStr.slice(0, CONTEXT_INLINE_THRESHOLD)}...`
|
|
|
27877
27887
|
}
|
|
27878
27888
|
)
|
|
27879
27889
|
] }),
|
|
27880
|
-
/* @__PURE__ */
|
|
27890
|
+
/* @__PURE__ */ jsxs14("div", { children: [
|
|
27881
27891
|
/* @__PURE__ */ jsx24("label", { htmlFor: "ctx-content", className: "block text-xs font-medium text-[hsl(var(--foreground))] mb-1", children: "\u5185\u5BB9" }),
|
|
27882
|
-
isImportProcessing && /* @__PURE__ */
|
|
27892
|
+
isImportProcessing && /* @__PURE__ */ jsxs14("div", { className: "mb-1.5 flex items-center gap-1.5 text-[11px] text-[hsl(var(--muted-foreground))]", children: [
|
|
27883
27893
|
/* @__PURE__ */ jsx24(LoaderCircle, { size: 12, className: "animate-spin" }),
|
|
27884
27894
|
"\u6B63\u5728\u5904\u7406\u5BFC\u5165\u5185\u5BB9\u5E76\u5199\u5165 workspace/context\uFF0C\u5B8C\u6210\u540E\u53EF\u70B9\u51FB\u201C\u786E\u5B9A\u201D"
|
|
27885
27895
|
] }),
|
|
@@ -27896,7 +27906,7 @@ ${upload.rawResultStr.slice(0, CONTEXT_INLINE_THRESHOLD)}...`
|
|
|
27896
27906
|
)
|
|
27897
27907
|
] })
|
|
27898
27908
|
] }),
|
|
27899
|
-
/* @__PURE__ */
|
|
27909
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex justify-end gap-2 border-t border-[hsl(var(--border))] px-5 py-3", children: [
|
|
27900
27910
|
/* @__PURE__ */ jsx24(
|
|
27901
27911
|
"button",
|
|
27902
27912
|
{
|
|
@@ -27937,8 +27947,8 @@ function ComposerContextPill({
|
|
|
27937
27947
|
}) {
|
|
27938
27948
|
const [showDetail, setShowDetail] = useState11(false);
|
|
27939
27949
|
const tokenK = formatTokenK(content);
|
|
27940
|
-
return /* @__PURE__ */
|
|
27941
|
-
/* @__PURE__ */
|
|
27950
|
+
return /* @__PURE__ */ jsxs14(Fragment6, { children: [
|
|
27951
|
+
/* @__PURE__ */ jsxs14("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: [
|
|
27942
27952
|
imageUrl ? /* @__PURE__ */ jsx24(
|
|
27943
27953
|
"button",
|
|
27944
27954
|
{
|
|
@@ -27987,15 +27997,15 @@ function ComposerContextPill({
|
|
|
27987
27997
|
onKeyDown: (e) => {
|
|
27988
27998
|
if (e.key === "Escape") setShowDetail(false);
|
|
27989
27999
|
},
|
|
27990
|
-
children: /* @__PURE__ */
|
|
28000
|
+
children: /* @__PURE__ */ jsxs14(
|
|
27991
28001
|
"div",
|
|
27992
28002
|
{
|
|
27993
28003
|
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)]",
|
|
27994
28004
|
onClick: (e) => e.stopPropagation(),
|
|
27995
28005
|
onKeyDown: (e) => e.stopPropagation(),
|
|
27996
28006
|
children: [
|
|
27997
|
-
/* @__PURE__ */
|
|
27998
|
-
/* @__PURE__ */
|
|
28007
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-center justify-between border-b border-[hsl(var(--border))] px-6 py-3", children: [
|
|
28008
|
+
/* @__PURE__ */ jsxs14("div", { className: "min-w-0", children: [
|
|
27999
28009
|
/* @__PURE__ */ jsx24("h4", { className: "truncate text-xs font-semibold text-[hsl(var(--foreground))]", children: label }),
|
|
28000
28010
|
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
|
|
28001
28011
|
] }),
|
|
@@ -28009,7 +28019,7 @@ function ComposerContextPill({
|
|
|
28009
28019
|
}
|
|
28010
28020
|
)
|
|
28011
28021
|
] }),
|
|
28012
|
-
/* @__PURE__ */
|
|
28022
|
+
/* @__PURE__ */ jsxs14("div", { className: "min-h-0 flex-1 overflow-y-auto px-6 py-4", children: [
|
|
28013
28023
|
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,
|
|
28014
28024
|
/* @__PURE__ */ jsx24("pre", { className: "whitespace-pre-wrap break-words font-mono text-[11px] leading-[1.6] text-[hsl(var(--foreground)/0.85)]", children: content })
|
|
28015
28025
|
] })
|
|
@@ -28045,6 +28055,7 @@ function showVoiceInputErrorToast(environment, error) {
|
|
|
28045
28055
|
});
|
|
28046
28056
|
}
|
|
28047
28057
|
function ChatInput({
|
|
28058
|
+
controlPlacement,
|
|
28048
28059
|
sessionId: sessionIdProp,
|
|
28049
28060
|
onSend,
|
|
28050
28061
|
onStop,
|
|
@@ -28833,7 +28844,8 @@ ${append2.text}` : append2.text;
|
|
|
28833
28844
|
if (result.uploaded.length > 0) {
|
|
28834
28845
|
invalidation.filesUploaded(uploadSessionId);
|
|
28835
28846
|
}
|
|
28836
|
-
} catch {
|
|
28847
|
+
} catch (error) {
|
|
28848
|
+
notifyChat(environment, "error", error instanceof BladeApiError ? error.message : "\u9644\u4EF6\u4E0A\u4F20\u5931\u8D25");
|
|
28837
28849
|
setComposerAttachments(
|
|
28838
28850
|
(prev) => prev.map(
|
|
28839
28851
|
(a) => pendingFiles.some((pending) => pending.id === a.id) && a.kind === "file" && a.status === "uploading" ? { ...a, status: "failed" } : a
|
|
@@ -28988,15 +29000,97 @@ ${append2.text}` : append2.text;
|
|
|
28988
29000
|
);
|
|
28989
29001
|
});
|
|
28990
29002
|
const canContinueGeneration = Boolean(activeSessionId) && hasRecoverableLastTurn && !isStreaming && !isCompacting && !hasComposerContent && !isRecording && !isSubmitting && connectionStatus === "connected" && !isModelLoading && hasAvailableModel;
|
|
29003
|
+
const uploadControls = /* @__PURE__ */ jsxs14(Fragment6, { children: [
|
|
29004
|
+
/* @__PURE__ */ jsxs14(
|
|
29005
|
+
"button",
|
|
29006
|
+
{
|
|
29007
|
+
type: "button",
|
|
29008
|
+
onClick: () => {
|
|
29009
|
+
setActionMenuOpen(false);
|
|
29010
|
+
fileInputRef.current?.click();
|
|
29011
|
+
},
|
|
29012
|
+
className: "flex w-full items-center gap-2 rounded-lg px-3 py-2.5 text-left text-sm transition-colors hover:bg-[hsl(var(--accent))]",
|
|
29013
|
+
children: [
|
|
29014
|
+
/* @__PURE__ */ jsx24(Paperclip, { size: 16 }),
|
|
29015
|
+
"\u4E0A\u4F20\u6587\u4EF6"
|
|
29016
|
+
]
|
|
29017
|
+
}
|
|
29018
|
+
),
|
|
29019
|
+
/* @__PURE__ */ jsxs14(
|
|
29020
|
+
"button",
|
|
29021
|
+
{
|
|
29022
|
+
type: "button",
|
|
29023
|
+
onClick: () => {
|
|
29024
|
+
setActionMenuOpen(false);
|
|
29025
|
+
folderInputRef.current?.click();
|
|
29026
|
+
},
|
|
29027
|
+
className: "flex w-full items-center gap-2 rounded-lg px-3 py-2.5 text-left text-sm transition-colors hover:bg-[hsl(var(--accent))]",
|
|
29028
|
+
children: [
|
|
29029
|
+
/* @__PURE__ */ jsx24(FolderUp, { size: 16 }),
|
|
29030
|
+
"\u4E0A\u4F20\u6587\u4EF6\u5939"
|
|
29031
|
+
]
|
|
29032
|
+
}
|
|
29033
|
+
)
|
|
29034
|
+
] });
|
|
29035
|
+
const modeControls = /* @__PURE__ */ jsxs14(Fragment6, { children: [
|
|
29036
|
+
onToggleMode ? /* @__PURE__ */ jsx24(
|
|
29037
|
+
PlanningToggle,
|
|
29038
|
+
{
|
|
29039
|
+
enabled: isPlanning,
|
|
29040
|
+
onChange: () => {
|
|
29041
|
+
setMoreOptionsOpen(false);
|
|
29042
|
+
setActionMenuOpen(false);
|
|
29043
|
+
onToggleMode();
|
|
29044
|
+
},
|
|
29045
|
+
disabled: isBusy
|
|
29046
|
+
}
|
|
29047
|
+
) : null,
|
|
29048
|
+
thinkingAvailable && reasoningLevels.length > 0 ? /* @__PURE__ */ jsx24(
|
|
29049
|
+
ReasoningModeSelect,
|
|
29050
|
+
{
|
|
29051
|
+
level: selectedReasoningLevel,
|
|
29052
|
+
levels: reasoningLevels,
|
|
29053
|
+
disabled: isCompacting,
|
|
29054
|
+
disabledReason: developer ? "\u5BF9\u8BDD\u6574\u7406\u5B8C\u6210\u540E\u53EF\u8C03\u6574" : "\u5904\u7406\u5B8C\u6210\u540E\u53EF\u8C03\u6574",
|
|
29055
|
+
onChange: model.setReasoningLevel
|
|
29056
|
+
}
|
|
29057
|
+
) : null
|
|
29058
|
+
] });
|
|
29059
|
+
const modelControl = /* @__PURE__ */ jsx24(Fragment6, { children: /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-2 rounded-lg px-3 py-2", children: [
|
|
29060
|
+
/* @__PURE__ */ jsx24(Sparkles, { size: 14, className: "shrink-0", "aria-hidden": "true" }),
|
|
29061
|
+
/* @__PURE__ */ jsx24("span", { className: "shrink-0", children: "\u6A21\u578B" }),
|
|
29062
|
+
/* @__PURE__ */ jsx24(
|
|
29063
|
+
ModelSelector,
|
|
29064
|
+
{
|
|
29065
|
+
disabled: isModelLoading,
|
|
29066
|
+
value: selectedModel,
|
|
29067
|
+
onValueChange: model.selectModel,
|
|
29068
|
+
compact: true,
|
|
29069
|
+
placement: "top"
|
|
29070
|
+
}
|
|
29071
|
+
)
|
|
29072
|
+
] }) });
|
|
29073
|
+
const voiceControl = !isStreaming && !isCompacting && asrEnabled && (isRecording || isVoiceStarting || !hasComposerContent) ? /* @__PURE__ */ jsx24(
|
|
29074
|
+
"button",
|
|
29075
|
+
{
|
|
29076
|
+
type: "button",
|
|
29077
|
+
onClick: voice.toggle,
|
|
29078
|
+
"aria-label": isRecording || isVoiceStarting ? "\u505C\u6B62\u8BED\u97F3\u8F93\u5165" : "\u5F00\u59CB\u8BED\u97F3\u8F93\u5165",
|
|
29079
|
+
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",
|
|
29080
|
+
className: `flex h-9 w-9 shrink-0 items-center justify-center rounded-full transition-colors duration-150 disabled:opacity-40 ${isRecording ? "bg-[hsl(var(--swf-success-soft))] text-[hsl(var(--swf-success))]" : "text-[hsl(var(--muted-foreground))] hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--foreground))]"}`,
|
|
29081
|
+
children: isVoiceStarting ? /* @__PURE__ */ jsx24(LoaderCircle, { size: 18, className: "animate-spin" }) : isRecording ? /* @__PURE__ */ jsx24(VoiceWaveform, { level: voiceLevel, size: 18 }) : /* @__PURE__ */ jsx24(Mic, { size: 19, strokeWidth: 1.85 })
|
|
29082
|
+
}
|
|
29083
|
+
) : null;
|
|
29084
|
+
const customPlacement = hasCustomComposerPlacement(controlPlacement);
|
|
28991
29085
|
const hasMoreOptions = !lite;
|
|
28992
29086
|
const showQueueShortcut = Boolean(input.trim()) && !isSendDisabled && !isStopping && !isRecording && (!isStreaming || queueWhileRunning && !hasRunningSendBlockers());
|
|
28993
|
-
return /* @__PURE__ */
|
|
28994
|
-
/* @__PURE__ */ jsx24("div", { className: `px-5 pb-3 pt-0 ${className ?? ""}`, children: /* @__PURE__ */
|
|
28995
|
-
statusBarAddon || !lite && activeSessionId ? /* @__PURE__ */
|
|
29087
|
+
return /* @__PURE__ */ jsxs14(Fragment6, { children: [
|
|
29088
|
+
/* @__PURE__ */ jsx24("div", { className: `px-5 pb-3 pt-0 ${className ?? ""}`, children: /* @__PURE__ */ jsxs14("div", { className: `mx-auto ${maxWidthClassName} ${innerClassName ?? ""}`, children: [
|
|
29089
|
+
statusBarAddon || !lite && activeSessionId ? /* @__PURE__ */ jsxs14("div", { className: "mb-2 flex flex-wrap items-center gap-2 empty:mb-0", children: [
|
|
28996
29090
|
statusBarAddon,
|
|
28997
29091
|
!lite && activeSessionId ? /* @__PURE__ */ jsx24(BackgroundTasksPill, { sessionId: activeSessionId }) : null
|
|
28998
29092
|
] }) : null,
|
|
28999
|
-
(!isModelLoading || bannerModelPickerOpen) && !hasAvailableModel ? /* @__PURE__ */
|
|
29093
|
+
(!isModelLoading || bannerModelPickerOpen) && !hasAvailableModel ? /* @__PURE__ */ jsxs14("div", { className: "mb-2 flex items-center justify-between gap-3 rounded-xl border border-[hsl(var(--destructive))]/30 bg-[hsl(var(--destructive))]/8 px-3 py-1.5 text-xs text-[hsl(var(--destructive))]", children: [
|
|
29000
29094
|
/* @__PURE__ */ jsx24("span", { className: "min-w-0 flex-1 leading-5", children: modelAvailabilityMessage || "\u6A21\u578B\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u6216\u91CD\u65B0\u9009\u62E9\u6A21\u578B" }),
|
|
29001
29095
|
/* @__PURE__ */ jsx24(
|
|
29002
29096
|
ModelSelector,
|
|
@@ -29044,15 +29138,15 @@ ${append2.text}` : append2.text;
|
|
|
29044
29138
|
if (files.length > 0) void stableAppendFiles(files);
|
|
29045
29139
|
});
|
|
29046
29140
|
},
|
|
29047
|
-
children: /* @__PURE__ */
|
|
29141
|
+
children: /* @__PURE__ */ jsxs14(
|
|
29048
29142
|
"div",
|
|
29049
29143
|
{
|
|
29050
29144
|
className: `overflow-visible border bg-[hsl(var(--card))] transition-[box-shadow,border-color] duration-200 ${mergesWithPanelAbove ? "rounded-b-[28px]" : "rounded-[28px]"} ${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(var(--primary)/0.45)] shadow-[0_2px_16px_-4px_hsl(var(--foreground)/0.1)]" : "border-[hsl(var(--border)/0.85)] shadow-xs"}`,
|
|
29051
29145
|
children: [
|
|
29052
29146
|
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-[28px]" : "rounded-[28px]"}`, 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" }) }),
|
|
29053
29147
|
planPanel,
|
|
29054
|
-
composerAttachments.length > 0 && /* @__PURE__ */
|
|
29055
|
-
imageAttachments.length > 0 && /* @__PURE__ */ jsx24("div", { className: "grid grid-cols-3 gap-2", children: imageAttachments.map((attachment) => /* @__PURE__ */
|
|
29148
|
+
composerAttachments.length > 0 && /* @__PURE__ */ jsxs14(ComposerAttachmentViewport, { className: "flex flex-col gap-2 border-b border-[hsl(var(--border))] px-4 py-2", children: [
|
|
29149
|
+
imageAttachments.length > 0 && /* @__PURE__ */ jsx24("div", { className: "grid grid-cols-3 gap-2", children: imageAttachments.map((attachment) => /* @__PURE__ */ jsxs14(
|
|
29056
29150
|
"div",
|
|
29057
29151
|
{
|
|
29058
29152
|
className: "relative overflow-hidden rounded-xl border border-[hsl(var(--border))]",
|
|
@@ -29089,7 +29183,7 @@ ${append2.text}` : append2.text;
|
|
|
29089
29183
|
attachment.id
|
|
29090
29184
|
)) })
|
|
29091
29185
|
] }),
|
|
29092
|
-
hasPendingContexts || isSkillEditor ? /* @__PURE__ */
|
|
29186
|
+
hasPendingContexts || isSkillEditor ? /* @__PURE__ */ jsxs14("div", { className: "flex flex-wrap items-center gap-1.5 border-b border-[hsl(var(--border))] px-4 py-2", children: [
|
|
29093
29187
|
pendingContexts?.map((context) => /* @__PURE__ */ jsx24(
|
|
29094
29188
|
ComposerContextPill,
|
|
29095
29189
|
{
|
|
@@ -29131,8 +29225,8 @@ ${append2.text}` : append2.text;
|
|
|
29131
29225
|
),
|
|
29132
29226
|
attachments ? /* @__PURE__ */ jsx24("div", { className: "border-b border-[hsl(var(--border))] px-4 py-3", children: attachments }) : null,
|
|
29133
29227
|
slotAboveTextarea ? /* @__PURE__ */ jsx24("div", { className: "border-b border-[hsl(var(--border))] px-4 py-2", children: slotAboveTextarea }) : null,
|
|
29134
|
-
/* @__PURE__ */
|
|
29135
|
-
/* @__PURE__ */
|
|
29228
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-end gap-1.5 px-2.5 py-2", children: [
|
|
29229
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex shrink-0 items-center self-end", children: [
|
|
29136
29230
|
/* @__PURE__ */ jsx24(
|
|
29137
29231
|
"input",
|
|
29138
29232
|
{
|
|
@@ -29165,7 +29259,57 @@ ${append2.text}` : append2.text;
|
|
|
29165
29259
|
...{ webkitdirectory: "" }
|
|
29166
29260
|
}
|
|
29167
29261
|
),
|
|
29168
|
-
/* @__PURE__ */
|
|
29262
|
+
/* @__PURE__ */ jsx24(ComposerControls, { placement: controlPlacement, controls: {
|
|
29263
|
+
upload: /* @__PURE__ */ jsx24(ComposerControlMenu, { label: "\u4E0A\u4F20", icon: /* @__PURE__ */ jsx24(Paperclip, { size: 16 }), children: uploadControls }),
|
|
29264
|
+
reference: /* @__PURE__ */ jsxs14(ComposerControlMenu, { label: "\u5F15\u7528\u4E0E\u6280\u80FD", icon: /* @__PURE__ */ jsx24(Sparkles, { size: 16 }), children: [
|
|
29265
|
+
" ",
|
|
29266
|
+
/* @__PURE__ */ jsx24(
|
|
29267
|
+
ConnectButton,
|
|
29268
|
+
{
|
|
29269
|
+
variant: "submenu",
|
|
29270
|
+
sessionId: activeSessionId,
|
|
29271
|
+
open: connectMenuOpen,
|
|
29272
|
+
onOpenChange: (open) => {
|
|
29273
|
+
setConnectMenuOpen(open);
|
|
29274
|
+
if (open) setMoreOptionsOpen(false);
|
|
29275
|
+
}
|
|
29276
|
+
}
|
|
29277
|
+
),
|
|
29278
|
+
/* @__PURE__ */ jsx24("button", { type: "button", onClick: () => editor?.chain().focus().insertContent("@").run(), className: "block w-full rounded-lg px-3 py-2 text-left text-sm hover:bg-[hsl(var(--accent))]", children: "\u5F15\u7528\u6587\u4EF6" }),
|
|
29279
|
+
/* @__PURE__ */ jsx24("button", { type: "button", onClick: () => editor?.chain().focus().insertContent("/").run(), className: "block w-full rounded-lg px-3 py-2 text-left text-sm hover:bg-[hsl(var(--accent))]", children: "\u9009\u62E9\u6280\u80FD" })
|
|
29280
|
+
] }),
|
|
29281
|
+
mode: !lite ? /* @__PURE__ */ jsx24(ComposerControlMenu, { label: "\u6A21\u5F0F", icon: /* @__PURE__ */ jsx24(SlidersHorizontal, { size: 16 }), children: modeControls }) : null,
|
|
29282
|
+
model: modelControl,
|
|
29283
|
+
voice: voiceControl
|
|
29284
|
+
}, moreContent: !lite && (onCommand && canCreateBoardTask || activeSessionId) ? /* @__PURE__ */ jsxs14(Fragment6, { children: [
|
|
29285
|
+
onCommand && canCreateBoardTask ? /* @__PURE__ */ jsx24(dist_exports.Close, { asChild: true, children: /* @__PURE__ */ jsxs14(
|
|
29286
|
+
"button",
|
|
29287
|
+
{
|
|
29288
|
+
type: "button",
|
|
29289
|
+
onClick: () => {
|
|
29290
|
+
void onCommand("create_board_task");
|
|
29291
|
+
},
|
|
29292
|
+
className: "flex w-full items-center gap-2 rounded-lg px-3 py-2 text-left text-xs transition-colors hover:bg-[hsl(var(--accent))]",
|
|
29293
|
+
children: [
|
|
29294
|
+
/* @__PURE__ */ jsx24(ListPlus, { size: 14, className: "shrink-0" }),
|
|
29295
|
+
/* @__PURE__ */ jsx24("span", { children: "\u521B\u5EFA\u540E\u53F0\u4EFB\u52A1" })
|
|
29296
|
+
]
|
|
29297
|
+
}
|
|
29298
|
+
) }) : null,
|
|
29299
|
+
activeSessionId ? /* @__PURE__ */ jsxs14("div", { className: "border-t border-[hsl(var(--border))] px-3 py-2.5", children: [
|
|
29300
|
+
/* @__PURE__ */ jsx24(
|
|
29301
|
+
SkillStatusBarComponent,
|
|
29302
|
+
{
|
|
29303
|
+
sessionId: activeSessionId,
|
|
29304
|
+
onOpenSkills,
|
|
29305
|
+
vertical: true,
|
|
29306
|
+
className: skillStatusBarClassName,
|
|
29307
|
+
innerClassName: skillStatusBarInnerClassName
|
|
29308
|
+
}
|
|
29309
|
+
),
|
|
29310
|
+
composerHint ? /* @__PURE__ */ jsx24("div", { className: "mt-2 border-t border-[hsl(var(--border))] pt-2 text-[hsl(var(--muted-foreground))]", children: composerHint }) : null
|
|
29311
|
+
] }) : null
|
|
29312
|
+
] }) : null, children: /* @__PURE__ */ jsxs14(
|
|
29169
29313
|
dist_exports.Root,
|
|
29170
29314
|
{
|
|
29171
29315
|
open: actionMenuOpen,
|
|
@@ -29187,7 +29331,7 @@ ${append2.text}` : append2.text;
|
|
|
29187
29331
|
children: /* @__PURE__ */ jsx24(Plus, { size: 20, strokeWidth: 1.85 })
|
|
29188
29332
|
}
|
|
29189
29333
|
) }),
|
|
29190
|
-
/* @__PURE__ */ jsx24(dist_exports.Portal, { children: /* @__PURE__ */
|
|
29334
|
+
/* @__PURE__ */ jsx24(dist_exports.Portal, { children: /* @__PURE__ */ jsxs14(
|
|
29191
29335
|
dist_exports.Content,
|
|
29192
29336
|
{
|
|
29193
29337
|
side: "top",
|
|
@@ -29195,36 +29339,7 @@ ${append2.text}` : append2.text;
|
|
|
29195
29339
|
sideOffset: 8,
|
|
29196
29340
|
className: "z-30 w-[min(240px,calc(100vw-2rem))] origin-(--radix-popover-content-transform-origin) overflow-visible rounded-2xl border border-[hsl(var(--border))] bg-[hsl(var(--popover))] p-1.5 text-sm 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",
|
|
29197
29341
|
children: [
|
|
29198
|
-
|
|
29199
|
-
"button",
|
|
29200
|
-
{
|
|
29201
|
-
type: "button",
|
|
29202
|
-
onClick: () => {
|
|
29203
|
-
setActionMenuOpen(false);
|
|
29204
|
-
fileInputRef.current?.click();
|
|
29205
|
-
},
|
|
29206
|
-
className: "flex w-full items-center gap-2 rounded-lg px-3 py-2.5 text-left text-sm transition-colors hover:bg-[hsl(var(--accent))]",
|
|
29207
|
-
children: [
|
|
29208
|
-
/* @__PURE__ */ jsx24(Paperclip, { size: 16 }),
|
|
29209
|
-
"\u4E0A\u4F20\u6587\u4EF6"
|
|
29210
|
-
]
|
|
29211
|
-
}
|
|
29212
|
-
),
|
|
29213
|
-
/* @__PURE__ */ jsxs13(
|
|
29214
|
-
"button",
|
|
29215
|
-
{
|
|
29216
|
-
type: "button",
|
|
29217
|
-
onClick: () => {
|
|
29218
|
-
setActionMenuOpen(false);
|
|
29219
|
-
folderInputRef.current?.click();
|
|
29220
|
-
},
|
|
29221
|
-
className: "flex w-full items-center gap-2 rounded-lg px-3 py-2.5 text-left text-sm transition-colors hover:bg-[hsl(var(--accent))]",
|
|
29222
|
-
children: [
|
|
29223
|
-
/* @__PURE__ */ jsx24(FolderUp, { size: 16 }),
|
|
29224
|
-
"\u4E0A\u4F20\u6587\u4EF6\u5939"
|
|
29225
|
-
]
|
|
29226
|
-
}
|
|
29227
|
-
),
|
|
29342
|
+
uploadControls,
|
|
29228
29343
|
/* @__PURE__ */ jsx24(
|
|
29229
29344
|
ConnectButton,
|
|
29230
29345
|
{
|
|
@@ -29237,7 +29352,7 @@ ${append2.text}` : append2.text;
|
|
|
29237
29352
|
}
|
|
29238
29353
|
}
|
|
29239
29354
|
),
|
|
29240
|
-
hasMoreOptions ? /* @__PURE__ */
|
|
29355
|
+
hasMoreOptions ? /* @__PURE__ */ jsxs14(Fragment6, { children: [
|
|
29241
29356
|
/* @__PURE__ */ jsx24("div", { className: "my-1 h-px bg-[hsl(var(--border)/0.75)]" }),
|
|
29242
29357
|
/* @__PURE__ */ jsx24(
|
|
29243
29358
|
InputActionSubmenu,
|
|
@@ -29249,8 +29364,8 @@ ${append2.text}` : append2.text;
|
|
|
29249
29364
|
setMoreOptionsOpen(open);
|
|
29250
29365
|
if (open) setConnectMenuOpen(false);
|
|
29251
29366
|
},
|
|
29252
|
-
children: /* @__PURE__ */
|
|
29253
|
-
onCommand && canCreateBoardTask && !lite ? /* @__PURE__ */
|
|
29367
|
+
children: /* @__PURE__ */ jsxs14("div", { className: "flex flex-col gap-0.5 py-0.5 text-xs", children: [
|
|
29368
|
+
onCommand && canCreateBoardTask && !lite ? /* @__PURE__ */ jsxs14(
|
|
29254
29369
|
"button",
|
|
29255
29370
|
{
|
|
29256
29371
|
type: "button",
|
|
@@ -29266,43 +29381,9 @@ ${append2.text}` : append2.text;
|
|
|
29266
29381
|
]
|
|
29267
29382
|
}
|
|
29268
29383
|
) : null,
|
|
29269
|
-
|
|
29270
|
-
|
|
29271
|
-
|
|
29272
|
-
enabled: isPlanning,
|
|
29273
|
-
onChange: () => {
|
|
29274
|
-
setMoreOptionsOpen(false);
|
|
29275
|
-
setActionMenuOpen(false);
|
|
29276
|
-
onToggleMode();
|
|
29277
|
-
},
|
|
29278
|
-
disabled: isBusy
|
|
29279
|
-
}
|
|
29280
|
-
) : null,
|
|
29281
|
-
thinkingAvailable && reasoningLevels.length > 0 ? /* @__PURE__ */ jsx24(
|
|
29282
|
-
ReasoningModeSelect,
|
|
29283
|
-
{
|
|
29284
|
-
level: selectedReasoningLevel,
|
|
29285
|
-
levels: reasoningLevels,
|
|
29286
|
-
disabled: isCompacting,
|
|
29287
|
-
disabledReason: developer ? "\u5BF9\u8BDD\u6574\u7406\u5B8C\u6210\u540E\u53EF\u8C03\u6574" : "\u5904\u7406\u5B8C\u6210\u540E\u53EF\u8C03\u6574",
|
|
29288
|
-
onChange: model.setReasoningLevel
|
|
29289
|
-
}
|
|
29290
|
-
) : null,
|
|
29291
|
-
/* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-2 rounded-lg px-3 py-2", children: [
|
|
29292
|
-
/* @__PURE__ */ jsx24(Sparkles, { size: 14, className: "shrink-0", "aria-hidden": "true" }),
|
|
29293
|
-
/* @__PURE__ */ jsx24("span", { className: "shrink-0", children: "\u6A21\u578B" }),
|
|
29294
|
-
/* @__PURE__ */ jsx24(
|
|
29295
|
-
ModelSelector,
|
|
29296
|
-
{
|
|
29297
|
-
disabled: isModelLoading,
|
|
29298
|
-
value: selectedModel,
|
|
29299
|
-
onValueChange: model.selectModel,
|
|
29300
|
-
compact: true,
|
|
29301
|
-
placement: "top"
|
|
29302
|
-
}
|
|
29303
|
-
)
|
|
29304
|
-
] }),
|
|
29305
|
-
activeSessionId && moreOptionsOpen ? /* @__PURE__ */ jsxs13("div", { className: "border-t border-[hsl(var(--border))] px-3 py-2.5", children: [
|
|
29384
|
+
modeControls,
|
|
29385
|
+
modelControl,
|
|
29386
|
+
activeSessionId && moreOptionsOpen ? /* @__PURE__ */ jsxs14("div", { className: "border-t border-[hsl(var(--border))] px-3 py-2.5", children: [
|
|
29306
29387
|
/* @__PURE__ */ jsx24(
|
|
29307
29388
|
SkillStatusBarComponent,
|
|
29308
29389
|
{
|
|
@@ -29324,30 +29405,20 @@ ${append2.text}` : append2.text;
|
|
|
29324
29405
|
) })
|
|
29325
29406
|
]
|
|
29326
29407
|
}
|
|
29327
|
-
)
|
|
29408
|
+
) })
|
|
29328
29409
|
] }),
|
|
29329
|
-
/* @__PURE__ */
|
|
29410
|
+
/* @__PURE__ */ jsxs14("div", { className: "relative min-w-0 flex-1 self-center", children: [
|
|
29330
29411
|
input.length === 0 && /* @__PURE__ */ jsx24("div", { className: "pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 select-none truncate text-[15px] leading-6 text-[hsl(var(--muted-foreground)/0.65)]", children: placeholder }),
|
|
29331
29412
|
/* @__PURE__ */ jsx24(EditorContent, { editor })
|
|
29332
29413
|
] }),
|
|
29333
|
-
/* @__PURE__ */
|
|
29334
|
-
showQueueShortcut && /* @__PURE__ */
|
|
29414
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex shrink-0 items-center gap-1.5 self-end", children: [
|
|
29415
|
+
showQueueShortcut && /* @__PURE__ */ jsxs14("span", { className: "mr-1 hidden text-[11px] text-[hsl(var(--muted-foreground))] sm:inline", children: [
|
|
29335
29416
|
queueShortcutLabel(),
|
|
29336
29417
|
" \xB7 \u6392\u961F\u6D88\u606F"
|
|
29337
29418
|
] }),
|
|
29338
29419
|
slotBeforeSend,
|
|
29339
|
-
!
|
|
29340
|
-
|
|
29341
|
-
{
|
|
29342
|
-
type: "button",
|
|
29343
|
-
onClick: voice.toggle,
|
|
29344
|
-
"aria-label": isRecording || isVoiceStarting ? "\u505C\u6B62\u8BED\u97F3\u8F93\u5165" : "\u5F00\u59CB\u8BED\u97F3\u8F93\u5165",
|
|
29345
|
-
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",
|
|
29346
|
-
className: `flex h-9 w-9 shrink-0 items-center justify-center rounded-full transition-colors duration-150 disabled:opacity-40 ${isRecording ? "bg-[hsl(var(--swf-success-soft))] text-[hsl(var(--swf-success))]" : "text-[hsl(var(--muted-foreground))] hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--foreground))]"}`,
|
|
29347
|
-
children: isVoiceStarting ? /* @__PURE__ */ jsx24(LoaderCircle, { size: 18, className: "animate-spin" }) : isRecording ? /* @__PURE__ */ jsx24(VoiceWaveform, { level: voiceLevel, size: 18 }) : /* @__PURE__ */ jsx24(Mic, { size: 19, strokeWidth: 1.85 })
|
|
29348
|
-
}
|
|
29349
|
-
) : null,
|
|
29350
|
-
isStreaming ? /* @__PURE__ */ jsxs13(Fragment6, { children: [
|
|
29420
|
+
!customPlacement ? voiceControl : null,
|
|
29421
|
+
isStreaming ? /* @__PURE__ */ jsxs14(Fragment6, { children: [
|
|
29351
29422
|
submitWhileRunning && hasComposerContent && !isSendDisabled && !isRecording ? /* @__PURE__ */ jsx24(
|
|
29352
29423
|
"button",
|
|
29353
29424
|
{
|
|
@@ -29382,7 +29453,7 @@ ${append2.text}` : append2.text;
|
|
|
29382
29453
|
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-[hsl(var(--primary)/0.22)] text-[hsl(var(--primary))] opacity-70",
|
|
29383
29454
|
children: /* @__PURE__ */ jsx24(LoaderCircle, { size: 16, className: "animate-spin" })
|
|
29384
29455
|
}
|
|
29385
|
-
) : canContinueGeneration ? /* @__PURE__ */
|
|
29456
|
+
) : canContinueGeneration ? /* @__PURE__ */ jsxs14(
|
|
29386
29457
|
"button",
|
|
29387
29458
|
{
|
|
29388
29459
|
type: "button",
|
|
@@ -29435,7 +29506,7 @@ ${append2.text}` : append2.text;
|
|
|
29435
29506
|
|
|
29436
29507
|
// src/rich-input/SkillActionMenu.tsx
|
|
29437
29508
|
import { useEffect as useEffect10, useState as useState12 } from "react";
|
|
29438
|
-
import { Fragment as Fragment7, jsx as jsx25, jsxs as
|
|
29509
|
+
import { Fragment as Fragment7, jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
29439
29510
|
function SkillActionMenu({ open, onOpenChange, renderMode, onSelect, onManage, disabled }) {
|
|
29440
29511
|
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 }) });
|
|
29441
29512
|
}
|
|
@@ -29455,12 +29526,12 @@ function SkillPicker({ renderMode, onSelect, onManage }) {
|
|
|
29455
29526
|
active = false;
|
|
29456
29527
|
};
|
|
29457
29528
|
}, [client, renderMode, query]);
|
|
29458
|
-
return /* @__PURE__ */
|
|
29459
|
-
/* @__PURE__ */
|
|
29529
|
+
return /* @__PURE__ */ jsxs15(Fragment7, { children: [
|
|
29530
|
+
/* @__PURE__ */ jsxs15("label", { className: "m-1 flex items-center gap-2 rounded-lg bg-[hsl(var(--muted))] px-3 py-2", children: [
|
|
29460
29531
|
/* @__PURE__ */ jsx25(Search, { size: 14, "aria-hidden": "true" }),
|
|
29461
29532
|
/* @__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" })
|
|
29462
29533
|
] }),
|
|
29463
|
-
/* @__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__ */
|
|
29534
|
+
/* @__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__ */ jsxs15("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: [
|
|
29464
29535
|
/* @__PURE__ */ jsx25("span", { children: skillDisplayName(skill) }),
|
|
29465
29536
|
/* @__PURE__ */ jsx25("span", { className: "line-clamp-2 text-[11px] text-[hsl(var(--muted-foreground))]", children: skill.description })
|
|
29466
29537
|
] }, skill.skillId) : null) : /* @__PURE__ */ jsx25("p", { className: "px-3 py-2 text-[hsl(var(--muted-foreground))]", children: "\u6CA1\u6709\u5339\u914D\u7684\u6280\u80FD" }) }),
|
|
@@ -29474,6 +29545,8 @@ export {
|
|
|
29474
29545
|
BackgroundTasksPill,
|
|
29475
29546
|
ChatInput,
|
|
29476
29547
|
ComposerAttachmentViewport,
|
|
29548
|
+
ComposerControlMenu,
|
|
29549
|
+
ComposerControls,
|
|
29477
29550
|
ConnectButton,
|
|
29478
29551
|
FileCompletionMenu,
|
|
29479
29552
|
FileMention,
|
|
@@ -29522,6 +29595,7 @@ export {
|
|
|
29522
29595
|
getTopicAssetSuggestionItems,
|
|
29523
29596
|
getUnsupportedImageFiles,
|
|
29524
29597
|
getUserHomeSuggestionItems,
|
|
29598
|
+
hasCustomComposerPlacement,
|
|
29525
29599
|
installSuggestionOutsideDismiss,
|
|
29526
29600
|
invalidateSlashSuggestions,
|
|
29527
29601
|
isImageFile,
|