@blade-hq/agent-react 2610.0.0-beta.66 → 2610.0.0-beta.68
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 +7 -1
- package/dist/components/ChatInput.d.ts +8 -1
- package/dist/components/ChatSurface.d.ts +9 -1
- package/dist/components/SessionQueuePanel.d.ts +46 -1
- package/dist/components/queue-panel-adjacency.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +345 -285
- package/dist/index.js.map +1 -1
- package/dist/style.css +19 -3
- package/dist/style.full.css +20 -4
- package/package.json +2 -2
- package/public-api.md +12 -2
package/dist/index.js
CHANGED
|
@@ -16635,7 +16635,7 @@ import {
|
|
|
16635
16635
|
queuePauseReasonLabel,
|
|
16636
16636
|
queuedMessageStatusLabel
|
|
16637
16637
|
} from "@blade-hq/agent-client";
|
|
16638
|
-
import { useRef as useRef12, useState as useState18 } from "react";
|
|
16638
|
+
import { useContext as useContext3, useLayoutEffect, useRef as useRef12, useState as useState18 } from "react";
|
|
16639
16639
|
|
|
16640
16640
|
// src/lib/utils.ts
|
|
16641
16641
|
function cn(...inputs) {
|
|
@@ -16666,8 +16666,17 @@ async function copyToClipboard(text) {
|
|
|
16666
16666
|
}
|
|
16667
16667
|
}
|
|
16668
16668
|
|
|
16669
|
+
// src/components/queue-panel-adjacency.ts
|
|
16670
|
+
import { createContext as createContext3 } from "react";
|
|
16671
|
+
var QueuePanelAdjacencyContext = createContext3(null);
|
|
16672
|
+
|
|
16669
16673
|
// src/components/SessionQueuePanel.tsx
|
|
16670
16674
|
import { Fragment as Fragment4, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
16675
|
+
var QUEUE_INSET_CLASS = "mx-3";
|
|
16676
|
+
function isQueuePanelVisible(snapshot, notice, editing = false) {
|
|
16677
|
+
return snapshot.items.length > 0 || snapshot.paused || Boolean(notice) || editing;
|
|
16678
|
+
}
|
|
16679
|
+
var DEFAULT_CONTENT_WIDTH_CLASS = "max-w-[748px]";
|
|
16671
16680
|
var ICON_BUTTON = "flex h-6 w-6 items-center justify-center rounded-md text-[hsl(var(--muted-foreground))] transition-colors hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--foreground))] disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent";
|
|
16672
16681
|
var LABEL_BUTTON = "inline-flex h-6 items-center gap-1 rounded-md px-2 text-[11px] text-[hsl(var(--muted-foreground))] transition-colors hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--foreground))] disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent";
|
|
16673
16682
|
function SessionQueuePanel({
|
|
@@ -16681,7 +16690,11 @@ function SessionQueuePanel({
|
|
|
16681
16690
|
onRequeue,
|
|
16682
16691
|
onMove,
|
|
16683
16692
|
onReorder,
|
|
16684
|
-
onDeliver
|
|
16693
|
+
onDeliver,
|
|
16694
|
+
contentWidthClassName = DEFAULT_CONTENT_WIDTH_CLASS,
|
|
16695
|
+
rootClassName,
|
|
16696
|
+
onVisibleChange,
|
|
16697
|
+
mergesWithInputBelow: mergesWithInputBelowProp
|
|
16685
16698
|
}) {
|
|
16686
16699
|
const [collapsed, setCollapsed] = useState18(false);
|
|
16687
16700
|
const [editing, setEditing] = useState18(null);
|
|
@@ -16691,8 +16704,17 @@ function SessionQueuePanel({
|
|
|
16691
16704
|
const dropRef = useRef12(null);
|
|
16692
16705
|
const requeuePending = useRef12(false);
|
|
16693
16706
|
const [requeueing, setRequeueing] = useState18(false);
|
|
16707
|
+
const adjacency = useContext3(QueuePanelAdjacencyContext);
|
|
16708
|
+
const mergesWithInputBelow = mergesWithInputBelowProp ?? adjacency ?? true;
|
|
16694
16709
|
const items = snapshot.items;
|
|
16695
|
-
|
|
16710
|
+
const visible = isQueuePanelVisible(snapshot, notice, Boolean(editing));
|
|
16711
|
+
const onVisibleChangeRef = useRef12(onVisibleChange);
|
|
16712
|
+
onVisibleChangeRef.current = onVisibleChange;
|
|
16713
|
+
useLayoutEffect(() => {
|
|
16714
|
+
onVisibleChangeRef.current?.(visible);
|
|
16715
|
+
return () => onVisibleChangeRef.current?.(false);
|
|
16716
|
+
}, [visible]);
|
|
16717
|
+
if (!visible) return null;
|
|
16696
16718
|
const pendingIds = items.filter(canEditQueuedMessage).map((item) => item.id);
|
|
16697
16719
|
const collapsible = items.length > 3;
|
|
16698
16720
|
const visibleItems = collapsible && collapsed ? items.slice(0, 1) : items;
|
|
@@ -16733,258 +16755,276 @@ function SessionQueuePanel({
|
|
|
16733
16755
|
next.splice(edge === "after" ? target + 1 : target, 0, sourceId);
|
|
16734
16756
|
onReorder(next);
|
|
16735
16757
|
};
|
|
16736
|
-
return
|
|
16737
|
-
|
|
16738
|
-
|
|
16739
|
-
|
|
16740
|
-
|
|
16741
|
-
|
|
16742
|
-
|
|
16743
|
-
|
|
16744
|
-
|
|
16745
|
-
|
|
16758
|
+
return (
|
|
16759
|
+
// 外层左右留白必须跟输入框一致:两边各自 mx-auto 居中,padding 不同的话
|
|
16760
|
+
// 即使 max-width 相同也会整体错开,看起来就是"没对齐"。
|
|
16761
|
+
// 用变量而不是写死 px:SDK 输入框用 --blade-chat-gutter(默认 1rem,
|
|
16762
|
+
// 容器查询下还会变),内置 Web 输入框外层是 px-5(20px);调用方按
|
|
16763
|
+
// .blade-chat-queue 覆盖 --blade-chat-queue-gutter 即可对齐,两边共用
|
|
16764
|
+
// 同一套机制。
|
|
16765
|
+
/* @__PURE__ */ jsx7("section", { className: cn("blade-chat-queue shrink-0 pt-2", rootClassName), "aria-label": "\u5F85\u6267\u884C\u6D88\u606F", children: /* @__PURE__ */ jsxs5("div", { className: cn("mx-auto", contentWidthClassName), children: [
|
|
16766
|
+
snapshot.paused || collapsible ? /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-2 px-0.5 text-[11px] text-[hsl(var(--muted-foreground))]", children: [
|
|
16767
|
+
/* @__PURE__ */ jsxs5("span", { className: "font-medium", children: [
|
|
16768
|
+
"\u5F85\u6267\u884C \xB7 ",
|
|
16769
|
+
items.length
|
|
16746
16770
|
] }),
|
|
16747
|
-
/* @__PURE__ */
|
|
16771
|
+
snapshot.paused && /* @__PURE__ */ jsxs5(Fragment4, { children: [
|
|
16772
|
+
/* @__PURE__ */ jsxs5("span", { className: "inline-flex items-center gap-1 text-[hsl(var(--destructive))]", children: [
|
|
16773
|
+
/* @__PURE__ */ jsx7(CirclePause, { size: 12 }),
|
|
16774
|
+
pauseLabel
|
|
16775
|
+
] }),
|
|
16776
|
+
/* @__PURE__ */ jsx7(
|
|
16777
|
+
"button",
|
|
16778
|
+
{
|
|
16779
|
+
type: "button",
|
|
16780
|
+
onClick: onResume,
|
|
16781
|
+
className: "h-6 rounded-md border border-[hsl(var(--border))] px-2 font-medium text-[hsl(var(--foreground))] transition-colors hover:bg-[hsl(var(--accent))]",
|
|
16782
|
+
children: "\u7EE7\u7EED\u6267\u884C"
|
|
16783
|
+
}
|
|
16784
|
+
)
|
|
16785
|
+
] }),
|
|
16786
|
+
collapsible && /* @__PURE__ */ jsxs5(
|
|
16748
16787
|
"button",
|
|
16749
16788
|
{
|
|
16750
16789
|
type: "button",
|
|
16751
|
-
onClick:
|
|
16752
|
-
|
|
16753
|
-
|
|
16790
|
+
onClick: () => setCollapsed((value) => !value),
|
|
16791
|
+
"aria-expanded": !collapsed,
|
|
16792
|
+
className: "ml-auto inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 transition-colors hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--foreground))]",
|
|
16793
|
+
children: [
|
|
16794
|
+
collapsed ? "\u5C55\u5F00" : "\u6298\u53E0",
|
|
16795
|
+
/* @__PURE__ */ jsx7(ChevronDown, { size: 12, className: cn(!collapsed && "rotate-180") })
|
|
16796
|
+
]
|
|
16754
16797
|
}
|
|
16755
16798
|
)
|
|
16799
|
+
] }) : null,
|
|
16800
|
+
notice && /* @__PURE__ */ jsxs5("div", { className: "blade-chat-queue-notice mt-2 flex items-start gap-1.5 text-xs text-[hsl(var(--destructive))]", children: [
|
|
16801
|
+
/* @__PURE__ */ jsx7(CircleAlert, { size: 13, className: "mt-0.5 shrink-0" }),
|
|
16802
|
+
/* @__PURE__ */ jsx7("span", { className: "min-w-0 whitespace-pre-wrap break-words [overflow-wrap:anywhere]", children: notice })
|
|
16756
16803
|
] }),
|
|
16757
|
-
|
|
16758
|
-
"
|
|
16759
|
-
|
|
16760
|
-
|
|
16761
|
-
|
|
16762
|
-
|
|
16763
|
-
|
|
16764
|
-
|
|
16765
|
-
|
|
16766
|
-
|
|
16767
|
-
]
|
|
16768
|
-
}
|
|
16769
|
-
)
|
|
16770
|
-
] }) : null,
|
|
16771
|
-
notice && /* @__PURE__ */ jsxs5("div", { className: "blade-chat-queue-notice mt-2 flex items-start gap-1.5 text-xs text-[hsl(var(--destructive))]", children: [
|
|
16772
|
-
/* @__PURE__ */ jsx7(CircleAlert, { size: 13, className: "mt-0.5 shrink-0" }),
|
|
16773
|
-
/* @__PURE__ */ jsx7("span", { className: "min-w-0 whitespace-pre-wrap break-words [overflow-wrap:anywhere]", children: notice })
|
|
16774
|
-
] }),
|
|
16775
|
-
detachedEdit && /* @__PURE__ */ jsxs5("div", { className: "mt-2 flex flex-col gap-2 text-xs", children: [
|
|
16776
|
-
/* @__PURE__ */ jsx7("span", { children: "\u539F\u6D88\u606F\u5DF2\u53D8\u5316\uFF0C\u4FEE\u6539\u5185\u5BB9\u5DF2\u4FDD\u7559" }),
|
|
16777
|
-
/* @__PURE__ */ jsx7(
|
|
16778
|
-
"textarea",
|
|
16779
|
-
{
|
|
16780
|
-
"aria-label": "\u4FDD\u7559\u7684\u4FEE\u6539\u5185\u5BB9",
|
|
16781
|
-
value: detachedEdit.text,
|
|
16782
|
-
onChange: (event) => setEditing((current) => current ? { ...current, text: event.target.value } : current),
|
|
16783
|
-
rows: 2,
|
|
16784
|
-
className: "w-full rounded border border-[hsl(var(--border))] bg-transparent p-2"
|
|
16785
|
-
}
|
|
16786
|
-
),
|
|
16787
|
-
/* @__PURE__ */ jsxs5("div", { className: "flex justify-end gap-2", children: [
|
|
16788
|
-
/* @__PURE__ */ jsx7("button", { type: "button", className: "rounded border border-[hsl(var(--border))] px-2 py-1", disabled: requeueing, onClick: stopEdit, children: "\u653E\u5F03\u4FEE\u6539" }),
|
|
16789
|
-
onRequeue && /* @__PURE__ */ jsx7("button", { type: "button", className: "rounded bg-[hsl(var(--primary))] px-2 py-1 text-[hsl(var(--primary-foreground))] disabled:opacity-40", disabled: requeueing || !detachedEdit.text.trim(), onClick: async () => {
|
|
16790
|
-
if (requeuePending.current) return;
|
|
16791
|
-
requeuePending.current = true;
|
|
16792
|
-
setRequeueing(true);
|
|
16793
|
-
const submitted = editing;
|
|
16794
|
-
try {
|
|
16795
|
-
if (await onRequeue(detachedEdit.text.trim())) {
|
|
16796
|
-
setEditing((current) => current === submitted ? null : current);
|
|
16797
|
-
}
|
|
16798
|
-
} finally {
|
|
16799
|
-
requeuePending.current = false;
|
|
16800
|
-
setRequeueing(false);
|
|
16804
|
+
detachedEdit && /* @__PURE__ */ jsxs5("div", { className: "mt-2 flex flex-col gap-2 text-xs", children: [
|
|
16805
|
+
/* @__PURE__ */ jsx7("span", { children: "\u539F\u6D88\u606F\u5DF2\u53D8\u5316\uFF0C\u4FEE\u6539\u5185\u5BB9\u5DF2\u4FDD\u7559" }),
|
|
16806
|
+
/* @__PURE__ */ jsx7(
|
|
16807
|
+
"textarea",
|
|
16808
|
+
{
|
|
16809
|
+
"aria-label": "\u4FDD\u7559\u7684\u4FEE\u6539\u5185\u5BB9",
|
|
16810
|
+
value: detachedEdit.text,
|
|
16811
|
+
onChange: (event) => setEditing((current) => current ? { ...current, text: event.target.value } : current),
|
|
16812
|
+
rows: 2,
|
|
16813
|
+
className: "w-full rounded border border-[hsl(var(--border))] bg-transparent p-2"
|
|
16801
16814
|
}
|
|
16802
|
-
|
|
16803
|
-
|
|
16804
|
-
|
|
16805
|
-
|
|
16806
|
-
|
|
16807
|
-
|
|
16808
|
-
|
|
16809
|
-
|
|
16810
|
-
|
|
16811
|
-
|
|
16812
|
-
|
|
16813
|
-
|
|
16814
|
-
|
|
16815
|
-
|
|
16816
|
-
|
|
16817
|
-
onDragStart: (event) => {
|
|
16818
|
-
draggingRef.current = item.id;
|
|
16819
|
-
setDraggingId(item.id);
|
|
16820
|
-
const text = event.currentTarget.querySelector("[data-queue-text]");
|
|
16821
|
-
if (text && event.dataTransfer) {
|
|
16822
|
-
const rect = text.getBoundingClientRect();
|
|
16823
|
-
event.dataTransfer.setDragImage(
|
|
16824
|
-
text,
|
|
16825
|
-
event.clientX - rect.left,
|
|
16826
|
-
event.clientY - rect.top
|
|
16827
|
-
);
|
|
16815
|
+
),
|
|
16816
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex justify-end gap-2", children: [
|
|
16817
|
+
/* @__PURE__ */ jsx7("button", { type: "button", className: "rounded border border-[hsl(var(--border))] px-2 py-1", disabled: requeueing, onClick: stopEdit, children: "\u653E\u5F03\u4FEE\u6539" }),
|
|
16818
|
+
onRequeue && /* @__PURE__ */ jsx7("button", { type: "button", className: "rounded bg-[hsl(var(--primary))] px-2 py-1 text-[hsl(var(--primary-foreground))] disabled:opacity-40", disabled: requeueing || !detachedEdit.text.trim(), onClick: async () => {
|
|
16819
|
+
if (requeuePending.current) return;
|
|
16820
|
+
requeuePending.current = true;
|
|
16821
|
+
setRequeueing(true);
|
|
16822
|
+
const submitted = editing;
|
|
16823
|
+
try {
|
|
16824
|
+
if (await onRequeue(detachedEdit.text.trim())) {
|
|
16825
|
+
setEditing((current) => current === submitted ? null : current);
|
|
16826
|
+
}
|
|
16827
|
+
} finally {
|
|
16828
|
+
requeuePending.current = false;
|
|
16829
|
+
setRequeueing(false);
|
|
16828
16830
|
}
|
|
16829
|
-
},
|
|
16830
|
-
|
|
16831
|
-
|
|
16832
|
-
|
|
16833
|
-
|
|
16834
|
-
|
|
16835
|
-
},
|
|
16836
|
-
onDragOver: (event) => {
|
|
16837
|
-
if (!pending) return;
|
|
16838
|
-
event.preventDefault();
|
|
16839
|
-
if (!draggingRef.current || draggingRef.current === item.id) return;
|
|
16840
|
-
const rect = event.currentTarget.getBoundingClientRect();
|
|
16841
|
-
const edge = event.clientY > rect.top + rect.height / 2 ? "after" : "before";
|
|
16842
|
-
dropRef.current = { id: item.id, edge };
|
|
16843
|
-
setDropAt(
|
|
16844
|
-
(current) => current?.id === item.id && current.edge === edge ? current : { id: item.id, edge }
|
|
16845
|
-
);
|
|
16846
|
-
},
|
|
16847
|
-
onDragLeave: () => {
|
|
16848
|
-
if (dropRef.current?.id === item.id) dropRef.current = null;
|
|
16849
|
-
setDropAt((current) => current?.id === item.id ? null : current);
|
|
16850
|
-
},
|
|
16851
|
-
onDrop: (event) => {
|
|
16852
|
-
event.preventDefault();
|
|
16853
|
-
const landed = dropRef.current;
|
|
16854
|
-
if (pending) handleDrop(item.id, landed?.id === item.id ? landed.edge : "before");
|
|
16855
|
-
},
|
|
16831
|
+
}, children: "\u4F5C\u4E3A\u65B0\u6D88\u606F\u6392\u961F" })
|
|
16832
|
+
] })
|
|
16833
|
+
] }),
|
|
16834
|
+
/* @__PURE__ */ jsx7(
|
|
16835
|
+
"ul",
|
|
16836
|
+
{
|
|
16856
16837
|
className: cn(
|
|
16857
|
-
|
|
16858
|
-
|
|
16859
|
-
|
|
16860
|
-
draggingId === item.id && "opacity-40"
|
|
16838
|
+
QUEUE_INSET_CLASS,
|
|
16839
|
+
"flex max-h-56 flex-col overflow-y-auto rounded-t-[22px] border border-[hsl(var(--border))] bg-[hsl(var(--card))] px-1.5 py-1.5",
|
|
16840
|
+
!mergesWithInputBelow && "rounded-b-[22px]"
|
|
16861
16841
|
),
|
|
16862
|
-
children:
|
|
16863
|
-
|
|
16864
|
-
|
|
16842
|
+
children: visibleItems.map((item) => {
|
|
16843
|
+
const position = items.indexOf(item) + 1;
|
|
16844
|
+
const pending = canEditQueuedMessage(item);
|
|
16845
|
+
const busy = pendingItemId === item.id;
|
|
16846
|
+
const isEditing = activeEdit?.id === item.id;
|
|
16847
|
+
const pendingIndex = pendingIds.indexOf(item.id);
|
|
16848
|
+
const statusLabel = item.status === "pending" ? null : queuedMessageStatusLabel(item.status);
|
|
16849
|
+
const deliverable = canDeliver && canDeliverQueuedMessage(item);
|
|
16850
|
+
return /* @__PURE__ */ jsx7(
|
|
16851
|
+
"li",
|
|
16865
16852
|
{
|
|
16866
|
-
|
|
16867
|
-
|
|
16868
|
-
|
|
16869
|
-
|
|
16870
|
-
|
|
16871
|
-
|
|
16872
|
-
|
|
16873
|
-
|
|
16874
|
-
|
|
16875
|
-
|
|
16876
|
-
|
|
16877
|
-
|
|
16878
|
-
|
|
16879
|
-
|
|
16880
|
-
|
|
16881
|
-
|
|
16882
|
-
|
|
16883
|
-
|
|
16884
|
-
|
|
16885
|
-
|
|
16886
|
-
|
|
16887
|
-
|
|
16888
|
-
type: "button",
|
|
16889
|
-
onClick: () => commitEdit(item),
|
|
16890
|
-
disabled: busy || !activeEdit?.text.trim(),
|
|
16891
|
-
className: "h-7 rounded-md bg-[hsl(var(--primary))] px-2 text-xs font-medium text-[hsl(var(--primary-foreground))] transition-opacity hover:opacity-90 disabled:opacity-40",
|
|
16892
|
-
children: "\u4FDD\u5B58"
|
|
16893
|
-
}
|
|
16894
|
-
)
|
|
16895
|
-
] })
|
|
16896
|
-
] }) : /* @__PURE__ */ jsxs5(Fragment4, { children: [
|
|
16897
|
-
dropAt?.id === item.id ? /* @__PURE__ */ jsx7(
|
|
16898
|
-
"span",
|
|
16899
|
-
{
|
|
16900
|
-
"aria-hidden": "true",
|
|
16901
|
-
style: { background: "var(--resize-line-hover, hsl(var(--foreground) / 0.55))" },
|
|
16902
|
-
className: cn(
|
|
16903
|
-
"pointer-events-none absolute inset-x-1 h-[2px] rounded-full",
|
|
16904
|
-
dropAt.edge === "before" ? "top-0" : "bottom-0"
|
|
16905
|
-
)
|
|
16906
|
-
}
|
|
16907
|
-
) : null,
|
|
16908
|
-
/* @__PURE__ */ jsx7(
|
|
16909
|
-
"button",
|
|
16910
|
-
{
|
|
16911
|
-
type: "button",
|
|
16912
|
-
disabled: !pending || busy,
|
|
16913
|
-
"aria-label": `\u8C03\u6574\u7B2C ${position} \u6761\u7684\u987A\u5E8F\uFF08\u62D6\u52A8\uFF0C\u6216\u6309 Alt+\u4E0A/\u4E0B\uFF09`,
|
|
16914
|
-
title: "\u62D6\u52A8\u8C03\u6574\u987A\u5E8F\uFF08Alt+\u4E0A/\u4E0B \u4E5F\u884C\uFF09",
|
|
16915
|
-
onKeyDown: (event) => {
|
|
16916
|
-
if (!event.altKey) return;
|
|
16917
|
-
if (event.key !== "ArrowUp" && event.key !== "ArrowDown") return;
|
|
16853
|
+
draggable: pending && !busy && !isEditing,
|
|
16854
|
+
onDragStart: (event) => {
|
|
16855
|
+
draggingRef.current = item.id;
|
|
16856
|
+
setDraggingId(item.id);
|
|
16857
|
+
const text = event.currentTarget.querySelector("[data-queue-text]");
|
|
16858
|
+
if (text && event.dataTransfer) {
|
|
16859
|
+
const rect = text.getBoundingClientRect();
|
|
16860
|
+
event.dataTransfer.setDragImage(
|
|
16861
|
+
text,
|
|
16862
|
+
event.clientX - rect.left,
|
|
16863
|
+
event.clientY - rect.top
|
|
16864
|
+
);
|
|
16865
|
+
}
|
|
16866
|
+
},
|
|
16867
|
+
onDragEnd: () => {
|
|
16868
|
+
draggingRef.current = null;
|
|
16869
|
+
dropRef.current = null;
|
|
16870
|
+
setDraggingId(null);
|
|
16871
|
+
setDropAt(null);
|
|
16872
|
+
},
|
|
16873
|
+
onDragOver: (event) => {
|
|
16874
|
+
if (!pending) return;
|
|
16918
16875
|
event.preventDefault();
|
|
16919
|
-
|
|
16920
|
-
|
|
16921
|
-
|
|
16922
|
-
|
|
16923
|
-
|
|
16876
|
+
if (!draggingRef.current || draggingRef.current === item.id) return;
|
|
16877
|
+
const rect = event.currentTarget.getBoundingClientRect();
|
|
16878
|
+
const edge = event.clientY > rect.top + rect.height / 2 ? "after" : "before";
|
|
16879
|
+
dropRef.current = { id: item.id, edge };
|
|
16880
|
+
setDropAt(
|
|
16881
|
+
(current) => current?.id === item.id && current.edge === edge ? current : { id: item.id, edge }
|
|
16882
|
+
);
|
|
16924
16883
|
},
|
|
16925
|
-
|
|
16926
|
-
|
|
16927
|
-
|
|
16928
|
-
|
|
16929
|
-
|
|
16930
|
-
|
|
16931
|
-
|
|
16932
|
-
|
|
16933
|
-
|
|
16934
|
-
|
|
16935
|
-
|
|
16936
|
-
|
|
16937
|
-
|
|
16938
|
-
|
|
16939
|
-
|
|
16940
|
-
|
|
16941
|
-
|
|
16942
|
-
|
|
16943
|
-
|
|
16944
|
-
|
|
16945
|
-
|
|
16946
|
-
|
|
16947
|
-
|
|
16948
|
-
|
|
16949
|
-
|
|
16950
|
-
|
|
16951
|
-
|
|
16952
|
-
|
|
16953
|
-
|
|
16954
|
-
|
|
16955
|
-
|
|
16956
|
-
|
|
16957
|
-
|
|
16958
|
-
|
|
16959
|
-
|
|
16960
|
-
|
|
16961
|
-
|
|
16962
|
-
|
|
16963
|
-
|
|
16964
|
-
|
|
16965
|
-
|
|
16966
|
-
|
|
16967
|
-
|
|
16968
|
-
|
|
16969
|
-
|
|
16970
|
-
|
|
16971
|
-
|
|
16972
|
-
|
|
16973
|
-
|
|
16974
|
-
|
|
16975
|
-
|
|
16976
|
-
|
|
16977
|
-
|
|
16978
|
-
|
|
16979
|
-
|
|
16980
|
-
|
|
16981
|
-
|
|
16982
|
-
|
|
16983
|
-
|
|
16984
|
-
|
|
16985
|
-
|
|
16986
|
-
|
|
16987
|
-
|
|
16884
|
+
onDragLeave: () => {
|
|
16885
|
+
if (dropRef.current?.id === item.id) dropRef.current = null;
|
|
16886
|
+
setDropAt((current) => current?.id === item.id ? null : current);
|
|
16887
|
+
},
|
|
16888
|
+
onDrop: (event) => {
|
|
16889
|
+
event.preventDefault();
|
|
16890
|
+
const landed = dropRef.current;
|
|
16891
|
+
if (pending) handleDrop(item.id, landed?.id === item.id ? landed.edge : "before");
|
|
16892
|
+
},
|
|
16893
|
+
className: cn(
|
|
16894
|
+
"blade-chat-queue-item group relative flex items-center gap-1.5 rounded-md px-2 py-0.5 text-[11px]",
|
|
16895
|
+
pending && !isEditing && "cursor-grab active:cursor-grabbing",
|
|
16896
|
+
busy && "opacity-60",
|
|
16897
|
+
draggingId === item.id && "opacity-40"
|
|
16898
|
+
),
|
|
16899
|
+
children: isEditing ? /* @__PURE__ */ jsxs5("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
|
|
16900
|
+
/* @__PURE__ */ jsx7(
|
|
16901
|
+
"textarea",
|
|
16902
|
+
{
|
|
16903
|
+
value: activeEdit?.text ?? "",
|
|
16904
|
+
onChange: (event) => setEditing(
|
|
16905
|
+
(current) => current ? { ...current, text: event.target.value } : current
|
|
16906
|
+
),
|
|
16907
|
+
rows: 2,
|
|
16908
|
+
"aria-label": `\u7F16\u8F91\u7B2C ${position} \u6761\u6D88\u606F`,
|
|
16909
|
+
className: "w-full resize-none rounded-md border border-[hsl(var(--border))] bg-transparent px-2 py-1.5 text-sm leading-5 text-[hsl(var(--foreground))] outline-none"
|
|
16910
|
+
}
|
|
16911
|
+
),
|
|
16912
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex justify-end gap-1.5", children: [
|
|
16913
|
+
/* @__PURE__ */ jsx7(
|
|
16914
|
+
"button",
|
|
16915
|
+
{
|
|
16916
|
+
type: "button",
|
|
16917
|
+
onClick: stopEdit,
|
|
16918
|
+
className: "h-7 rounded-md border border-[hsl(var(--border))] px-2 text-xs text-[hsl(var(--muted-foreground))] transition-colors hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--foreground))]",
|
|
16919
|
+
children: "\u53D6\u6D88"
|
|
16920
|
+
}
|
|
16921
|
+
),
|
|
16922
|
+
/* @__PURE__ */ jsx7(
|
|
16923
|
+
"button",
|
|
16924
|
+
{
|
|
16925
|
+
type: "button",
|
|
16926
|
+
onClick: () => commitEdit(item),
|
|
16927
|
+
disabled: busy || !activeEdit?.text.trim(),
|
|
16928
|
+
className: "h-7 rounded-md bg-[hsl(var(--primary))] px-2 text-xs font-medium text-[hsl(var(--primary-foreground))] transition-opacity hover:opacity-90 disabled:opacity-40",
|
|
16929
|
+
children: "\u4FDD\u5B58"
|
|
16930
|
+
}
|
|
16931
|
+
)
|
|
16932
|
+
] })
|
|
16933
|
+
] }) : /* @__PURE__ */ jsxs5(Fragment4, { children: [
|
|
16934
|
+
dropAt?.id === item.id ? /* @__PURE__ */ jsx7(
|
|
16935
|
+
"span",
|
|
16936
|
+
{
|
|
16937
|
+
"aria-hidden": "true",
|
|
16938
|
+
style: { background: "var(--resize-line-hover, hsl(var(--foreground) / 0.55))" },
|
|
16939
|
+
className: cn(
|
|
16940
|
+
"pointer-events-none absolute inset-x-1 h-[2px] rounded-full",
|
|
16941
|
+
dropAt.edge === "before" ? "top-0" : "bottom-0"
|
|
16942
|
+
)
|
|
16943
|
+
}
|
|
16944
|
+
) : null,
|
|
16945
|
+
/* @__PURE__ */ jsx7(
|
|
16946
|
+
"button",
|
|
16947
|
+
{
|
|
16948
|
+
type: "button",
|
|
16949
|
+
disabled: !pending || busy,
|
|
16950
|
+
"aria-label": `\u8C03\u6574\u7B2C ${position} \u6761\u7684\u987A\u5E8F\uFF08\u62D6\u52A8\uFF0C\u6216\u6309 Alt+\u4E0A/\u4E0B\uFF09`,
|
|
16951
|
+
title: "\u62D6\u52A8\u8C03\u6574\u987A\u5E8F\uFF08Alt+\u4E0A/\u4E0B \u4E5F\u884C\uFF09",
|
|
16952
|
+
onKeyDown: (event) => {
|
|
16953
|
+
if (!event.altKey) return;
|
|
16954
|
+
if (event.key !== "ArrowUp" && event.key !== "ArrowDown") return;
|
|
16955
|
+
event.preventDefault();
|
|
16956
|
+
const delta = event.key === "ArrowUp" ? -1 : 1;
|
|
16957
|
+
if (pendingIndex < 0) return;
|
|
16958
|
+
if (delta < 0 && pendingIndex === 0) return;
|
|
16959
|
+
if (delta > 0 && pendingIndex === pendingIds.length - 1) return;
|
|
16960
|
+
onMove(item, delta);
|
|
16961
|
+
},
|
|
16962
|
+
className: "-ml-0.5 flex h-5 w-4 shrink-0 cursor-grab items-center justify-center rounded text-[hsl(var(--muted-foreground))] transition-colors hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--foreground))] active:cursor-grabbing disabled:cursor-default disabled:opacity-60 disabled:hover:bg-transparent",
|
|
16963
|
+
children: /* @__PURE__ */ jsx7(Menu, { size: 14, "aria-hidden": "true" })
|
|
16964
|
+
}
|
|
16965
|
+
),
|
|
16966
|
+
/* @__PURE__ */ jsx7(
|
|
16967
|
+
"span",
|
|
16968
|
+
{
|
|
16969
|
+
"data-queue-text": true,
|
|
16970
|
+
className: "min-w-0 flex-1 truncate pt-px text-[hsl(var(--foreground))]",
|
|
16971
|
+
children: item.content
|
|
16972
|
+
}
|
|
16973
|
+
),
|
|
16974
|
+
item.error ? /* @__PURE__ */ jsx7("span", { className: "shrink-0 pt-1 text-[11px] text-[hsl(var(--destructive))]", children: item.error }) : busy ? /* @__PURE__ */ jsxs5("span", { className: "mt-0.5 inline-flex shrink-0 items-center gap-1 text-[11px] text-[hsl(var(--muted-foreground))]", children: [
|
|
16975
|
+
/* @__PURE__ */ jsx7(LoaderCircle, { size: 11, className: "animate-spin" }),
|
|
16976
|
+
"\u5904\u7406\u4E2D"
|
|
16977
|
+
] }) : statusLabel ? /* @__PURE__ */ jsx7("span", { className: "shrink-0 pt-1 text-[11px] text-[hsl(var(--muted-foreground))]", children: statusLabel }) : null,
|
|
16978
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100", children: [
|
|
16979
|
+
/* @__PURE__ */ jsxs5(
|
|
16980
|
+
"button",
|
|
16981
|
+
{
|
|
16982
|
+
type: "button",
|
|
16983
|
+
"aria-label": `\u7ACB\u523B\u53D1\u9001\u7B2C ${position} \u6761`,
|
|
16984
|
+
title: deliverable ? "\u7ACB\u523B\u53D1\u9001" : "\u5F53\u524D\u6CA1\u6709\u53EF\u63A5\u6536\u8865\u5145\u7684\u4EFB\u52A1",
|
|
16985
|
+
disabled: busy || !deliverable,
|
|
16986
|
+
onClick: () => onDeliver(item),
|
|
16987
|
+
className: LABEL_BUTTON,
|
|
16988
|
+
children: [
|
|
16989
|
+
/* @__PURE__ */ jsx7(Send, { size: 13, "aria-hidden": "true" }),
|
|
16990
|
+
"\u7ACB\u523B\u53D1\u9001"
|
|
16991
|
+
]
|
|
16992
|
+
}
|
|
16993
|
+
),
|
|
16994
|
+
/* @__PURE__ */ jsx7(
|
|
16995
|
+
"button",
|
|
16996
|
+
{
|
|
16997
|
+
type: "button",
|
|
16998
|
+
"aria-label": `\u7F16\u8F91\u7B2C ${position} \u6761`,
|
|
16999
|
+
title: "\u7F16\u8F91",
|
|
17000
|
+
disabled: busy || !pending,
|
|
17001
|
+
onClick: () => startEdit(item),
|
|
17002
|
+
className: ICON_BUTTON,
|
|
17003
|
+
children: /* @__PURE__ */ jsx7(Pencil, { size: 13, "aria-hidden": "true" })
|
|
17004
|
+
}
|
|
17005
|
+
),
|
|
17006
|
+
/* @__PURE__ */ jsx7(
|
|
17007
|
+
"button",
|
|
17008
|
+
{
|
|
17009
|
+
type: "button",
|
|
17010
|
+
"aria-label": `\u5220\u9664\u7B2C ${position} \u6761`,
|
|
17011
|
+
title: "\u5220\u9664",
|
|
17012
|
+
disabled: busy || !canCancelQueuedMessage(item),
|
|
17013
|
+
onClick: () => onCancel(item),
|
|
17014
|
+
className: ICON_BUTTON,
|
|
17015
|
+
children: /* @__PURE__ */ jsx7(Trash2, { size: 13, "aria-hidden": "true" })
|
|
17016
|
+
}
|
|
17017
|
+
)
|
|
17018
|
+
] })
|
|
17019
|
+
] })
|
|
17020
|
+
},
|
|
17021
|
+
item.id
|
|
17022
|
+
);
|
|
17023
|
+
})
|
|
17024
|
+
}
|
|
17025
|
+
)
|
|
17026
|
+
] }) })
|
|
17027
|
+
);
|
|
16988
17028
|
}
|
|
16989
17029
|
|
|
16990
17030
|
// src/components/ReplayBar.tsx
|
|
@@ -42307,9 +42347,9 @@ function SF(G, Q2) {
|
|
|
42307
42347
|
}
|
|
42308
42348
|
|
|
42309
42349
|
// src/components/McpAppCard.tsx
|
|
42310
|
-
import { createContext as
|
|
42350
|
+
import { createContext as createContext4, useContext as useContext4, useEffect as useEffect14, useLayoutEffect as useLayoutEffect2, useRef as useRef14, useState as useState20 } from "react";
|
|
42311
42351
|
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
42312
|
-
var McpAppMessageContext =
|
|
42352
|
+
var McpAppMessageContext = createContext4(null);
|
|
42313
42353
|
function securedHtml(archive) {
|
|
42314
42354
|
const ui = archive.resourceMeta.ui;
|
|
42315
42355
|
const csp = ui?.csp ?? {};
|
|
@@ -42346,7 +42386,7 @@ function securedHtml(archive) {
|
|
|
42346
42386
|
}
|
|
42347
42387
|
function McpAppCard({ sessionId, sourceId, client: suppliedClient, onMessage: suppliedOnMessage }) {
|
|
42348
42388
|
const contextClient = useOptionalBladeClient();
|
|
42349
|
-
const contextMessage =
|
|
42389
|
+
const contextMessage = useContext4(McpAppMessageContext);
|
|
42350
42390
|
const client = suppliedClient ?? contextClient;
|
|
42351
42391
|
const onMessage = suppliedOnMessage ?? contextMessage;
|
|
42352
42392
|
const onMessageRef = useRef14(onMessage);
|
|
@@ -42360,7 +42400,7 @@ function McpAppCard({ sessionId, sourceId, client: suppliedClient, onMessage: su
|
|
|
42360
42400
|
const [ready, setReady] = useState20(false);
|
|
42361
42401
|
const [expanded, setExpanded] = useState20(false);
|
|
42362
42402
|
const [height, setHeight] = useState20(360);
|
|
42363
|
-
|
|
42403
|
+
useLayoutEffect2(() => {
|
|
42364
42404
|
const dialog = panel.current;
|
|
42365
42405
|
if (!dialog) return;
|
|
42366
42406
|
dialog.close();
|
|
@@ -42581,6 +42621,7 @@ function ChatInput({
|
|
|
42581
42621
|
isStreaming,
|
|
42582
42622
|
isStopping = false,
|
|
42583
42623
|
queueWhileRunning = false,
|
|
42624
|
+
mergesWithPanelAbove = false,
|
|
42584
42625
|
placeholder = "\u8F93\u5165\u6D88\u606F\u2026",
|
|
42585
42626
|
className,
|
|
42586
42627
|
queueKey,
|
|
@@ -42618,40 +42659,53 @@ function ChatInput({
|
|
|
42618
42659
|
void handleSend();
|
|
42619
42660
|
}
|
|
42620
42661
|
};
|
|
42621
|
-
return /* @__PURE__ */ jsx12(
|
|
42622
|
-
|
|
42623
|
-
|
|
42624
|
-
{
|
|
42625
|
-
|
|
42626
|
-
|
|
42627
|
-
|
|
42628
|
-
|
|
42629
|
-
|
|
42630
|
-
|
|
42631
|
-
|
|
42632
|
-
|
|
42633
|
-
|
|
42634
|
-
|
|
42635
|
-
|
|
42636
|
-
|
|
42637
|
-
|
|
42638
|
-
|
|
42639
|
-
|
|
42640
|
-
|
|
42641
|
-
|
|
42642
|
-
|
|
42643
|
-
|
|
42644
|
-
|
|
42645
|
-
|
|
42646
|
-
|
|
42647
|
-
|
|
42648
|
-
|
|
42649
|
-
|
|
42650
|
-
|
|
42651
|
-
|
|
42652
|
-
|
|
42653
|
-
|
|
42654
|
-
|
|
42662
|
+
return /* @__PURE__ */ jsx12(
|
|
42663
|
+
"div",
|
|
42664
|
+
{
|
|
42665
|
+
style: mergesWithPanelAbove ? { "--blade-chat-input-top-border": "0" } : void 0,
|
|
42666
|
+
className: cn(
|
|
42667
|
+
"blade-chat-input border-t border-[hsl(var(--border))] py-3",
|
|
42668
|
+
// 上留白没有这个问题:它是 Tailwind 的 `py-3`,与 `pt-0` 同在 utilities 层,
|
|
42669
|
+
// 按源码顺序后者胜。
|
|
42670
|
+
mergesWithPanelAbove && "pt-0",
|
|
42671
|
+
className
|
|
42672
|
+
),
|
|
42673
|
+
children: /* @__PURE__ */ jsxs10("div", { className: `blade-chat-input-inner mx-auto flex max-w-[748px] items-end gap-2 border border-[hsl(var(--border))] bg-[hsl(var(--card))] px-3 py-2 ${mergesWithPanelAbove ? "rounded-b-[22px]" : "rounded-2xl"}`, children: [
|
|
42674
|
+
/* @__PURE__ */ jsx12(
|
|
42675
|
+
"textarea",
|
|
42676
|
+
{
|
|
42677
|
+
value,
|
|
42678
|
+
onChange: (event) => onValueChange(event.target.value),
|
|
42679
|
+
onKeyDown: handleKeyDown,
|
|
42680
|
+
onInput: (event) => {
|
|
42681
|
+
const el = event.currentTarget;
|
|
42682
|
+
el.style.height = "auto";
|
|
42683
|
+
el.style.height = `${Math.min(el.scrollHeight, 192)}px`;
|
|
42684
|
+
},
|
|
42685
|
+
rows: 1,
|
|
42686
|
+
placeholder,
|
|
42687
|
+
"aria-label": "\u804A\u5929\u8F93\u5165",
|
|
42688
|
+
className: "blade-chat-textarea max-h-48 min-h-[28px] flex-1 resize-none bg-transparent py-1 text-sm leading-6 text-[hsl(var(--foreground))] outline-none placeholder:text-[hsl(var(--muted-foreground)/0.6)]"
|
|
42689
|
+
}
|
|
42690
|
+
),
|
|
42691
|
+
isStreaming ? /* @__PURE__ */ jsxs10(Fragment5, { children: [
|
|
42692
|
+
queueWhileRunning ? /* @__PURE__ */ jsx12("button", { type: "button", onClick: handleSend, disabled: !canSend, "aria-label": "\u52A0\u5165\u6392\u961F", title: "\u52A0\u5165\u6392\u961F", className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))] disabled:opacity-40", children: /* @__PURE__ */ jsx12(ArrowUp, { size: 15 }) }) : null,
|
|
42693
|
+
/* @__PURE__ */ jsx12("button", { type: "button", onClick: onStop, disabled: isStopping, "aria-label": isStopping ? "\u6B63\u5728\u505C\u6B62" : "\u505C\u6B62\u56DE\u590D", title: isStopping ? "\u6B63\u5728\u505C\u6B62" : "\u505C\u6B62\u56DE\u590D", className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-[hsl(var(--muted))] text-[hsl(var(--foreground))] transition-opacity hover:opacity-90 disabled:opacity-60", children: isStopping ? /* @__PURE__ */ jsx12(LoaderCircle, { size: 14, className: "animate-spin" }) : /* @__PURE__ */ jsx12(Square, { size: 12, fill: "currentColor" }) })
|
|
42694
|
+
] }) : /* @__PURE__ */ jsx12(
|
|
42695
|
+
"button",
|
|
42696
|
+
{
|
|
42697
|
+
type: "button",
|
|
42698
|
+
onClick: handleSend,
|
|
42699
|
+
disabled: !canSend,
|
|
42700
|
+
"aria-label": "\u53D1\u9001\u6D88\u606F",
|
|
42701
|
+
title: "\u53D1\u9001\u6D88\u606F",
|
|
42702
|
+
className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))] transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-40",
|
|
42703
|
+
children: /* @__PURE__ */ jsx12(ArrowUp, { size: 15 })
|
|
42704
|
+
}
|
|
42705
|
+
)
|
|
42706
|
+
] })
|
|
42707
|
+
}
|
|
42708
|
+
);
|
|
42655
42709
|
}
|
|
42656
42710
|
|
|
42657
42711
|
// src/components/ConnectionBanner.tsx
|
|
@@ -43078,9 +43132,9 @@ function mergeAnimations(...animations) {
|
|
|
43078
43132
|
|
|
43079
43133
|
// ../../node_modules/.pnpm/use-stick-to-bottom@1.1.3_react@19.2.4/node_modules/use-stick-to-bottom/dist/StickToBottom.js
|
|
43080
43134
|
import * as React from "react";
|
|
43081
|
-
import { createContext as
|
|
43082
|
-
var StickToBottomContext =
|
|
43083
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
43135
|
+
import { createContext as createContext5, useContext as useContext5, useEffect as useEffect16, useImperativeHandle, useLayoutEffect as useLayoutEffect3, useMemo as useMemo13, useRef as useRef18 } from "react";
|
|
43136
|
+
var StickToBottomContext = createContext5(null);
|
|
43137
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect3 : useEffect16;
|
|
43084
43138
|
function StickToBottom({ instance, children, resize, initial, mass, damping, stiffness, targetScrollTop: currentTargetScrollTop, contextRef, ...props }) {
|
|
43085
43139
|
const customTargetScrollTop = useRef18(null);
|
|
43086
43140
|
const targetScrollTop = React.useCallback((target, elements) => {
|
|
@@ -43150,7 +43204,7 @@ function StickToBottom({ instance, children, resize, initial, mass, damping, sti
|
|
|
43150
43204
|
StickToBottom2.Content = Content;
|
|
43151
43205
|
})(StickToBottom || (StickToBottom = {}));
|
|
43152
43206
|
function useStickToBottomContext() {
|
|
43153
|
-
const context =
|
|
43207
|
+
const context = useContext5(StickToBottomContext);
|
|
43154
43208
|
if (!context) {
|
|
43155
43209
|
throw new Error("use-stick-to-bottom component context must be used within a StickToBottom component");
|
|
43156
43210
|
}
|
|
@@ -45534,6 +45588,7 @@ function ChatSurface({
|
|
|
45534
45588
|
onFollowupInteraction,
|
|
45535
45589
|
beforeInput,
|
|
45536
45590
|
queuePanel,
|
|
45591
|
+
queuePanelVisible,
|
|
45537
45592
|
showPlanUpdates = false,
|
|
45538
45593
|
planRevealRevision = 0,
|
|
45539
45594
|
historyPaging,
|
|
@@ -45608,7 +45663,7 @@ ${item.content}`), text].filter(Boolean).join("\n\n");
|
|
|
45608
45663
|
}
|
|
45609
45664
|
) : null,
|
|
45610
45665
|
beforeInput,
|
|
45611
|
-
queuePanel,
|
|
45666
|
+
/* @__PURE__ */ jsx26(QueuePanelAdjacencyContext.Provider, { value: currentPending.length === 0, children: queuePanel }),
|
|
45612
45667
|
currentPending.map((item) => /* @__PURE__ */ jsxs22("div", { style: { display: "flex", gap: 8, padding: "8px 16px" }, children: [
|
|
45613
45668
|
/* @__PURE__ */ jsxs22("details", { style: { flex: 1, minWidth: 0 }, children: [
|
|
45614
45669
|
/* @__PURE__ */ jsx26("summary", { children: item.label }),
|
|
@@ -45627,6 +45682,7 @@ ${item.content}`), text].filter(Boolean).join("\n\n");
|
|
|
45627
45682
|
isStreaming,
|
|
45628
45683
|
isStopping,
|
|
45629
45684
|
queueWhileRunning: queuePanel != null,
|
|
45685
|
+
mergesWithPanelAbove: (queuePanelVisible ?? queuePanel != null) && currentPending.length === 0,
|
|
45630
45686
|
placeholder,
|
|
45631
45687
|
queueKey: sessionId,
|
|
45632
45688
|
className: classNames?.chatInput
|
|
@@ -45742,6 +45798,7 @@ function ChatSessionView({
|
|
|
45742
45798
|
const [inputText, setInputText] = useState32("");
|
|
45743
45799
|
const [queueNotice, setQueueNotice] = useState32(null);
|
|
45744
45800
|
const [queuePendingItemId, setQueuePendingItemId] = useState32(null);
|
|
45801
|
+
const [queuePanelVisible, setQueuePanelVisible] = useState32(false);
|
|
45745
45802
|
const [resultFeedback, setResultFeedback] = useState32([]);
|
|
45746
45803
|
const resolvedSessionId = session?.sessionId;
|
|
45747
45804
|
const isViewer = state?.viewerRole === "viewer";
|
|
@@ -45933,11 +45990,13 @@ ${content}`);
|
|
|
45933
45990
|
onDeliver: (item) => void runQueueCommand(
|
|
45934
45991
|
item.id,
|
|
45935
45992
|
(target) => target.deliverQueuedMessage(item.id, item.version)
|
|
45936
|
-
)
|
|
45993
|
+
),
|
|
45994
|
+
onVisibleChange: setQueuePanelVisible
|
|
45937
45995
|
},
|
|
45938
45996
|
resolvedSessionId
|
|
45939
45997
|
) : void 0
|
|
45940
45998
|
),
|
|
45999
|
+
queuePanelVisible,
|
|
45941
46000
|
historyPaging: session && state ? {
|
|
45942
46001
|
hasOlder: session.hasOlderHistory,
|
|
45943
46002
|
loading: state.loadingOlder,
|
|
@@ -46694,6 +46753,7 @@ export {
|
|
|
46694
46753
|
isAgentComputerCommand,
|
|
46695
46754
|
isAgentComputerToolCall,
|
|
46696
46755
|
isPlanUpdateTool,
|
|
46756
|
+
isQueuePanelVisible,
|
|
46697
46757
|
mergeConnectorItems,
|
|
46698
46758
|
normalizeAdjacentUrlFormatting,
|
|
46699
46759
|
parsePlanUpdate,
|