@tangle-network/agent-app 0.50.12 → 0.50.13
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/dist/VaultPane-ELNB3OS5.js +7 -0
- package/dist/assistant/index.js +2 -2
- package/dist/chat-react/index.js +1 -1
- package/dist/{chunk-FAIMAGJX.js → chunk-56VZACEN.js} +248 -213
- package/dist/chunk-56VZACEN.js.map +1 -0
- package/dist/{chunk-56SVXAIK.js → chunk-5YLZXXML.js} +3 -3
- package/dist/chunk-5YLZXXML.js.map +1 -0
- package/dist/{chunk-O2UKPZRF.js → chunk-7JTWJ5NN.js} +1 -1
- package/dist/chunk-7JTWJ5NN.js.map +1 -0
- package/dist/vault/index.js +1 -1
- package/dist/vault/lazy.js +1 -1
- package/dist/web-react/index.d.ts +1 -0
- package/dist/web-react/index.js +4 -2
- package/dist/web-react/lazy-load-boundary.d.ts +28 -0
- package/package.json +1 -1
- package/dist/VaultPane-2SJSP6TS.js +0 -7
- package/dist/chunk-56SVXAIK.js.map +0 -1
- package/dist/chunk-FAIMAGJX.js.map +0 -1
- package/dist/chunk-O2UKPZRF.js.map +0 -1
- /package/dist/{VaultPane-2SJSP6TS.js.map → VaultPane-ELNB3OS5.js.map} +0 -0
|
@@ -259,77 +259,107 @@ function useDictation({ onDictate, onError }) {
|
|
|
259
259
|
return { supported, recording, elapsedSeconds, start, stop };
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
+
// src/web-react/lazy-load-boundary.tsx
|
|
263
|
+
import { Component, useEffect as useEffect2 } from "react";
|
|
264
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
265
|
+
var LazyLoadBoundary = class extends Component {
|
|
266
|
+
state = { failed: false, error: null };
|
|
267
|
+
static getDerivedStateFromError(error) {
|
|
268
|
+
return { failed: true, error };
|
|
269
|
+
}
|
|
270
|
+
render() {
|
|
271
|
+
if (this.state.failed) return this.props.renderFailure(this.state.error);
|
|
272
|
+
return this.props.children;
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
var ROUTE_RELOAD_KEY = "agent-app:route-chunk-reload-at";
|
|
276
|
+
var ROUTE_RELOAD_WINDOW_MS = 6e4;
|
|
277
|
+
var CHUNK_LOAD_FAILURE = /failed to fetch dynamically imported module|error loading dynamically imported module|importing a module script failed|loading chunk .* failed|failed to load module script/i;
|
|
278
|
+
function isChunkLoadFailure(error) {
|
|
279
|
+
if (typeof error !== "object" || error === null) return false;
|
|
280
|
+
const candidate = error;
|
|
281
|
+
return candidate.name === "ChunkLoadError" || typeof candidate.message === "string" && CHUNK_LOAD_FAILURE.test(candidate.message);
|
|
282
|
+
}
|
|
283
|
+
function RouteLoadFailure({ error, autoReloadOnChunkError }) {
|
|
284
|
+
useEffect2(() => {
|
|
285
|
+
if (!autoReloadOnChunkError || !isChunkLoadFailure(error) || typeof window === "undefined") return;
|
|
286
|
+
try {
|
|
287
|
+
const lastReload = Number(window.sessionStorage.getItem(ROUTE_RELOAD_KEY) ?? 0);
|
|
288
|
+
const elapsed = Date.now() - lastReload;
|
|
289
|
+
if (lastReload > 0 && elapsed >= 0 && elapsed < ROUTE_RELOAD_WINDOW_MS) return;
|
|
290
|
+
window.sessionStorage.setItem(ROUTE_RELOAD_KEY, String(Date.now()));
|
|
291
|
+
window.location.reload();
|
|
292
|
+
} catch {
|
|
293
|
+
}
|
|
294
|
+
}, [error, autoReloadOnChunkError]);
|
|
295
|
+
return /* @__PURE__ */ jsxs("div", { role: "alert", className: "rounded-xl border border-border bg-card p-5 text-foreground", children: [
|
|
296
|
+
/* @__PURE__ */ jsx("p", { className: "font-medium", children: "This page couldn\u2019t load." }),
|
|
297
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: "Reload to try again." }),
|
|
298
|
+
/* @__PURE__ */ jsx(
|
|
299
|
+
"button",
|
|
300
|
+
{
|
|
301
|
+
type: "button",
|
|
302
|
+
className: "mt-4 rounded-md bg-primary px-3 py-2 text-sm font-medium text-primary-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
303
|
+
onClick: () => window.location.reload(),
|
|
304
|
+
children: "Reload page"
|
|
305
|
+
}
|
|
306
|
+
)
|
|
307
|
+
] });
|
|
308
|
+
}
|
|
309
|
+
function RouteChunkBoundary({ children, autoReloadOnChunkError = false }) {
|
|
310
|
+
return /* @__PURE__ */ jsx(LazyLoadBoundary, { renderFailure: (error) => /* @__PURE__ */ jsx(RouteLoadFailure, { error, autoReloadOnChunkError }), children });
|
|
311
|
+
}
|
|
312
|
+
|
|
262
313
|
// src/web-react/chat-composer.tsx
|
|
263
314
|
import {
|
|
264
|
-
Component,
|
|
265
315
|
lazy,
|
|
266
316
|
Suspense,
|
|
267
317
|
useCallback as useCallback2,
|
|
268
|
-
useEffect as
|
|
318
|
+
useEffect as useEffect3,
|
|
269
319
|
useMemo,
|
|
270
320
|
useId,
|
|
271
321
|
useRef as useRef2,
|
|
272
322
|
useState as useState2
|
|
273
323
|
} from "react";
|
|
274
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
324
|
+
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
275
325
|
function createLazyMentionEditor() {
|
|
276
326
|
return lazy(() => import("./mention-editor-NUQ2NJ6Z.js").then((m) => m.loadMentionEditor()));
|
|
277
327
|
}
|
|
278
|
-
var MentionEditorBoundary = class extends Component {
|
|
279
|
-
state = { failed: false };
|
|
280
|
-
static getDerivedStateFromError() {
|
|
281
|
-
return { failed: true };
|
|
282
|
-
}
|
|
283
|
-
render() {
|
|
284
|
-
if (!this.state.failed) return this.props.children;
|
|
285
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
286
|
-
this.props.fallback,
|
|
287
|
-
/* @__PURE__ */ jsx(
|
|
288
|
-
"div",
|
|
289
|
-
{
|
|
290
|
-
role: "alert",
|
|
291
|
-
className: "rounded-md border border-destructive/40 bg-destructive/5 px-3 py-2 text-xs text-destructive",
|
|
292
|
-
children: "Mentions are unavailable. You can still send."
|
|
293
|
-
}
|
|
294
|
-
)
|
|
295
|
-
] });
|
|
296
|
-
}
|
|
297
|
-
};
|
|
298
328
|
var IS_APPLE_PLATFORM = typeof navigator !== "undefined" && /Mac|iPhone|iPad|iPod/i.test(navigator.platform);
|
|
299
329
|
function SendGlyph({ className }) {
|
|
300
|
-
return /* @__PURE__ */
|
|
330
|
+
return /* @__PURE__ */ jsx2("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx2("path", { d: "M22 2 11 13M22 2l-7 20-4-9-9-4 20-7z" }) });
|
|
301
331
|
}
|
|
302
332
|
function StopGlyph({ className }) {
|
|
303
|
-
return /* @__PURE__ */
|
|
333
|
+
return /* @__PURE__ */ jsx2("svg", { className, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": true, children: /* @__PURE__ */ jsx2("rect", { x: "6", y: "6", width: "12", height: "12", rx: "2" }) });
|
|
304
334
|
}
|
|
305
335
|
function ArrowUpGlyph({ className }) {
|
|
306
|
-
return /* @__PURE__ */
|
|
336
|
+
return /* @__PURE__ */ jsx2("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx2("path", { d: "M12 19V5M5 12l7-7 7 7" }) });
|
|
307
337
|
}
|
|
308
338
|
function PaperclipGlyph({ className }) {
|
|
309
|
-
return /* @__PURE__ */
|
|
339
|
+
return /* @__PURE__ */ jsx2("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx2("path", { d: "m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48" }) });
|
|
310
340
|
}
|
|
311
341
|
function FolderGlyph({ className }) {
|
|
312
|
-
return /* @__PURE__ */
|
|
313
|
-
/* @__PURE__ */
|
|
314
|
-
/* @__PURE__ */
|
|
342
|
+
return /* @__PURE__ */ jsxs2("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
|
|
343
|
+
/* @__PURE__ */ jsx2("path", { d: "M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z" }),
|
|
344
|
+
/* @__PURE__ */ jsx2("path", { d: "M12 10v6m-3-3h6" })
|
|
315
345
|
] });
|
|
316
346
|
}
|
|
317
347
|
function CloseGlyph({ className }) {
|
|
318
|
-
return /* @__PURE__ */
|
|
348
|
+
return /* @__PURE__ */ jsx2("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx2("path", { d: "M18 6 6 18M6 6l12 12" }) });
|
|
319
349
|
}
|
|
320
350
|
function RetryGlyph({ className }) {
|
|
321
|
-
return /* @__PURE__ */
|
|
322
|
-
/* @__PURE__ */
|
|
323
|
-
/* @__PURE__ */
|
|
351
|
+
return /* @__PURE__ */ jsxs2("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
|
|
352
|
+
/* @__PURE__ */ jsx2("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
|
|
353
|
+
/* @__PURE__ */ jsx2("path", { d: "M3 3v5h5" })
|
|
324
354
|
] });
|
|
325
355
|
}
|
|
326
356
|
function UploadGlyph({ className }) {
|
|
327
|
-
return /* @__PURE__ */
|
|
357
|
+
return /* @__PURE__ */ jsx2("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx2("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12" }) });
|
|
328
358
|
}
|
|
329
359
|
function MicGlyph({ className }) {
|
|
330
|
-
return /* @__PURE__ */
|
|
331
|
-
/* @__PURE__ */
|
|
332
|
-
/* @__PURE__ */
|
|
360
|
+
return /* @__PURE__ */ jsxs2("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
|
|
361
|
+
/* @__PURE__ */ jsx2("rect", { x: "9", y: "2", width: "6", height: "12", rx: "3" }),
|
|
362
|
+
/* @__PURE__ */ jsx2("path", { d: "M5 10v1a7 7 0 0 0 14 0v-1M12 18v4" })
|
|
333
363
|
] });
|
|
334
364
|
}
|
|
335
365
|
var DEFAULT_MAX_HEIGHT = 168;
|
|
@@ -435,7 +465,7 @@ function ChatComposer({
|
|
|
435
465
|
[onDictateError]
|
|
436
466
|
);
|
|
437
467
|
const dictation = useDictation({ onDictate: handleDictated, onError: handleDictateError });
|
|
438
|
-
|
|
468
|
+
useEffect3(() => {
|
|
439
469
|
const el = textareaRef.current;
|
|
440
470
|
if (!el) return;
|
|
441
471
|
el.style.height = "auto";
|
|
@@ -443,7 +473,7 @@ function ChatComposer({
|
|
|
443
473
|
}, [text, maxHeight, minRows]);
|
|
444
474
|
const prevSeedRef = useRef2(null);
|
|
445
475
|
const pendingCaretRef = useRef2(null);
|
|
446
|
-
|
|
476
|
+
useEffect3(() => {
|
|
447
477
|
const prev = prevSeedRef.current;
|
|
448
478
|
prevSeedRef.current = seed ?? null;
|
|
449
479
|
if (seed == null || seed === prev || isControlled) return;
|
|
@@ -457,7 +487,7 @@ function ChatComposer({
|
|
|
457
487
|
pendingCaretRef.current = seed;
|
|
458
488
|
}
|
|
459
489
|
}, [seed, setText, onSeedApplied, isControlled]);
|
|
460
|
-
|
|
490
|
+
useEffect3(() => {
|
|
461
491
|
if (pendingCaretRef.current == null || pendingCaretRef.current !== text)
|
|
462
492
|
return;
|
|
463
493
|
pendingCaretRef.current = null;
|
|
@@ -467,7 +497,7 @@ function ChatComposer({
|
|
|
467
497
|
el.setSelectionRange(text.length, text.length);
|
|
468
498
|
}, [text]);
|
|
469
499
|
const restoreCaretRef = useRef2(null);
|
|
470
|
-
|
|
500
|
+
useEffect3(() => {
|
|
471
501
|
const pending = restoreCaretRef.current;
|
|
472
502
|
if (!pending || pending.text !== text) return;
|
|
473
503
|
restoreCaretRef.current = null;
|
|
@@ -479,7 +509,7 @@ function ChatComposer({
|
|
|
479
509
|
el.setSelectionRange(start, end);
|
|
480
510
|
}, [text]);
|
|
481
511
|
const mentionEnabled = mention != null;
|
|
482
|
-
|
|
512
|
+
useEffect3(() => {
|
|
483
513
|
if (!focusShortcut || disabled) return;
|
|
484
514
|
function onKeyDown(e) {
|
|
485
515
|
if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "l") {
|
|
@@ -601,14 +631,14 @@ function ChatComposer({
|
|
|
601
631
|
[slashItems, slashToken]
|
|
602
632
|
);
|
|
603
633
|
const slashActiveIndex = slashFiltered.length === 0 ? 0 : Math.min(slashActive, slashFiltered.length - 1);
|
|
604
|
-
|
|
634
|
+
useEffect3(() => {
|
|
605
635
|
setSlashActive(0);
|
|
606
636
|
}, [slashToken]);
|
|
607
|
-
|
|
637
|
+
useEffect3(() => {
|
|
608
638
|
if (!slashOpen) return;
|
|
609
639
|
document.getElementById(`${slashListId}-${slashActiveIndex}`)?.scrollIntoView?.({ block: "nearest" });
|
|
610
640
|
}, [slashOpen, slashActiveIndex, slashListId]);
|
|
611
|
-
|
|
641
|
+
useEffect3(() => {
|
|
612
642
|
if (!slashOpen) return;
|
|
613
643
|
function onMouseDown(e) {
|
|
614
644
|
const target = e.target;
|
|
@@ -738,7 +768,7 @@ function ChatComposer({
|
|
|
738
768
|
const showAbove = controls != null && controlsPlacement === "above";
|
|
739
769
|
const showInline = controls != null && !showAbove;
|
|
740
770
|
const inputMinHeight = minRows * LINE_HEIGHT + TEXTAREA_PADDING_Y;
|
|
741
|
-
const textareaInput = /* @__PURE__ */
|
|
771
|
+
const textareaInput = /* @__PURE__ */ jsx2(
|
|
742
772
|
"textarea",
|
|
743
773
|
{
|
|
744
774
|
ref: textareaRef,
|
|
@@ -756,7 +786,7 @@ function ChatComposer({
|
|
|
756
786
|
className: "w-full resize-none bg-transparent px-1.5 py-1 text-base leading-6 text-foreground focus:outline-none placeholder:text-muted-foreground disabled:opacity-50"
|
|
757
787
|
}
|
|
758
788
|
);
|
|
759
|
-
return /* @__PURE__ */
|
|
789
|
+
return /* @__PURE__ */ jsxs2(
|
|
760
790
|
"div",
|
|
761
791
|
{
|
|
762
792
|
className: `relative ${className ?? ""}`,
|
|
@@ -765,21 +795,21 @@ function ChatComposer({
|
|
|
765
795
|
onDragOver: onAttach ? handleDragOver : void 0,
|
|
766
796
|
onDrop: onAttach ? handleDrop : void 0,
|
|
767
797
|
children: [
|
|
768
|
-
dragOver && /* @__PURE__ */
|
|
769
|
-
/* @__PURE__ */
|
|
770
|
-
/* @__PURE__ */
|
|
771
|
-
/* @__PURE__ */
|
|
798
|
+
dragOver && /* @__PURE__ */ jsx2("div", { className: "pointer-events-none absolute inset-0 z-10 flex items-center justify-center rounded-2xl border-2 border-dashed border-primary/50 bg-card", children: /* @__PURE__ */ jsxs2("div", { className: "text-center", children: [
|
|
799
|
+
/* @__PURE__ */ jsx2("span", { className: "mx-auto mb-2 flex h-11 w-11 items-center justify-center rounded-xl bg-primary/10 text-primary", children: /* @__PURE__ */ jsx2(UploadGlyph, { className: "h-5 w-5" }) }),
|
|
800
|
+
/* @__PURE__ */ jsx2("p", { className: "text-sm font-semibold text-foreground", children: dropTitle }),
|
|
801
|
+
/* @__PURE__ */ jsx2("p", { className: "mt-0.5 text-xs text-muted-foreground", children: dropDescription })
|
|
772
802
|
] }) }),
|
|
773
|
-
showAbove && /* @__PURE__ */
|
|
774
|
-
dictateError && /* @__PURE__ */
|
|
803
|
+
showAbove && /* @__PURE__ */ jsx2("div", { className: "mb-1.5 flex flex-wrap items-center gap-1.5 px-1", children: controls }),
|
|
804
|
+
dictateError && /* @__PURE__ */ jsxs2(
|
|
775
805
|
"div",
|
|
776
806
|
{
|
|
777
807
|
role: "alert",
|
|
778
808
|
"data-testid": "composer-dictate-error",
|
|
779
809
|
className: "mb-2 flex items-start gap-2 rounded-xl border border-destructive/40 bg-destructive/10 px-3 py-2 text-xs text-destructive",
|
|
780
810
|
children: [
|
|
781
|
-
/* @__PURE__ */
|
|
782
|
-
/* @__PURE__ */
|
|
811
|
+
/* @__PURE__ */ jsx2("span", { className: "min-w-0 flex-1", children: dictateError }),
|
|
812
|
+
/* @__PURE__ */ jsx2(
|
|
783
813
|
"button",
|
|
784
814
|
{
|
|
785
815
|
type: "button",
|
|
@@ -792,16 +822,16 @@ function ChatComposer({
|
|
|
792
822
|
]
|
|
793
823
|
}
|
|
794
824
|
),
|
|
795
|
-
failedSend && /* @__PURE__ */
|
|
825
|
+
failedSend && /* @__PURE__ */ jsxs2(
|
|
796
826
|
"div",
|
|
797
827
|
{
|
|
798
828
|
role: "alert",
|
|
799
829
|
"data-testid": "composer-send-error",
|
|
800
830
|
className: "mb-2 rounded-xl border border-destructive/40 bg-destructive/10 px-3 py-2 text-xs text-destructive",
|
|
801
831
|
children: [
|
|
802
|
-
/* @__PURE__ */
|
|
803
|
-
/* @__PURE__ */
|
|
804
|
-
/* @__PURE__ */
|
|
832
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-start gap-2", children: [
|
|
833
|
+
/* @__PURE__ */ jsx2("span", { className: "min-w-0 flex-1", children: failedSend.message }),
|
|
834
|
+
/* @__PURE__ */ jsx2(
|
|
805
835
|
"button",
|
|
806
836
|
{
|
|
807
837
|
type: "button",
|
|
@@ -812,8 +842,8 @@ function ChatComposer({
|
|
|
812
842
|
}
|
|
813
843
|
)
|
|
814
844
|
] }),
|
|
815
|
-
!failedSend.restored && /* @__PURE__ */
|
|
816
|
-
/* @__PURE__ */
|
|
845
|
+
!failedSend.restored && /* @__PURE__ */ jsxs2("div", { className: "mt-1.5", children: [
|
|
846
|
+
/* @__PURE__ */ jsx2(
|
|
817
847
|
"p",
|
|
818
848
|
{
|
|
819
849
|
"data-testid": "composer-unsent-draft",
|
|
@@ -821,7 +851,7 @@ function ChatComposer({
|
|
|
821
851
|
children: failedSend.text
|
|
822
852
|
}
|
|
823
853
|
),
|
|
824
|
-
/* @__PURE__ */
|
|
854
|
+
/* @__PURE__ */ jsx2(
|
|
825
855
|
"button",
|
|
826
856
|
{
|
|
827
857
|
type: "button",
|
|
@@ -836,62 +866,62 @@ function ChatComposer({
|
|
|
836
866
|
]
|
|
837
867
|
}
|
|
838
868
|
),
|
|
839
|
-
contextItems.length > 0 && /* @__PURE__ */
|
|
869
|
+
contextItems.length > 0 && /* @__PURE__ */ jsx2("div", { "aria-label": "Message context", className: "mb-2 flex min-w-0 flex-wrap gap-1.5", children: contextItems.map((item) => /* @__PURE__ */ jsxs2(
|
|
840
870
|
"span",
|
|
841
871
|
{
|
|
842
872
|
className: "inline-flex min-w-0 max-w-full items-center gap-1.5 rounded-md border border-primary/30 bg-primary/10 px-2.5 py-1 text-xs text-primary",
|
|
843
873
|
children: [
|
|
844
|
-
item.icon && /* @__PURE__ */
|
|
845
|
-
/* @__PURE__ */
|
|
846
|
-
item.onRemove && /* @__PURE__ */
|
|
874
|
+
item.icon && /* @__PURE__ */ jsx2("span", { className: "shrink-0", "aria-hidden": true, children: item.icon }),
|
|
875
|
+
/* @__PURE__ */ jsx2("span", { className: "min-w-0 truncate", children: item.label }),
|
|
876
|
+
item.onRemove && /* @__PURE__ */ jsx2(
|
|
847
877
|
"button",
|
|
848
878
|
{
|
|
849
879
|
type: "button",
|
|
850
880
|
"aria-label": `Remove context ${item.label}`,
|
|
851
881
|
onClick: item.onRemove,
|
|
852
882
|
className: "shrink-0 rounded p-0.5 text-primary/70 transition hover:text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
853
|
-
children: /* @__PURE__ */
|
|
883
|
+
children: /* @__PURE__ */ jsx2(CloseGlyph, { className: "h-3 w-3" })
|
|
854
884
|
}
|
|
855
885
|
)
|
|
856
886
|
]
|
|
857
887
|
},
|
|
858
888
|
item.id
|
|
859
889
|
)) }),
|
|
860
|
-
pendingFiles.length > 0 && /* @__PURE__ */
|
|
890
|
+
pendingFiles.length > 0 && /* @__PURE__ */ jsx2("div", { className: "mb-2 flex flex-wrap gap-1.5", children: [...folderChips, ...fileChips].map((f) => {
|
|
861
891
|
const isError = f.status === "error";
|
|
862
|
-
return /* @__PURE__ */
|
|
892
|
+
return /* @__PURE__ */ jsxs2(
|
|
863
893
|
"span",
|
|
864
894
|
{
|
|
865
895
|
title: isError ? f.errorMessage : void 0,
|
|
866
896
|
className: `inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs ${isError ? "border-destructive/40 text-destructive" : "border-border bg-secondary text-foreground"} ${f.status === "pending" ? "opacity-60" : ""}`,
|
|
867
897
|
children: [
|
|
868
|
-
f.kind !== "folder" && f.previewUrl ? /* @__PURE__ */
|
|
869
|
-
/* @__PURE__ */
|
|
870
|
-
f.fileCount !== void 0 && /* @__PURE__ */
|
|
898
|
+
f.kind !== "folder" && f.previewUrl ? /* @__PURE__ */ jsx2("img", { src: f.previewUrl, alt: "", className: "h-8 w-8 shrink-0 rounded object-cover" }) : f.kind === "folder" ? /* @__PURE__ */ jsx2(FolderGlyph, { className: "h-3 w-3 shrink-0" }) : /* @__PURE__ */ jsx2(PaperclipGlyph, { className: "h-3 w-3 shrink-0" }),
|
|
899
|
+
/* @__PURE__ */ jsx2("span", { className: "max-w-[150px] truncate", children: f.name }),
|
|
900
|
+
f.fileCount !== void 0 && /* @__PURE__ */ jsxs2("span", { className: "text-muted-foreground", children: [
|
|
871
901
|
"(",
|
|
872
902
|
f.fileCount,
|
|
873
903
|
")"
|
|
874
904
|
] }),
|
|
875
|
-
f.status === "uploading" && /* @__PURE__ */
|
|
876
|
-
isError && f.errorMessage && /* @__PURE__ */
|
|
877
|
-
isError && onRetryFile && /* @__PURE__ */
|
|
905
|
+
f.status === "uploading" && /* @__PURE__ */ jsx2("span", { className: "h-3 w-3 animate-spin rounded-full border-2 border-primary border-t-transparent" }),
|
|
906
|
+
isError && f.errorMessage && /* @__PURE__ */ jsx2("span", { className: "max-w-[150px] truncate text-destructive/80", children: f.errorMessage }),
|
|
907
|
+
isError && onRetryFile && /* @__PURE__ */ jsx2(
|
|
878
908
|
"button",
|
|
879
909
|
{
|
|
880
910
|
type: "button",
|
|
881
911
|
"aria-label": `Retry upload ${f.name}`,
|
|
882
912
|
onClick: () => onRetryFile(f.id),
|
|
883
913
|
className: "rounded p-0.5 text-muted-foreground transition hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
884
|
-
children: /* @__PURE__ */
|
|
914
|
+
children: /* @__PURE__ */ jsx2(RetryGlyph, { className: "h-3 w-3" })
|
|
885
915
|
}
|
|
886
916
|
),
|
|
887
|
-
onRemoveFile && /* @__PURE__ */
|
|
917
|
+
onRemoveFile && /* @__PURE__ */ jsx2(
|
|
888
918
|
"button",
|
|
889
919
|
{
|
|
890
920
|
type: "button",
|
|
891
921
|
"aria-label": `Remove ${f.name}`,
|
|
892
922
|
onClick: () => onRemoveFile(f.id),
|
|
893
923
|
className: "rounded p-0.5 text-muted-foreground transition hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
894
|
-
children: /* @__PURE__ */
|
|
924
|
+
children: /* @__PURE__ */ jsx2(CloseGlyph, { className: "h-3 w-3" })
|
|
895
925
|
}
|
|
896
926
|
)
|
|
897
927
|
]
|
|
@@ -899,7 +929,7 @@ function ChatComposer({
|
|
|
899
929
|
f.id
|
|
900
930
|
);
|
|
901
931
|
}) }),
|
|
902
|
-
/* @__PURE__ */
|
|
932
|
+
/* @__PURE__ */ jsxs2(
|
|
903
933
|
"div",
|
|
904
934
|
{
|
|
905
935
|
ref: cardRef,
|
|
@@ -909,37 +939,41 @@ function ChatComposer({
|
|
|
909
939
|
mention ? (
|
|
910
940
|
// The basic textarea stays usable through download, initialization,
|
|
911
941
|
// and failure.
|
|
912
|
-
/* @__PURE__ */
|
|
913
|
-
|
|
942
|
+
/* @__PURE__ */ jsx2(LazyLoadBoundary, { renderFailure: () => /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
943
|
+
textareaInput,
|
|
944
|
+
/* @__PURE__ */ jsx2(
|
|
945
|
+
"div",
|
|
946
|
+
{
|
|
947
|
+
role: "alert",
|
|
948
|
+
className: "rounded-md border border-destructive/40 bg-destructive/5 px-3 py-2 text-xs text-destructive",
|
|
949
|
+
children: "Mentions are unavailable. You can still send."
|
|
950
|
+
}
|
|
951
|
+
)
|
|
952
|
+
] }), children: /* @__PURE__ */ jsx2(Suspense, { fallback: textareaInput, children: /* @__PURE__ */ jsx2(
|
|
953
|
+
MentionEditor,
|
|
914
954
|
{
|
|
955
|
+
value: text,
|
|
956
|
+
onChange: setText,
|
|
957
|
+
onSubmit: send,
|
|
958
|
+
placeholder,
|
|
959
|
+
disabled,
|
|
960
|
+
autoFocus,
|
|
961
|
+
minHeight: inputMinHeight,
|
|
962
|
+
maxHeight,
|
|
963
|
+
mention,
|
|
915
964
|
fallback: textareaInput,
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
{
|
|
919
|
-
value: text,
|
|
920
|
-
onChange: setText,
|
|
921
|
-
onSubmit: send,
|
|
922
|
-
placeholder,
|
|
923
|
-
disabled,
|
|
924
|
-
autoFocus,
|
|
925
|
-
minHeight: inputMinHeight,
|
|
926
|
-
maxHeight,
|
|
927
|
-
mention,
|
|
928
|
-
fallback: textareaInput,
|
|
929
|
-
registerFocus: registerRichFocus,
|
|
930
|
-
onPasteFiles: onAttach ? ingestPastedFiles : void 0
|
|
931
|
-
}
|
|
932
|
-
) })
|
|
965
|
+
registerFocus: registerRichFocus,
|
|
966
|
+
onPasteFiles: onAttach ? ingestPastedFiles : void 0
|
|
933
967
|
}
|
|
934
|
-
)
|
|
968
|
+
) }) })
|
|
935
969
|
) : (
|
|
936
970
|
// The card draws the keyboard indicator through `focus-within:`, so
|
|
937
971
|
// the input does not need a second outline.
|
|
938
972
|
textareaInput
|
|
939
973
|
),
|
|
940
|
-
/* @__PURE__ */
|
|
941
|
-
onAttach && /* @__PURE__ */
|
|
942
|
-
/* @__PURE__ */
|
|
974
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-end gap-2", children: [
|
|
975
|
+
onAttach && /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
976
|
+
/* @__PURE__ */ jsx2(
|
|
943
977
|
"button",
|
|
944
978
|
{
|
|
945
979
|
type: "button",
|
|
@@ -948,13 +982,13 @@ function ChatComposer({
|
|
|
948
982
|
"aria-label": "Attach files",
|
|
949
983
|
title: "Attach files",
|
|
950
984
|
className: "shrink-0 rounded-lg p-2 text-muted-foreground transition hover:bg-accent hover:text-foreground disabled:opacity-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
951
|
-
children: /* @__PURE__ */
|
|
985
|
+
children: /* @__PURE__ */ jsx2(PaperclipGlyph, { className: "h-4 w-4" })
|
|
952
986
|
}
|
|
953
987
|
),
|
|
954
|
-
/* @__PURE__ */
|
|
988
|
+
/* @__PURE__ */ jsx2("input", { ref: fileInputRef, type: "file", multiple: true, className: "hidden", accept, onChange: handleFileChange })
|
|
955
989
|
] }),
|
|
956
|
-
onAttachFolder && /* @__PURE__ */
|
|
957
|
-
/* @__PURE__ */
|
|
990
|
+
onAttachFolder && /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
991
|
+
/* @__PURE__ */ jsx2(
|
|
958
992
|
"button",
|
|
959
993
|
{
|
|
960
994
|
type: "button",
|
|
@@ -963,10 +997,10 @@ function ChatComposer({
|
|
|
963
997
|
"aria-label": "Attach folder",
|
|
964
998
|
title: "Attach folder",
|
|
965
999
|
className: "shrink-0 rounded-lg p-2 text-muted-foreground transition hover:bg-accent hover:text-foreground disabled:opacity-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
966
|
-
children: /* @__PURE__ */
|
|
1000
|
+
children: /* @__PURE__ */ jsx2(FolderGlyph, { className: "h-4 w-4" })
|
|
967
1001
|
}
|
|
968
1002
|
),
|
|
969
|
-
/* @__PURE__ */
|
|
1003
|
+
/* @__PURE__ */ jsx2(
|
|
970
1004
|
"input",
|
|
971
1005
|
{
|
|
972
1006
|
ref: folderInputRef,
|
|
@@ -978,7 +1012,7 @@ function ChatComposer({
|
|
|
978
1012
|
}
|
|
979
1013
|
)
|
|
980
1014
|
] }),
|
|
981
|
-
/* @__PURE__ */
|
|
1015
|
+
/* @__PURE__ */ jsx2(
|
|
982
1016
|
"div",
|
|
983
1017
|
{
|
|
984
1018
|
"data-testid": "composer-controls",
|
|
@@ -986,10 +1020,10 @@ function ChatComposer({
|
|
|
986
1020
|
children: showInline && controls
|
|
987
1021
|
}
|
|
988
1022
|
),
|
|
989
|
-
trailing && /* @__PURE__ */
|
|
990
|
-
onDictate && dictation.supported ? dictation.recording ? /* @__PURE__ */
|
|
991
|
-
/* @__PURE__ */
|
|
992
|
-
/* @__PURE__ */
|
|
1023
|
+
trailing && /* @__PURE__ */ jsx2("div", { "data-testid": "composer-trailing", className: "flex shrink-0 items-center gap-1.5", children: trailing }),
|
|
1024
|
+
onDictate && dictation.supported ? dictation.recording ? /* @__PURE__ */ jsxs2("div", { className: "flex shrink-0 items-center gap-1.5", children: [
|
|
1025
|
+
/* @__PURE__ */ jsx2("span", { "aria-hidden": "true", className: "h-2 w-2 animate-pulse rounded-full bg-destructive" }),
|
|
1026
|
+
/* @__PURE__ */ jsx2(
|
|
993
1027
|
"span",
|
|
994
1028
|
{
|
|
995
1029
|
"aria-hidden": "true",
|
|
@@ -998,8 +1032,8 @@ function ChatComposer({
|
|
|
998
1032
|
children: formatDictationElapsed(dictation.elapsedSeconds)
|
|
999
1033
|
}
|
|
1000
1034
|
),
|
|
1001
|
-
/* @__PURE__ */
|
|
1002
|
-
/* @__PURE__ */
|
|
1035
|
+
/* @__PURE__ */ jsx2("span", { role: "status", className: "sr-only", children: "Recording" }),
|
|
1036
|
+
/* @__PURE__ */ jsx2(
|
|
1003
1037
|
"button",
|
|
1004
1038
|
{
|
|
1005
1039
|
type: "button",
|
|
@@ -1007,10 +1041,10 @@ function ChatComposer({
|
|
|
1007
1041
|
"aria-label": "Stop dictation",
|
|
1008
1042
|
title: "Stop dictation",
|
|
1009
1043
|
className: "shrink-0 rounded-lg p-2 text-destructive transition hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
1010
|
-
children: /* @__PURE__ */
|
|
1044
|
+
children: /* @__PURE__ */ jsx2(StopGlyph, { className: "h-4 w-4" })
|
|
1011
1045
|
}
|
|
1012
1046
|
)
|
|
1013
|
-
] }) : /* @__PURE__ */
|
|
1047
|
+
] }) : /* @__PURE__ */ jsx2(
|
|
1014
1048
|
"button",
|
|
1015
1049
|
{
|
|
1016
1050
|
type: "button",
|
|
@@ -1019,10 +1053,10 @@ function ChatComposer({
|
|
|
1019
1053
|
"aria-label": "Dictate message",
|
|
1020
1054
|
title: "Dictate message",
|
|
1021
1055
|
className: "shrink-0 rounded-lg p-2 text-muted-foreground transition hover:bg-accent hover:text-foreground disabled:opacity-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
1022
|
-
children: /* @__PURE__ */
|
|
1056
|
+
children: /* @__PURE__ */ jsx2(MicGlyph, { className: "h-4 w-4" })
|
|
1023
1057
|
}
|
|
1024
1058
|
) : null,
|
|
1025
|
-
isStreaming ? sendVariant === "icon" ? /* @__PURE__ */
|
|
1059
|
+
isStreaming ? sendVariant === "icon" ? /* @__PURE__ */ jsx2(
|
|
1026
1060
|
"button",
|
|
1027
1061
|
{
|
|
1028
1062
|
type: "button",
|
|
@@ -1030,9 +1064,9 @@ function ChatComposer({
|
|
|
1030
1064
|
"aria-label": "Stop response",
|
|
1031
1065
|
title: "Stop",
|
|
1032
1066
|
className: "inline-flex h-[34px] w-[34px] shrink-0 items-center justify-center rounded-full border border-border bg-transparent text-foreground transition hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
1033
|
-
children: /* @__PURE__ */
|
|
1067
|
+
children: /* @__PURE__ */ jsx2(StopGlyph, { className: "h-3 w-3" })
|
|
1034
1068
|
}
|
|
1035
|
-
) : /* @__PURE__ */
|
|
1069
|
+
) : /* @__PURE__ */ jsxs2(
|
|
1036
1070
|
"button",
|
|
1037
1071
|
{
|
|
1038
1072
|
type: "button",
|
|
@@ -1040,11 +1074,11 @@ function ChatComposer({
|
|
|
1040
1074
|
"aria-label": "Stop response",
|
|
1041
1075
|
className: "inline-flex shrink-0 items-center gap-1.5 rounded-full bg-destructive/15 px-3.5 py-2 text-sm font-medium text-destructive transition hover:bg-destructive/25 focus:outline-none focus-visible:ring-2 focus-visible:ring-destructive/50",
|
|
1042
1076
|
children: [
|
|
1043
|
-
/* @__PURE__ */
|
|
1044
|
-
/* @__PURE__ */
|
|
1077
|
+
/* @__PURE__ */ jsx2(StopGlyph, { className: "h-3.5 w-3.5" }),
|
|
1078
|
+
/* @__PURE__ */ jsx2("span", { children: "Stop" })
|
|
1045
1079
|
]
|
|
1046
1080
|
}
|
|
1047
|
-
) : sendVariant === "icon" ? /* @__PURE__ */
|
|
1081
|
+
) : sendVariant === "icon" ? /* @__PURE__ */ jsx2(
|
|
1048
1082
|
"button",
|
|
1049
1083
|
{
|
|
1050
1084
|
type: "button",
|
|
@@ -1053,9 +1087,9 @@ function ChatComposer({
|
|
|
1053
1087
|
"aria-label": sendLabel,
|
|
1054
1088
|
title: sendLabel,
|
|
1055
1089
|
className: `inline-flex h-[34px] w-[34px] shrink-0 items-center justify-center rounded-full ${sendTone === "primary" ? "bg-primary text-primary-foreground" : "bg-foreground text-background"} transition ${sendTone === "primary" ? "hover:bg-primary/90" : "hover:opacity-90"} disabled:cursor-not-allowed disabled:opacity-40 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-card`,
|
|
1056
|
-
children: /* @__PURE__ */
|
|
1090
|
+
children: /* @__PURE__ */ jsx2(ArrowUpGlyph, { className: "h-4 w-4" })
|
|
1057
1091
|
}
|
|
1058
|
-
) : /* @__PURE__ */
|
|
1092
|
+
) : /* @__PURE__ */ jsxs2(
|
|
1059
1093
|
"button",
|
|
1060
1094
|
{
|
|
1061
1095
|
type: "button",
|
|
@@ -1064,8 +1098,8 @@ function ChatComposer({
|
|
|
1064
1098
|
"aria-label": sendLabel,
|
|
1065
1099
|
className: "inline-flex shrink-0 items-center gap-1.5 rounded-full bg-primary px-3.5 py-2 text-sm font-medium text-primary-foreground shadow-sm transition hover:bg-primary/90 disabled:cursor-not-allowed disabled:opacity-40 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-card",
|
|
1066
1100
|
children: [
|
|
1067
|
-
/* @__PURE__ */
|
|
1068
|
-
/* @__PURE__ */
|
|
1101
|
+
/* @__PURE__ */ jsx2(SendGlyph, { className: "h-3.5 w-3.5" }),
|
|
1102
|
+
/* @__PURE__ */ jsx2("span", { children: sendLabel })
|
|
1069
1103
|
]
|
|
1070
1104
|
}
|
|
1071
1105
|
)
|
|
@@ -1073,7 +1107,7 @@ function ChatComposer({
|
|
|
1073
1107
|
]
|
|
1074
1108
|
}
|
|
1075
1109
|
),
|
|
1076
|
-
/* @__PURE__ */
|
|
1110
|
+
/* @__PURE__ */ jsxs2(
|
|
1077
1111
|
PopoverSurface,
|
|
1078
1112
|
{
|
|
1079
1113
|
open: slashOpen,
|
|
@@ -1083,8 +1117,8 @@ function ChatComposer({
|
|
|
1083
1117
|
panelRef: slashPanelRef,
|
|
1084
1118
|
className: `w-80 overflow-y-auto rounded-xl border border-card-edge bg-popover p-1 ${OVERLAY_SHADOW}`,
|
|
1085
1119
|
children: [
|
|
1086
|
-
slashFiltered.length === 0 && /* @__PURE__ */
|
|
1087
|
-
slashFiltered.map((item, index) => /* @__PURE__ */
|
|
1120
|
+
slashFiltered.length === 0 && /* @__PURE__ */ jsx2("div", { className: "px-3 py-4 text-center text-sm text-muted-foreground", children: "No matching commands" }),
|
|
1121
|
+
slashFiltered.map((item, index) => /* @__PURE__ */ jsxs2(
|
|
1088
1122
|
"button",
|
|
1089
1123
|
{
|
|
1090
1124
|
type: "button",
|
|
@@ -1096,8 +1130,8 @@ function ChatComposer({
|
|
|
1096
1130
|
onClick: () => pickSlash(item.id),
|
|
1097
1131
|
className: `flex w-full items-center gap-2.5 rounded-md px-3 py-2.5 text-left text-sm transition ${POPOVER_OPTION_FOCUS} ${index === slashActiveIndex ? "bg-accent" : "hover:bg-accent"}`,
|
|
1098
1132
|
children: [
|
|
1099
|
-
/* @__PURE__ */
|
|
1100
|
-
/* @__PURE__ */
|
|
1133
|
+
/* @__PURE__ */ jsx2("span", { className: "shrink-0 font-medium text-foreground", children: item.label }),
|
|
1134
|
+
/* @__PURE__ */ jsx2("span", { className: "truncate text-xs text-muted-foreground", children: item.description })
|
|
1101
1135
|
]
|
|
1102
1136
|
},
|
|
1103
1137
|
item.id
|
|
@@ -1105,10 +1139,10 @@ function ChatComposer({
|
|
|
1105
1139
|
]
|
|
1106
1140
|
}
|
|
1107
1141
|
),
|
|
1108
|
-
focusShortcut && /* @__PURE__ */
|
|
1109
|
-
/* @__PURE__ */
|
|
1110
|
-
/* @__PURE__ */
|
|
1111
|
-
/* @__PURE__ */
|
|
1142
|
+
focusShortcut && /* @__PURE__ */ jsx2("div", { className: "mt-1.5 flex justify-end px-1", children: /* @__PURE__ */ jsxs2("span", { className: "text-xs text-muted-foreground", children: [
|
|
1143
|
+
/* @__PURE__ */ jsx2("kbd", { className: "rounded border border-border bg-background px-1 py-0.5 text-xs", children: IS_APPLE_PLATFORM ? "Cmd" : "Ctrl" }),
|
|
1144
|
+
/* @__PURE__ */ jsx2("kbd", { className: "ml-0.5 rounded border border-border bg-background px-1 py-0.5 text-xs", children: "L" }),
|
|
1145
|
+
/* @__PURE__ */ jsx2("span", { className: "ml-1", children: "to focus" })
|
|
1112
1146
|
] }) })
|
|
1113
1147
|
]
|
|
1114
1148
|
}
|
|
@@ -1116,7 +1150,7 @@ function ChatComposer({
|
|
|
1116
1150
|
}
|
|
1117
1151
|
|
|
1118
1152
|
// src/web-react/use-composer-attachments.ts
|
|
1119
|
-
import { useCallback as useCallback3, useEffect as
|
|
1153
|
+
import { useCallback as useCallback3, useEffect as useEffect4, useMemo as useMemo2, useRef as useRef3, useState as useState3 } from "react";
|
|
1120
1154
|
function newId() {
|
|
1121
1155
|
const cryptoObject = globalThis.crypto;
|
|
1122
1156
|
if (typeof cryptoObject?.randomUUID === "function") return cryptoObject.randomUUID();
|
|
@@ -1334,7 +1368,7 @@ function useComposerAttachments(options) {
|
|
|
1334
1368
|
}
|
|
1335
1369
|
setStaged([]);
|
|
1336
1370
|
}, [setStaged]);
|
|
1337
|
-
|
|
1371
|
+
useEffect4(
|
|
1338
1372
|
() => () => {
|
|
1339
1373
|
for (const controller of controllersRef.current.values()) controller.abort();
|
|
1340
1374
|
controllersRef.current.clear();
|
|
@@ -1381,7 +1415,7 @@ function useComposerAttachments(options) {
|
|
|
1381
1415
|
}
|
|
1382
1416
|
|
|
1383
1417
|
// src/web-react/harness-glyphs.tsx
|
|
1384
|
-
import { jsx as
|
|
1418
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1385
1419
|
var BRAND_PATHS = {
|
|
1386
1420
|
opencode: [
|
|
1387
1421
|
"M16 6H8v12h8V6zm4 16H4V2h16v20z"
|
|
@@ -1414,27 +1448,27 @@ var BRAND_PATHS = {
|
|
|
1414
1448
|
]
|
|
1415
1449
|
};
|
|
1416
1450
|
function BotGlyph({ className }) {
|
|
1417
|
-
return /* @__PURE__ */
|
|
1418
|
-
/* @__PURE__ */
|
|
1419
|
-
/* @__PURE__ */
|
|
1420
|
-
/* @__PURE__ */
|
|
1421
|
-
/* @__PURE__ */
|
|
1422
|
-
/* @__PURE__ */
|
|
1423
|
-
/* @__PURE__ */
|
|
1451
|
+
return /* @__PURE__ */ jsxs3("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
|
|
1452
|
+
/* @__PURE__ */ jsx3("path", { d: "M12 8V4H8" }),
|
|
1453
|
+
/* @__PURE__ */ jsx3("rect", { width: "16", height: "12", x: "4", y: "8", rx: "2" }),
|
|
1454
|
+
/* @__PURE__ */ jsx3("path", { d: "M2 14h2" }),
|
|
1455
|
+
/* @__PURE__ */ jsx3("path", { d: "M20 14h2" }),
|
|
1456
|
+
/* @__PURE__ */ jsx3("path", { d: "M15 13v2" }),
|
|
1457
|
+
/* @__PURE__ */ jsx3("path", { d: "M9 13v2" })
|
|
1424
1458
|
] });
|
|
1425
1459
|
}
|
|
1426
1460
|
function PlugGlyph({ className }) {
|
|
1427
|
-
return /* @__PURE__ */
|
|
1428
|
-
/* @__PURE__ */
|
|
1429
|
-
/* @__PURE__ */
|
|
1430
|
-
/* @__PURE__ */
|
|
1431
|
-
/* @__PURE__ */
|
|
1461
|
+
return /* @__PURE__ */ jsxs3("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
|
|
1462
|
+
/* @__PURE__ */ jsx3("path", { d: "M12 22v-5" }),
|
|
1463
|
+
/* @__PURE__ */ jsx3("path", { d: "M15 8V2" }),
|
|
1464
|
+
/* @__PURE__ */ jsx3("path", { d: "M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z" }),
|
|
1465
|
+
/* @__PURE__ */ jsx3("path", { d: "M9 8V2" })
|
|
1432
1466
|
] });
|
|
1433
1467
|
}
|
|
1434
1468
|
function TerminalGlyph({ className }) {
|
|
1435
|
-
return /* @__PURE__ */
|
|
1436
|
-
/* @__PURE__ */
|
|
1437
|
-
/* @__PURE__ */
|
|
1469
|
+
return /* @__PURE__ */ jsxs3("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
|
|
1470
|
+
/* @__PURE__ */ jsx3("path", { d: "M12 19h8" }),
|
|
1471
|
+
/* @__PURE__ */ jsx3("path", { d: "m4 17 6-6-6-6" })
|
|
1438
1472
|
] });
|
|
1439
1473
|
}
|
|
1440
1474
|
var FALLBACK_GLYPHS = {
|
|
@@ -1445,7 +1479,7 @@ var FALLBACK_GLYPHS = {
|
|
|
1445
1479
|
function HarnessGlyph({ harness, className }) {
|
|
1446
1480
|
const brand = BRAND_PATHS[harness];
|
|
1447
1481
|
if (brand) {
|
|
1448
|
-
return /* @__PURE__ */
|
|
1482
|
+
return /* @__PURE__ */ jsx3(
|
|
1449
1483
|
"svg",
|
|
1450
1484
|
{
|
|
1451
1485
|
className,
|
|
@@ -1456,18 +1490,18 @@ function HarnessGlyph({ harness, className }) {
|
|
|
1456
1490
|
role: "img",
|
|
1457
1491
|
"aria-label": harness,
|
|
1458
1492
|
"data-glyph": harness,
|
|
1459
|
-
children: brand.map((d) => /* @__PURE__ */
|
|
1493
|
+
children: brand.map((d) => /* @__PURE__ */ jsx3("path", { d }, d.slice(0, 32)))
|
|
1460
1494
|
}
|
|
1461
1495
|
);
|
|
1462
1496
|
}
|
|
1463
1497
|
const Fallback = FALLBACK_GLYPHS[harness] ?? BotGlyph;
|
|
1464
1498
|
const kind = Fallback === BotGlyph ? "bot" : Fallback === PlugGlyph ? "plug" : "terminal";
|
|
1465
|
-
return /* @__PURE__ */
|
|
1499
|
+
return /* @__PURE__ */ jsx3("span", { role: "img", "aria-label": harness, "data-glyph": kind, className: "inline-flex", children: /* @__PURE__ */ jsx3(Fallback, { className }) });
|
|
1466
1500
|
}
|
|
1467
1501
|
|
|
1468
1502
|
// src/web-react/agent-session-controls.tsx
|
|
1469
1503
|
import { useId as useId2, useMemo as useMemo3, useRef as useRef4, useState as useState4 } from "react";
|
|
1470
|
-
import { Fragment as Fragment2, jsx as
|
|
1504
|
+
import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1471
1505
|
var HARNESS_LABELS = {
|
|
1472
1506
|
opencode: "OpenCode (any model)",
|
|
1473
1507
|
"claude-code": "Claude Code (Anthropic)",
|
|
@@ -1487,18 +1521,18 @@ function harnessLabel(h) {
|
|
|
1487
1521
|
return HARNESS_LABELS[h] ?? h;
|
|
1488
1522
|
}
|
|
1489
1523
|
function ChevronDown({ className }) {
|
|
1490
|
-
return /* @__PURE__ */
|
|
1524
|
+
return /* @__PURE__ */ jsx4("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx4("path", { d: "m6 9 6 6 6-6" }) });
|
|
1491
1525
|
}
|
|
1492
1526
|
function LockGlyph({ className }) {
|
|
1493
|
-
return /* @__PURE__ */
|
|
1494
|
-
/* @__PURE__ */
|
|
1495
|
-
/* @__PURE__ */
|
|
1527
|
+
return /* @__PURE__ */ jsxs4("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
|
|
1528
|
+
/* @__PURE__ */ jsx4("rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }),
|
|
1529
|
+
/* @__PURE__ */ jsx4("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
|
|
1496
1530
|
] });
|
|
1497
1531
|
}
|
|
1498
1532
|
function GearGlyph({ className }) {
|
|
1499
|
-
return /* @__PURE__ */
|
|
1500
|
-
/* @__PURE__ */
|
|
1501
|
-
/* @__PURE__ */
|
|
1533
|
+
return /* @__PURE__ */ jsxs4("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
|
|
1534
|
+
/* @__PURE__ */ jsx4("circle", { cx: "12", cy: "12", r: "3" }),
|
|
1535
|
+
/* @__PURE__ */ jsx4("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1Z" })
|
|
1502
1536
|
] });
|
|
1503
1537
|
}
|
|
1504
1538
|
var FOCUS_RING = "";
|
|
@@ -1520,8 +1554,8 @@ function HarnessPicker({
|
|
|
1520
1554
|
const options = available ?? Object.keys(HARNESS_LABELS);
|
|
1521
1555
|
const showHint = () => setHintOpen(true);
|
|
1522
1556
|
const hideHint = () => setHintOpen(false);
|
|
1523
|
-
return /* @__PURE__ */
|
|
1524
|
-
/* @__PURE__ */
|
|
1557
|
+
return /* @__PURE__ */ jsxs4("div", { ref: containerRef, className: pickerRootClass(fullWidth), children: [
|
|
1558
|
+
/* @__PURE__ */ jsxs4(
|
|
1525
1559
|
"button",
|
|
1526
1560
|
{
|
|
1527
1561
|
type: "button",
|
|
@@ -1540,17 +1574,17 @@ function HarnessPicker({
|
|
|
1540
1574
|
"data-state": !locked && open ? "open" : "closed",
|
|
1541
1575
|
className: variant === "quiet" ? `${quietPickerTriggerClass({ interactive: !locked })} w-full justify-between` : `inline-flex min-h-[36px] w-full items-center justify-between gap-1.5 rounded-full border border-border bg-card px-3 py-1.5 text-sm font-medium text-foreground transition ${locked ? "cursor-default" : "hover:bg-accent"} ${FOCUS_RING}`,
|
|
1542
1576
|
children: [
|
|
1543
|
-
/* @__PURE__ */
|
|
1544
|
-
/* @__PURE__ */
|
|
1545
|
-
/* @__PURE__ */
|
|
1577
|
+
/* @__PURE__ */ jsxs4("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
1578
|
+
/* @__PURE__ */ jsx4(HarnessGlyph, { harness: value, className: variant === "quiet" ? "h-4 w-4 shrink-0" : "h-4 w-4 shrink-0 text-foreground" }),
|
|
1579
|
+
/* @__PURE__ */ jsx4("span", { className: "truncate", children: harnessLabel(value) })
|
|
1546
1580
|
] }),
|
|
1547
|
-
locked ? /* @__PURE__ */
|
|
1581
|
+
locked ? /* @__PURE__ */ jsx4(LockGlyph, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ jsx4(ChevronDown, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" })
|
|
1548
1582
|
]
|
|
1549
1583
|
}
|
|
1550
1584
|
),
|
|
1551
|
-
locked && /* @__PURE__ */
|
|
1552
|
-
/* @__PURE__ */
|
|
1553
|
-
/* @__PURE__ */
|
|
1585
|
+
locked && /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
1586
|
+
/* @__PURE__ */ jsx4("span", { id: reasonId, className: "sr-only", children: lockReason }),
|
|
1587
|
+
/* @__PURE__ */ jsx4(
|
|
1554
1588
|
PopoverSurface,
|
|
1555
1589
|
{
|
|
1556
1590
|
open: hintOpen,
|
|
@@ -1559,11 +1593,11 @@ function HarnessPicker({
|
|
|
1559
1593
|
panelRef: hintPanelRef,
|
|
1560
1594
|
matchTriggerWidth: fullWidth,
|
|
1561
1595
|
className: `max-w-[248px] rounded-lg border border-card-edge bg-popover px-2.5 py-1.5 text-xs leading-snug text-muted-foreground ${OVERLAY_SHADOW}`,
|
|
1562
|
-
children: /* @__PURE__ */
|
|
1596
|
+
children: /* @__PURE__ */ jsx4("span", { "aria-hidden": true, children: lockReason })
|
|
1563
1597
|
}
|
|
1564
1598
|
)
|
|
1565
1599
|
] }),
|
|
1566
|
-
/* @__PURE__ */
|
|
1600
|
+
/* @__PURE__ */ jsx4(
|
|
1567
1601
|
PopoverSurface,
|
|
1568
1602
|
{
|
|
1569
1603
|
open: !locked && open,
|
|
@@ -1573,7 +1607,7 @@ function HarnessPicker({
|
|
|
1573
1607
|
panelRef,
|
|
1574
1608
|
matchTriggerWidth: true,
|
|
1575
1609
|
className: `max-h-64 min-w-[248px] overflow-y-auto rounded-xl border border-card-edge bg-popover p-1 ${OVERLAY_SHADOW}`,
|
|
1576
|
-
children: options.map((h) => /* @__PURE__ */
|
|
1610
|
+
children: options.map((h) => /* @__PURE__ */ jsxs4(
|
|
1577
1611
|
"button",
|
|
1578
1612
|
{
|
|
1579
1613
|
type: "button",
|
|
@@ -1585,9 +1619,9 @@ function HarnessPicker({
|
|
|
1585
1619
|
},
|
|
1586
1620
|
className: `flex w-full items-center gap-2.5 rounded-md px-3 py-2 text-left text-sm transition ${FOCUS_RING} ${h === value ? "bg-primary/10 font-medium" : "hover:bg-accent"}`,
|
|
1587
1621
|
children: [
|
|
1588
|
-
/* @__PURE__ */
|
|
1589
|
-
/* @__PURE__ */
|
|
1590
|
-
h === value && /* @__PURE__ */
|
|
1622
|
+
/* @__PURE__ */ jsx4(HarnessGlyph, { harness: h, className: "h-4 w-4 shrink-0 text-foreground" }),
|
|
1623
|
+
/* @__PURE__ */ jsx4("span", { className: "truncate", children: harnessLabel(h) }),
|
|
1624
|
+
h === value && /* @__PURE__ */ jsx4(CheckGlyph, { className: "ml-auto h-3.5 w-3.5 shrink-0 text-primary" })
|
|
1591
1625
|
]
|
|
1592
1626
|
},
|
|
1593
1627
|
h
|
|
@@ -1636,7 +1670,7 @@ function AgentSessionControls(props) {
|
|
|
1636
1670
|
const panelId = useId2();
|
|
1637
1671
|
const selectedModel = models.find((m) => m.id === model);
|
|
1638
1672
|
const showEffort = selectedModel?.supportsReasoning ?? true;
|
|
1639
|
-
const modelPicker = /* @__PURE__ */
|
|
1673
|
+
const modelPicker = /* @__PURE__ */ jsx4(
|
|
1640
1674
|
ModelPicker,
|
|
1641
1675
|
{
|
|
1642
1676
|
value: model,
|
|
@@ -1648,9 +1682,9 @@ function AgentSessionControls(props) {
|
|
|
1648
1682
|
}
|
|
1649
1683
|
);
|
|
1650
1684
|
if (layout === "inline") {
|
|
1651
|
-
return /* @__PURE__ */
|
|
1685
|
+
return /* @__PURE__ */ jsxs4("div", { className: `flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-1 ${className ?? ""}`, children: [
|
|
1652
1686
|
modelPicker,
|
|
1653
|
-
showHarness && /* @__PURE__ */
|
|
1687
|
+
showHarness && /* @__PURE__ */ jsx4(
|
|
1654
1688
|
HarnessPicker,
|
|
1655
1689
|
{
|
|
1656
1690
|
value: harness,
|
|
@@ -1660,14 +1694,14 @@ function AgentSessionControls(props) {
|
|
|
1660
1694
|
variant
|
|
1661
1695
|
}
|
|
1662
1696
|
),
|
|
1663
|
-
showEffort && /* @__PURE__ */
|
|
1697
|
+
showEffort && /* @__PURE__ */ jsx4(EffortPicker, { value: effort, onChange: onEffortChange, levels: effortLevels, variant })
|
|
1664
1698
|
] });
|
|
1665
1699
|
}
|
|
1666
1700
|
const hasAdvanced = showHarness || showEffort;
|
|
1667
|
-
return /* @__PURE__ */
|
|
1701
|
+
return /* @__PURE__ */ jsxs4("div", { className: `flex items-center gap-1.5 ${className ?? ""}`, children: [
|
|
1668
1702
|
modelPicker,
|
|
1669
|
-
hasAdvanced && /* @__PURE__ */
|
|
1670
|
-
/* @__PURE__ */
|
|
1703
|
+
hasAdvanced && /* @__PURE__ */ jsxs4("div", { ref: popoverRef, className: "relative inline-flex", children: [
|
|
1704
|
+
/* @__PURE__ */ jsx4(
|
|
1671
1705
|
"button",
|
|
1672
1706
|
{
|
|
1673
1707
|
type: "button",
|
|
@@ -1677,10 +1711,10 @@ function AgentSessionControls(props) {
|
|
|
1677
1711
|
title: "Model settings \u2014 pick the agent backend and how hard it thinks",
|
|
1678
1712
|
className: `flex h-8 w-8 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-muted hover:text-foreground data-[state=open]:bg-muted ${FOCUS_RING}`,
|
|
1679
1713
|
"data-state": open ? "open" : "closed",
|
|
1680
|
-
children: /* @__PURE__ */
|
|
1714
|
+
children: /* @__PURE__ */ jsx4(GearGlyph, { className: "h-4 w-4" })
|
|
1681
1715
|
}
|
|
1682
1716
|
),
|
|
1683
|
-
/* @__PURE__ */
|
|
1717
|
+
/* @__PURE__ */ jsxs4(
|
|
1684
1718
|
PopoverSurface,
|
|
1685
1719
|
{
|
|
1686
1720
|
open,
|
|
@@ -1689,9 +1723,9 @@ function AgentSessionControls(props) {
|
|
|
1689
1723
|
panelRef,
|
|
1690
1724
|
className: `w-72 space-y-3 overflow-y-auto rounded-xl border border-card-edge bg-popover p-3 ${OVERLAY_SHADOW}`,
|
|
1691
1725
|
children: [
|
|
1692
|
-
showHarness && /* @__PURE__ */
|
|
1693
|
-
/* @__PURE__ */
|
|
1694
|
-
/* @__PURE__ */
|
|
1726
|
+
showHarness && /* @__PURE__ */ jsxs4("div", { className: "space-y-1.5", children: [
|
|
1727
|
+
/* @__PURE__ */ jsx4("p", { className: "text-xs font-medium text-foreground", children: "Agent backend" }),
|
|
1728
|
+
/* @__PURE__ */ jsx4(
|
|
1695
1729
|
HarnessPicker,
|
|
1696
1730
|
{
|
|
1697
1731
|
value: harness,
|
|
@@ -1702,12 +1736,12 @@ function AgentSessionControls(props) {
|
|
|
1702
1736
|
variant
|
|
1703
1737
|
}
|
|
1704
1738
|
),
|
|
1705
|
-
/* @__PURE__ */
|
|
1739
|
+
/* @__PURE__ */ jsx4("p", { className: "text-xs leading-snug text-muted-foreground", children: "The engine that runs the agent. Switching it keeps your model choice compatible." })
|
|
1706
1740
|
] }),
|
|
1707
|
-
showEffort && /* @__PURE__ */
|
|
1708
|
-
/* @__PURE__ */
|
|
1709
|
-
/* @__PURE__ */
|
|
1710
|
-
/* @__PURE__ */
|
|
1741
|
+
showEffort && /* @__PURE__ */ jsxs4("div", { className: "space-y-1.5", children: [
|
|
1742
|
+
/* @__PURE__ */ jsx4("p", { className: "text-xs font-medium text-foreground", children: "Thinking" }),
|
|
1743
|
+
/* @__PURE__ */ jsx4(EffortPicker, { value: effort, onChange: onEffortChange, levels: effortLevels, label: "", fullWidth: true, variant }),
|
|
1744
|
+
/* @__PURE__ */ jsx4("p", { className: "text-xs leading-snug text-muted-foreground", children: "How hard the agent thinks before answering. Higher is slower but more thorough." })
|
|
1711
1745
|
] })
|
|
1712
1746
|
]
|
|
1713
1747
|
}
|
|
@@ -1717,13 +1751,13 @@ function AgentSessionControls(props) {
|
|
|
1717
1751
|
}
|
|
1718
1752
|
|
|
1719
1753
|
// src/web-react/composer-mode-controls.tsx
|
|
1720
|
-
import { jsx as
|
|
1754
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1721
1755
|
function ListChecksGlyph({ className }) {
|
|
1722
|
-
return /* @__PURE__ */
|
|
1756
|
+
return /* @__PURE__ */ jsx5("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx5("path", { d: "m3 17 2 2 4-4M3 7l2 2 4-4M13 6h8M13 12h8M13 18h8" }) });
|
|
1723
1757
|
}
|
|
1724
1758
|
function ComposerModeControls({ planMode }) {
|
|
1725
1759
|
if (!planMode) return null;
|
|
1726
|
-
return /* @__PURE__ */
|
|
1760
|
+
return /* @__PURE__ */ jsxs5(
|
|
1727
1761
|
"button",
|
|
1728
1762
|
{
|
|
1729
1763
|
type: "button",
|
|
@@ -1740,7 +1774,7 @@ function ComposerModeControls({ planMode }) {
|
|
|
1740
1774
|
planMode.saving && "opacity-60"
|
|
1741
1775
|
),
|
|
1742
1776
|
children: [
|
|
1743
|
-
/* @__PURE__ */
|
|
1777
|
+
/* @__PURE__ */ jsx5(ListChecksGlyph, { className: "h-3.5 w-3.5" }),
|
|
1744
1778
|
"Plan"
|
|
1745
1779
|
]
|
|
1746
1780
|
}
|
|
@@ -1749,7 +1783,7 @@ function ComposerModeControls({ planMode }) {
|
|
|
1749
1783
|
|
|
1750
1784
|
// src/web-react/entry-composer.tsx
|
|
1751
1785
|
import { useState as useState5 } from "react";
|
|
1752
|
-
import { jsx as
|
|
1786
|
+
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1753
1787
|
function EntryComposer({
|
|
1754
1788
|
heading,
|
|
1755
1789
|
subheading,
|
|
@@ -1793,14 +1827,14 @@ function EntryComposer({
|
|
|
1793
1827
|
attachments.clear();
|
|
1794
1828
|
mentions?.clearMentions();
|
|
1795
1829
|
}
|
|
1796
|
-
return /* @__PURE__ */
|
|
1830
|
+
return /* @__PURE__ */ jsx6(
|
|
1797
1831
|
"div",
|
|
1798
1832
|
{
|
|
1799
1833
|
className: className ?? "relative flex flex-1 flex-col items-center justify-center overflow-hidden bg-background px-5",
|
|
1800
|
-
children: /* @__PURE__ */
|
|
1801
|
-
heading ? /* @__PURE__ */
|
|
1802
|
-
subheading ? /* @__PURE__ */
|
|
1803
|
-
/* @__PURE__ */
|
|
1834
|
+
children: /* @__PURE__ */ jsxs6("div", { className: "w-full", style: { maxWidth }, children: [
|
|
1835
|
+
heading ? /* @__PURE__ */ jsx6("h2", { className: "mb-4 text-center text-[1.75rem] font-medium tracking-tight text-foreground", children: heading }) : null,
|
|
1836
|
+
subheading ? /* @__PURE__ */ jsx6("p", { className: "mx-auto mb-9 max-w-md text-center text-sm leading-relaxed text-muted-foreground", children: subheading }) : heading ? /* @__PURE__ */ jsx6("div", { className: "mb-7" }) : null,
|
|
1837
|
+
/* @__PURE__ */ jsx6(
|
|
1804
1838
|
ChatComposer,
|
|
1805
1839
|
{
|
|
1806
1840
|
className: composerClassName ?? "vt-composer",
|
|
@@ -1827,11 +1861,11 @@ function EntryComposer({
|
|
|
1827
1861
|
// brighter overlay tone the component defaults to.
|
|
1828
1862
|
popoverClassName: mentionPopoverClassName ?? "bg-surface-container-low border-[var(--md3-outline-variant)]"
|
|
1829
1863
|
} : void 0,
|
|
1830
|
-
controls: modes ?? /* @__PURE__ */
|
|
1831
|
-
trailing: agent ? /* @__PURE__ */
|
|
1864
|
+
controls: modes ?? /* @__PURE__ */ jsx6(ComposerModeControls, { planMode }),
|
|
1865
|
+
trailing: agent ? /* @__PURE__ */ jsx6(AgentSessionControls, { ...agent }) : void 0
|
|
1832
1866
|
}
|
|
1833
1867
|
),
|
|
1834
|
-
footer ? /* @__PURE__ */
|
|
1868
|
+
footer ? /* @__PURE__ */ jsx6("div", { className: "mt-7", children: footer }) : null
|
|
1835
1869
|
] })
|
|
1836
1870
|
}
|
|
1837
1871
|
);
|
|
@@ -1846,6 +1880,7 @@ export {
|
|
|
1846
1880
|
dictationErrorMessage,
|
|
1847
1881
|
formatDictationElapsed,
|
|
1848
1882
|
useDictation,
|
|
1883
|
+
RouteChunkBoundary,
|
|
1849
1884
|
ChatComposer,
|
|
1850
1885
|
useComposerAttachments,
|
|
1851
1886
|
HarnessGlyph,
|
|
@@ -1853,4 +1888,4 @@ export {
|
|
|
1853
1888
|
ComposerModeControls,
|
|
1854
1889
|
EntryComposer
|
|
1855
1890
|
};
|
|
1856
|
-
//# sourceMappingURL=chunk-
|
|
1891
|
+
//# sourceMappingURL=chunk-56VZACEN.js.map
|