@tangle-network/sandbox-ui 0.3.12 → 0.4.0
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/auth.js +2 -3
- package/dist/{chat-container-Dn1jWtWo.d.ts → chat-container-Cg-GwyiK.d.ts} +17 -3
- package/dist/chat.d.ts +1 -1
- package/dist/chat.js +1 -1
- package/dist/{chunk-QMKWQF6F.js → chunk-DQYODCBN.js} +102 -30
- package/dist/{chunk-6H3EFUUC.js → chunk-GVUW4VDD.js} +235 -110
- package/dist/chunk-HXEA7L2T.js +1401 -0
- package/dist/{chunk-IAIJUFM6.js → chunk-HYLTXGOI.js} +1 -1
- package/dist/{chunk-MCGKDCOR.js → chunk-IW2JZCOC.js} +55 -14
- package/dist/{chunk-DMYYQXPN.js → chunk-MVYFNPAH.js} +600 -460
- package/dist/{chunk-PCTEG6HR.js → chunk-OHMO7NUX.js} +2 -4
- package/dist/{chunk-CSIXZEKN.js → chunk-SSKVYXCR.js} +94 -1
- package/dist/dashboard.d.ts +1 -1
- package/dist/dashboard.js +40 -6
- package/dist/{document-editor-pane-AVKKXSLG.js → document-editor-pane-5TN2VWGZ.js} +1 -1
- package/dist/{document-editor-pane-Xnl8SmA7.d.ts → document-editor-pane-A70-EhdQ.d.ts} +1 -1
- package/dist/editor.d.ts +2 -2
- package/dist/editor.js +1 -1
- package/dist/files.d.ts +1 -1
- package/dist/files.js +1 -1
- package/dist/{index-BJIPTCKk.d.ts → index-tTfThG0n.d.ts} +131 -26
- package/dist/index.d.ts +6 -4
- package/dist/index.js +76 -16
- package/dist/primitives.d.ts +20 -1
- package/dist/primitives.js +7 -7
- package/dist/workspace.d.ts +8 -2
- package/dist/workspace.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-4HT5J6CE.js +0 -11001
- package/dist/chunk-B26TQ7SA.js +0 -47
|
@@ -362,7 +362,7 @@ function AgentTimeline({
|
|
|
362
362
|
|
|
363
363
|
// src/chat/chat-input.tsx
|
|
364
364
|
import { useState as useState2, useRef, useCallback } from "react";
|
|
365
|
-
import { Send, Square, Paperclip, X } from "lucide-react";
|
|
365
|
+
import { Send, Square, Paperclip, FolderUp, X, Upload } from "lucide-react";
|
|
366
366
|
import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
367
367
|
function ChatInput({
|
|
368
368
|
onSend,
|
|
@@ -375,11 +375,18 @@ function ChatInput({
|
|
|
375
375
|
pendingFiles = [],
|
|
376
376
|
onRemoveFile,
|
|
377
377
|
onAttach,
|
|
378
|
+
onAttachFolder,
|
|
379
|
+
accept,
|
|
380
|
+
dropTitle = "Drop files to add context",
|
|
381
|
+
dropDescription = "Files will be attached to your next message.",
|
|
378
382
|
className
|
|
379
383
|
}) {
|
|
380
384
|
const [value, setValue] = useState2("");
|
|
385
|
+
const [dragOver, setDragOver] = useState2(false);
|
|
386
|
+
const dragCounter = useRef(0);
|
|
381
387
|
const textareaRef = useRef(null);
|
|
382
388
|
const fileInputRef = useRef(null);
|
|
389
|
+
const folderInputRef = useRef(null);
|
|
383
390
|
const handleSend = useCallback(() => {
|
|
384
391
|
const trimmed = value.trim();
|
|
385
392
|
if (!trimmed || isStreaming || disabled) return;
|
|
@@ -404,126 +411,244 @@ function ChatInput({
|
|
|
404
411
|
const handleAttachClick = () => {
|
|
405
412
|
fileInputRef.current?.click();
|
|
406
413
|
};
|
|
414
|
+
const handleFolderClick = () => {
|
|
415
|
+
folderInputRef.current?.click();
|
|
416
|
+
};
|
|
407
417
|
const handleFileChange = (e) => {
|
|
408
418
|
if (e.target.files?.length) {
|
|
409
419
|
onAttach?.(e.target.files);
|
|
410
420
|
e.target.value = "";
|
|
411
421
|
}
|
|
412
422
|
};
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
423
|
+
const handleFolderChange = (e) => {
|
|
424
|
+
if (e.target.files?.length) {
|
|
425
|
+
(onAttachFolder ?? onAttach)?.(e.target.files);
|
|
426
|
+
e.target.value = "";
|
|
427
|
+
}
|
|
428
|
+
};
|
|
429
|
+
const handleDragEnter = useCallback((e) => {
|
|
430
|
+
e.preventDefault();
|
|
431
|
+
e.stopPropagation();
|
|
432
|
+
dragCounter.current++;
|
|
433
|
+
if (e.dataTransfer?.types.includes("Files")) {
|
|
434
|
+
setDragOver(true);
|
|
435
|
+
}
|
|
436
|
+
}, []);
|
|
437
|
+
const handleDragLeave = useCallback((e) => {
|
|
438
|
+
e.preventDefault();
|
|
439
|
+
e.stopPropagation();
|
|
440
|
+
dragCounter.current--;
|
|
441
|
+
if (dragCounter.current === 0) {
|
|
442
|
+
setDragOver(false);
|
|
443
|
+
}
|
|
444
|
+
}, []);
|
|
445
|
+
const handleDragOver = useCallback((e) => {
|
|
446
|
+
e.preventDefault();
|
|
447
|
+
e.stopPropagation();
|
|
448
|
+
e.dataTransfer.dropEffect = "copy";
|
|
449
|
+
}, []);
|
|
450
|
+
const handleDrop = useCallback((e) => {
|
|
451
|
+
e.preventDefault();
|
|
452
|
+
e.stopPropagation();
|
|
453
|
+
dragCounter.current = 0;
|
|
454
|
+
setDragOver(false);
|
|
455
|
+
const files = e.dataTransfer?.files;
|
|
456
|
+
if (files?.length && onAttach) {
|
|
457
|
+
onAttach(files);
|
|
458
|
+
}
|
|
459
|
+
}, [onAttach]);
|
|
460
|
+
const fileChips = pendingFiles.filter((f) => f.type === "file" || !f.type);
|
|
461
|
+
const folderChips = pendingFiles.filter((f) => f.type === "folder");
|
|
462
|
+
return /* @__PURE__ */ jsxs5(
|
|
463
|
+
"div",
|
|
464
|
+
{
|
|
465
|
+
className: cn("px-4 py-3 relative", className),
|
|
466
|
+
onDragEnter: onAttach ? handleDragEnter : void 0,
|
|
467
|
+
onDragLeave: onAttach ? handleDragLeave : void 0,
|
|
468
|
+
onDragOver: onAttach ? handleDragOver : void 0,
|
|
469
|
+
onDrop: onAttach ? handleDrop : void 0,
|
|
470
|
+
children: [
|
|
471
|
+
dragOver && /* @__PURE__ */ jsx6("div", { className: "absolute inset-0 z-10 flex items-center justify-center rounded-[28px] border-2 border-dashed border-[var(--brand-cool)] bg-[var(--brand-cool)]/8 backdrop-blur-sm pointer-events-none", children: /* @__PURE__ */ jsxs5("div", { className: "text-center", children: [
|
|
472
|
+
/* @__PURE__ */ jsx6("div", { className: "mx-auto mb-3 flex h-12 w-12 items-center justify-center rounded-xl bg-[var(--brand-cool)]/15", children: /* @__PURE__ */ jsx6(Upload, { className: "h-6 w-6 text-[var(--brand-cool)]" }) }),
|
|
473
|
+
/* @__PURE__ */ jsx6("p", { className: "text-sm font-semibold text-[var(--text-primary)]", children: dropTitle }),
|
|
474
|
+
/* @__PURE__ */ jsx6("p", { className: "mt-1 text-xs text-[var(--text-muted)]", children: dropDescription })
|
|
475
|
+
] }) }),
|
|
476
|
+
pendingFiles.length > 0 && /* @__PURE__ */ jsxs5("div", { className: "mb-3 flex flex-wrap gap-2", children: [
|
|
477
|
+
folderChips.map((f) => /* @__PURE__ */ jsxs5(
|
|
478
|
+
"span",
|
|
428
479
|
{
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
480
|
+
className: cn(
|
|
481
|
+
"inline-flex items-center gap-1.5 rounded-[var(--radius-full)] border px-3 py-1.5 text-xs shadow-[var(--shadow-card)] backdrop-blur-sm",
|
|
482
|
+
"border-[var(--border-subtle)] bg-[linear-gradient(180deg,rgba(255,255,255,0.05),rgba(255,255,255,0.02))]",
|
|
483
|
+
f.status === "error" && "border-[var(--code-error)]/30 text-[var(--code-error)]",
|
|
484
|
+
f.status !== "error" && "text-[var(--text-secondary)]"
|
|
485
|
+
),
|
|
486
|
+
children: [
|
|
487
|
+
/* @__PURE__ */ jsx6(FolderUp, { className: "h-3 w-3 shrink-0" }),
|
|
488
|
+
/* @__PURE__ */ jsx6("span", { className: "truncate max-w-[150px]", children: f.name }),
|
|
489
|
+
f.fileCount !== void 0 && /* @__PURE__ */ jsxs5("span", { className: "text-[var(--text-muted)]", children: [
|
|
490
|
+
"(",
|
|
491
|
+
f.fileCount,
|
|
492
|
+
")"
|
|
493
|
+
] }),
|
|
494
|
+
f.status === "uploading" && /* @__PURE__ */ jsx6("span", { className: "w-3 h-3 border-2 border-[var(--brand-cool)] border-t-transparent rounded-full animate-spin" }),
|
|
495
|
+
onRemoveFile && /* @__PURE__ */ jsx6(
|
|
496
|
+
"button",
|
|
497
|
+
{
|
|
498
|
+
type: "button",
|
|
499
|
+
"aria-label": `Remove ${f.name}`,
|
|
500
|
+
onClick: () => onRemoveFile(f.id),
|
|
501
|
+
className: "rounded p-0.5 transition-colors hover:text-[var(--text-primary)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--brand-cool)]/60",
|
|
502
|
+
children: /* @__PURE__ */ jsx6(X, { className: "h-3 w-3" })
|
|
503
|
+
}
|
|
504
|
+
)
|
|
505
|
+
]
|
|
506
|
+
},
|
|
507
|
+
f.id
|
|
508
|
+
)),
|
|
509
|
+
fileChips.map((f) => /* @__PURE__ */ jsxs5(
|
|
510
|
+
"span",
|
|
511
|
+
{
|
|
512
|
+
className: cn(
|
|
513
|
+
"inline-flex items-center gap-1.5 rounded-[var(--radius-full)] border px-3 py-1.5 text-xs shadow-[var(--shadow-card)] backdrop-blur-sm",
|
|
514
|
+
"border-[var(--border-subtle)] bg-[linear-gradient(180deg,rgba(255,255,255,0.05),rgba(255,255,255,0.02))]",
|
|
515
|
+
f.status === "error" && "border-[var(--code-error)]/30 text-[var(--code-error)]",
|
|
516
|
+
f.status !== "error" && "text-[var(--text-secondary)]"
|
|
517
|
+
),
|
|
518
|
+
children: [
|
|
519
|
+
/* @__PURE__ */ jsx6(Paperclip, { className: "h-3 w-3 shrink-0" }),
|
|
520
|
+
/* @__PURE__ */ jsx6("span", { className: "truncate max-w-[150px]", children: f.name }),
|
|
521
|
+
f.status === "uploading" && /* @__PURE__ */ jsx6("span", { className: "w-3 h-3 border-2 border-[var(--brand-cool)] border-t-transparent rounded-full animate-spin" }),
|
|
522
|
+
onRemoveFile && /* @__PURE__ */ jsx6(
|
|
523
|
+
"button",
|
|
524
|
+
{
|
|
525
|
+
type: "button",
|
|
526
|
+
"aria-label": `Remove ${f.name}`,
|
|
527
|
+
onClick: () => onRemoveFile(f.id),
|
|
528
|
+
className: "rounded p-0.5 transition-colors hover:text-[var(--text-primary)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--brand-cool)]/60",
|
|
529
|
+
children: /* @__PURE__ */ jsx6(X, { className: "h-3 w-3" })
|
|
530
|
+
}
|
|
531
|
+
)
|
|
532
|
+
]
|
|
533
|
+
},
|
|
534
|
+
f.id
|
|
535
|
+
))
|
|
536
|
+
] }),
|
|
537
|
+
/* @__PURE__ */ jsx6("div", { className: "rounded-[28px] border border-[var(--border-subtle)] bg-[radial-gradient(circle_at_top,rgba(96,165,250,0.16),transparent_42%),linear-gradient(135deg,rgba(98,114,243,0.12),rgba(255,255,255,0.03)_42%,transparent)] p-[1px] shadow-[var(--shadow-accent)]", children: /* @__PURE__ */ jsxs5("div", { className: "rounded-[26px] border border-white/5 bg-[linear-gradient(180deg,rgba(255,255,255,0.03),transparent_35%),var(--bg-card)] px-3 py-3.5 transition-colors focus-within:border-[var(--border-accent)]", children: [
|
|
538
|
+
/* @__PURE__ */ jsxs5("div", { className: "mb-2 flex items-center justify-between gap-3 px-1", children: [
|
|
539
|
+
/* @__PURE__ */ jsx6("div", { className: "text-[11px] font-semibold uppercase tracking-[0.16em] text-[var(--text-muted)]", children: "Agent Command Deck" }),
|
|
540
|
+
/* @__PURE__ */ jsx6("div", { className: "text-[11px] text-[var(--text-muted)]", children: isStreaming ? "Streaming response" : "Ready for next instruction" })
|
|
541
|
+
] }),
|
|
542
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex items-end gap-2", children: [
|
|
543
|
+
onAttach && /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
544
|
+
/* @__PURE__ */ jsx6(
|
|
545
|
+
"button",
|
|
546
|
+
{
|
|
547
|
+
type: "button",
|
|
548
|
+
onClick: handleAttachClick,
|
|
549
|
+
disabled: isStreaming,
|
|
550
|
+
"aria-label": "Attach files",
|
|
551
|
+
title: "Attach files",
|
|
552
|
+
className: "mb-0.5 shrink-0 rounded-[var(--radius-md)] border border-transparent p-2 text-[var(--text-muted)] transition-colors hover:border-[var(--border-subtle)] hover:bg-[var(--bg-hover)] hover:text-[var(--text-secondary)] disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--brand-cool)]/60",
|
|
553
|
+
children: /* @__PURE__ */ jsx6(Paperclip, { className: "h-4 w-4" })
|
|
554
|
+
}
|
|
555
|
+
),
|
|
556
|
+
/* @__PURE__ */ jsx6(
|
|
557
|
+
"input",
|
|
558
|
+
{
|
|
559
|
+
ref: fileInputRef,
|
|
560
|
+
type: "file",
|
|
561
|
+
multiple: true,
|
|
562
|
+
className: "hidden",
|
|
563
|
+
onChange: handleFileChange,
|
|
564
|
+
accept: accept ?? ".pdf,.csv,.xlsx,.xls,.jpg,.jpeg,.png,.gif,.txt,.json,.yaml,.yml"
|
|
565
|
+
}
|
|
566
|
+
)
|
|
567
|
+
] }),
|
|
568
|
+
(onAttachFolder ?? onAttach) && /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
569
|
+
/* @__PURE__ */ jsx6(
|
|
570
|
+
"button",
|
|
571
|
+
{
|
|
572
|
+
type: "button",
|
|
573
|
+
onClick: handleFolderClick,
|
|
574
|
+
disabled: isStreaming,
|
|
575
|
+
"aria-label": "Attach folder",
|
|
576
|
+
title: "Attach folder",
|
|
577
|
+
className: "mb-0.5 shrink-0 rounded-[var(--radius-md)] border border-transparent p-2 text-[var(--text-muted)] transition-colors hover:border-[var(--border-subtle)] hover:bg-[var(--bg-hover)] hover:text-[var(--text-secondary)] disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--brand-cool)]/60",
|
|
578
|
+
children: /* @__PURE__ */ jsx6(FolderUp, { className: "h-4 w-4" })
|
|
579
|
+
}
|
|
580
|
+
),
|
|
581
|
+
/* @__PURE__ */ jsx6(
|
|
582
|
+
"input",
|
|
583
|
+
{
|
|
584
|
+
ref: folderInputRef,
|
|
585
|
+
type: "file",
|
|
586
|
+
multiple: true,
|
|
587
|
+
className: "hidden",
|
|
588
|
+
onChange: handleFolderChange,
|
|
589
|
+
webkitdirectory: ""
|
|
590
|
+
}
|
|
591
|
+
)
|
|
592
|
+
] }),
|
|
593
|
+
/* @__PURE__ */ jsx6(
|
|
594
|
+
"textarea",
|
|
595
|
+
{
|
|
596
|
+
ref: textareaRef,
|
|
597
|
+
value,
|
|
598
|
+
onChange: handleChange,
|
|
599
|
+
onKeyDown: handleKeyDown,
|
|
600
|
+
placeholder,
|
|
601
|
+
disabled: isStreaming || disabled,
|
|
602
|
+
rows: 1,
|
|
603
|
+
"aria-label": "Message input",
|
|
604
|
+
className: "min-h-[36px] max-h-[160px] flex-1 resize-none bg-transparent text-[15px] leading-7 text-[var(--text-primary)] placeholder:text-[var(--text-muted)] disabled:opacity-50 focus-visible:outline-none"
|
|
605
|
+
}
|
|
606
|
+
),
|
|
607
|
+
isStreaming ? /* @__PURE__ */ jsx6(
|
|
608
|
+
"button",
|
|
609
|
+
{
|
|
610
|
+
type: "button",
|
|
611
|
+
onClick: onCancel,
|
|
612
|
+
"aria-label": "Stop response",
|
|
613
|
+
className: "mb-0.5 shrink-0 rounded-[var(--radius-lg)] border border-[var(--code-error)]/20 bg-[var(--code-error)]/14 p-2.5 text-[var(--code-error)] transition-colors hover:bg-[var(--code-error)]/24 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--code-error)]/50",
|
|
614
|
+
children: /* @__PURE__ */ jsx6(Square, { className: "h-4 w-4" })
|
|
615
|
+
}
|
|
616
|
+
) : /* @__PURE__ */ jsx6(
|
|
617
|
+
"button",
|
|
618
|
+
{
|
|
619
|
+
type: "button",
|
|
620
|
+
onClick: handleSend,
|
|
621
|
+
disabled: !value.trim() || disabled,
|
|
622
|
+
"aria-label": "Send message",
|
|
623
|
+
className: "mb-0.5 shrink-0 rounded-[var(--radius-lg)] border border-[var(--border-accent)] bg-[linear-gradient(135deg,rgba(82,164,255,0.24),rgba(82,164,255,0.08))] p-2.5 text-[var(--brand-cool)] transition-colors hover:translate-y-[-1px] hover:bg-[linear-gradient(135deg,rgba(82,164,255,0.28),rgba(82,164,255,0.12))] disabled:opacity-30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--brand-cool)]/60",
|
|
624
|
+
children: /* @__PURE__ */ jsx6(Send, { className: "h-4 w-4" })
|
|
625
|
+
}
|
|
626
|
+
)
|
|
627
|
+
] })
|
|
628
|
+
] }) }),
|
|
629
|
+
/* @__PURE__ */ jsxs5("div", { className: "mt-2 flex items-center justify-between px-1", children: [
|
|
630
|
+
/* @__PURE__ */ jsx6("div", { className: "flex items-center gap-2", children: modelLabel && /* @__PURE__ */ jsxs5(
|
|
448
631
|
"button",
|
|
449
632
|
{
|
|
450
633
|
type: "button",
|
|
451
|
-
onClick:
|
|
452
|
-
|
|
453
|
-
"
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
/* @__PURE__ */ jsx6(
|
|
459
|
-
"input",
|
|
460
|
-
{
|
|
461
|
-
ref: fileInputRef,
|
|
462
|
-
type: "file",
|
|
463
|
-
multiple: true,
|
|
464
|
-
className: "hidden",
|
|
465
|
-
onChange: handleFileChange,
|
|
466
|
-
accept: ".pdf,.csv,.xlsx,.xls,.jpg,.jpeg,.png,.gif,.txt,.json,.yaml,.yml"
|
|
634
|
+
onClick: onModelClick,
|
|
635
|
+
"aria-label": `Select model, current model ${modelLabel}`,
|
|
636
|
+
className: "inline-flex items-center gap-1.5 rounded-[var(--radius-full)] border border-[var(--border-subtle)] bg-[linear-gradient(180deg,rgba(255,255,255,0.04),transparent)] px-2.5 py-1 text-xs text-[var(--text-muted)] transition-colors hover:border-[var(--border-accent)] hover:text-[var(--text-secondary)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--brand-cool)]/60",
|
|
637
|
+
children: [
|
|
638
|
+
/* @__PURE__ */ jsx6("span", { className: "w-1.5 h-1.5 rounded-full bg-[var(--code-success)]" }),
|
|
639
|
+
modelLabel
|
|
640
|
+
]
|
|
467
641
|
}
|
|
468
|
-
)
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
disabled: isStreaming || disabled,
|
|
479
|
-
rows: 1,
|
|
480
|
-
"aria-label": "Message input",
|
|
481
|
-
className: "min-h-[36px] max-h-[160px] flex-1 resize-none bg-transparent text-[15px] leading-7 text-[var(--text-primary)] placeholder:text-[var(--text-muted)] disabled:opacity-50 focus-visible:outline-none"
|
|
482
|
-
}
|
|
483
|
-
),
|
|
484
|
-
isStreaming ? /* @__PURE__ */ jsx6(
|
|
485
|
-
"button",
|
|
486
|
-
{
|
|
487
|
-
type: "button",
|
|
488
|
-
onClick: onCancel,
|
|
489
|
-
"aria-label": "Stop response",
|
|
490
|
-
className: "mb-0.5 shrink-0 rounded-[var(--radius-lg)] border border-[var(--code-error)]/20 bg-[var(--code-error)]/14 p-2.5 text-[var(--code-error)] transition-colors hover:bg-[var(--code-error)]/24 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--code-error)]/50",
|
|
491
|
-
children: /* @__PURE__ */ jsx6(Square, { className: "h-4 w-4" })
|
|
492
|
-
}
|
|
493
|
-
) : /* @__PURE__ */ jsx6(
|
|
494
|
-
"button",
|
|
495
|
-
{
|
|
496
|
-
type: "button",
|
|
497
|
-
onClick: handleSend,
|
|
498
|
-
disabled: !value.trim() || disabled,
|
|
499
|
-
"aria-label": "Send message",
|
|
500
|
-
className: "mb-0.5 shrink-0 rounded-[var(--radius-lg)] border border-[var(--border-accent)] bg-[linear-gradient(135deg,rgba(82,164,255,0.24),rgba(82,164,255,0.08))] p-2.5 text-[var(--brand-cool)] transition-colors hover:translate-y-[-1px] hover:bg-[linear-gradient(135deg,rgba(82,164,255,0.28),rgba(82,164,255,0.12))] disabled:opacity-30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--brand-cool)]/60",
|
|
501
|
-
children: /* @__PURE__ */ jsx6(Send, { className: "h-4 w-4" })
|
|
502
|
-
}
|
|
503
|
-
)
|
|
504
|
-
] })
|
|
505
|
-
] }) }),
|
|
506
|
-
/* @__PURE__ */ jsxs5("div", { className: "mt-2 flex items-center justify-between px-1", children: [
|
|
507
|
-
/* @__PURE__ */ jsx6("div", { className: "flex items-center gap-2", children: modelLabel && /* @__PURE__ */ jsxs5(
|
|
508
|
-
"button",
|
|
509
|
-
{
|
|
510
|
-
type: "button",
|
|
511
|
-
onClick: onModelClick,
|
|
512
|
-
"aria-label": `Select model, current model ${modelLabel}`,
|
|
513
|
-
className: "inline-flex items-center gap-1.5 rounded-[var(--radius-full)] border border-[var(--border-subtle)] bg-[linear-gradient(180deg,rgba(255,255,255,0.04),transparent)] px-2.5 py-1 text-xs text-[var(--text-muted)] transition-colors hover:border-[var(--border-accent)] hover:text-[var(--text-secondary)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--brand-cool)]/60",
|
|
514
|
-
children: [
|
|
515
|
-
/* @__PURE__ */ jsx6("span", { className: "w-1.5 h-1.5 rounded-full bg-[var(--code-success)]" }),
|
|
516
|
-
modelLabel
|
|
517
|
-
]
|
|
518
|
-
}
|
|
519
|
-
) }),
|
|
520
|
-
/* @__PURE__ */ jsxs5("span", { className: "text-xs text-[var(--text-muted)]", children: [
|
|
521
|
-
/* @__PURE__ */ jsx6("kbd", { className: "px-1 py-0.5 bg-[var(--bg-input)] rounded border border-[var(--border-subtle)] text-[10px]", children: "Cmd" }),
|
|
522
|
-
/* @__PURE__ */ jsx6("kbd", { className: "px-1 py-0.5 bg-[var(--bg-input)] rounded border border-[var(--border-subtle)] text-[10px] ml-0.5", children: "L" }),
|
|
523
|
-
/* @__PURE__ */ jsx6("span", { className: "ml-1", children: "to focus" })
|
|
524
|
-
] })
|
|
525
|
-
] })
|
|
526
|
-
] });
|
|
642
|
+
) }),
|
|
643
|
+
/* @__PURE__ */ jsxs5("span", { className: "text-xs text-[var(--text-muted)]", children: [
|
|
644
|
+
/* @__PURE__ */ jsx6("kbd", { className: "px-1 py-0.5 bg-[var(--bg-input)] rounded border border-[var(--border-subtle)] text-[10px]", children: "Cmd" }),
|
|
645
|
+
/* @__PURE__ */ jsx6("kbd", { className: "px-1 py-0.5 bg-[var(--bg-input)] rounded border border-[var(--border-subtle)] text-[10px] ml-0.5", children: "L" }),
|
|
646
|
+
/* @__PURE__ */ jsx6("span", { className: "ml-1", children: "to focus" })
|
|
647
|
+
] })
|
|
648
|
+
] })
|
|
649
|
+
]
|
|
650
|
+
}
|
|
651
|
+
);
|
|
527
652
|
}
|
|
528
653
|
|
|
529
654
|
// src/chat/chat-container.tsx
|