@invergent/agent-chat-react 1.9.8 → 2.0.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/dist/index.cjs +327 -264
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +323 -257
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { cn } from './chunk-QSC4UIVT.js';
|
|
2
2
|
import { createContext, memo, useRef, useEffect, useCallback, useMemo, useState, lazy, useContext, Suspense, Children } from 'react';
|
|
3
|
-
import { ChevronDownIcon, AlertTriangle, ChevronDown, ChevronRight, RefreshCw, File as File$1, FileImage, FileAudio, FileVideo, FileText, FileCode, FileArchive, FileSpreadsheet, InboxIcon, Loader2, AlertCircle, Pause, Play, Ban, TargetIcon, ChevronRightIcon, CalendarClockIcon, UsersIcon, MessageSquareIcon, ZapIcon, Maximize2Icon, FolderOpenIcon, Loader2Icon, UploadIcon, RefreshCwIcon, AlertCircleIcon, ExternalLinkIcon, ClipboardCheckIcon, ShieldAlertIcon, TimerIcon, CircleDotIcon, XIcon, Trash2Icon, SquareIcon, ArrowDownIcon, RotateCcwIcon, MousePointer2Icon, DownloadIcon, TrashIcon, ImageIcon, FileTextIcon, CheckIcon, CopyIcon, FolderIcon, FileIcon, ChevronLeftIcon, MinusIcon,
|
|
3
|
+
import { ChevronDownIcon, AlertTriangle, ChevronDown, ChevronRight, RefreshCw, File as File$1, FileImage, FileAudio, FileVideo, FileText, FileCode, FileArchive, FileSpreadsheet, InboxIcon, Loader2, AlertCircle, Pause, Play, Ban, TargetIcon, ChevronRightIcon, CalendarClockIcon, UsersIcon, MessageSquareIcon, ZapIcon, Maximize2Icon, FolderOpenIcon, Loader2Icon, UploadIcon, RefreshCwIcon, AlertCircleIcon, ExternalLinkIcon, ClipboardCheckIcon, ShieldAlertIcon, TimerIcon, CircleDotIcon, XIcon, Trash2Icon, SquareIcon, ArrowDownIcon, RotateCcwIcon, MousePointer2Icon, DownloadIcon, TrashIcon, ImageIcon, FileTextIcon, CheckIcon, CopyIcon, TerminalIcon, SparklesIcon, ClockIcon, PlusIcon, CloudIcon, HardDriveIcon, PaperclipIcon, FolderIcon, FileIcon, ChevronLeftIcon, MinusIcon, SearchIcon, GitBranchIcon, ThumbsUpIcon, ThumbsDownIcon, ActivityIcon, EyeIcon, GlobeIcon, ListTodoIcon, ArrowUpIcon, XCircleIcon, CheckCircle2Icon, Code, CircleCheckIcon, CircleXIcon, SkullIcon, CheckCircleIcon, CircleIcon } from 'lucide-react';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
|
-
import { Collapsible as Collapsible$1, Slot, Tooltip as Tooltip$1, Separator as Separator$1, Dialog as Dialog$1, ScrollArea as ScrollArea$1, Popover as Popover$1,
|
|
5
|
+
import { Collapsible as Collapsible$1, Slot, Tooltip as Tooltip$1, Separator as Separator$1, Dialog as Dialog$1, ScrollArea as ScrollArea$1, Popover as Popover$1, Progress as Progress$1, Tabs as Tabs$1 } from 'radix-ui';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
import { StickToBottom, useStickToBottomContext } from 'use-stick-to-bottom';
|
|
8
8
|
import { cjk } from '@streamdown/cjk';
|
|
@@ -44,13 +44,13 @@ var buttonVariants = cva(
|
|
|
44
44
|
link: "text-primary underline underline-offset-4 hover:underline"
|
|
45
45
|
},
|
|
46
46
|
size: {
|
|
47
|
-
default: "h-10 gap-1.5 px-6 has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4",
|
|
47
|
+
default: "h-11 md:h-10 gap-1.5 px-6 has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4",
|
|
48
48
|
xs: "h-7 gap-1 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3",
|
|
49
|
-
sm: "h-9 gap-1 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
|
|
49
|
+
sm: "h-11 md:h-9 gap-1 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
|
|
50
50
|
lg: "h-11 gap-1.5 px-8 has-data-[icon=inline-end]:pr-5 has-data-[icon=inline-start]:pl-5",
|
|
51
|
-
icon: "size-10",
|
|
51
|
+
icon: "size-11 md:size-10",
|
|
52
52
|
"icon-xs": "size-7 [&_svg:not([class*='size-'])]:size-3",
|
|
53
|
-
"icon-sm": "size-9",
|
|
53
|
+
"icon-sm": "size-11 md:size-9",
|
|
54
54
|
"icon-lg": "size-11"
|
|
55
55
|
}
|
|
56
56
|
},
|
|
@@ -483,7 +483,7 @@ function BrowserPane({ sessionId, state, adapter }) {
|
|
|
483
483
|
DialogContent,
|
|
484
484
|
{
|
|
485
485
|
"aria-describedby": void 0,
|
|
486
|
-
className: "flex h-
|
|
486
|
+
className: "flex h-dvh w-screen max-w-none flex-col gap-0 overflow-hidden rounded-none border-0 bg-background p-0 shadow-none ring-0 sm:max-w-none",
|
|
487
487
|
children: [
|
|
488
488
|
/* @__PURE__ */ jsxs(DialogHeader, { className: "h-10 shrink-0 flex-row items-center gap-2 border-b border-line bg-card px-4 py-0", children: [
|
|
489
489
|
/* @__PURE__ */ jsx(ZapIcon, { className: "size-3.5 text-muted-foreground", "aria-hidden": "true" }),
|
|
@@ -3171,7 +3171,7 @@ function Textarea({ className, ...props }) {
|
|
|
3171
3171
|
{
|
|
3172
3172
|
"data-slot": "textarea",
|
|
3173
3173
|
className: cn(
|
|
3174
|
-
"flex field-sizing-content min-h-16 w-full resize-none rounded-none border border-transparent border-b-input bg-transparent px-0 py-3 text-base transition-[color,border-color] outline-none placeholder:text-muted-foreground focus-visible:border-b-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-b-destructive
|
|
3174
|
+
"flex field-sizing-content min-h-16 w-full resize-none rounded-none border border-transparent border-b-input bg-transparent px-0 py-3 text-base transition-[color,border-color] outline-none placeholder:text-muted-foreground focus-visible:border-b-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-b-destructive dark:aria-invalid:border-b-destructive/50",
|
|
3175
3175
|
className
|
|
3176
3176
|
),
|
|
3177
3177
|
...props
|
|
@@ -3478,7 +3478,7 @@ function Input({ className, type, ...props }) {
|
|
|
3478
3478
|
type,
|
|
3479
3479
|
"data-slot": "input",
|
|
3480
3480
|
className: cn(
|
|
3481
|
-
"h-10 w-full min-w-0 border border-transparent border-b-input bg-transparent px-0 py-1 text-base transition-[color,border-color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-b-ring disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-b-destructive md:text-sm dark:aria-invalid:border-b-destructive/50",
|
|
3481
|
+
"h-11 md:h-10 w-full min-w-0 border border-transparent border-b-input bg-transparent px-0 py-1 text-base transition-[color,border-color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-b-ring disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-b-destructive md:text-sm dark:aria-invalid:border-b-destructive/50",
|
|
3482
3482
|
className
|
|
3483
3483
|
),
|
|
3484
3484
|
...props
|
|
@@ -4308,7 +4308,7 @@ function InputGroup({ className, ...props }) {
|
|
|
4308
4308
|
"data-slot": "input-group",
|
|
4309
4309
|
role: "group",
|
|
4310
4310
|
className: cn(
|
|
4311
|
-
"group/input-group relative flex h-10 w-full min-w-0 items-center rounded-none border border-transparent border-b-input bg-transparent transition-[color,border-color] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-data-[align=block-end]:rounded-none has-data-[align=block-start]:rounded-none has-[[data-slot=input-group-control]:focus-visible]:border-b-ring has-[[data-slot][aria-invalid=true]]:border-b-destructive has-[textarea]:rounded-none has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:has-[[data-slot][aria-invalid=true]]:border-b-destructive/50 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3",
|
|
4311
|
+
"group/input-group relative flex h-11 md:h-10 w-full min-w-0 items-center rounded-none border border-transparent border-b-input bg-transparent transition-[color,border-color] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-data-[align=block-end]:rounded-none has-data-[align=block-start]:rounded-none has-[[data-slot=input-group-control]:focus-visible]:border-b-ring has-[[data-slot][aria-invalid=true]]:border-b-destructive has-[textarea]:rounded-none has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:has-[[data-slot][aria-invalid=true]]:border-b-destructive/50 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3",
|
|
4312
4312
|
className
|
|
4313
4313
|
),
|
|
4314
4314
|
...props
|
|
@@ -4423,7 +4423,7 @@ function CommandInput({
|
|
|
4423
4423
|
className,
|
|
4424
4424
|
...props
|
|
4425
4425
|
}) {
|
|
4426
|
-
return /* @__PURE__ */ jsx("div", { "data-slot": "command-input-wrapper", className: "p-
|
|
4426
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "command-input-wrapper", className: "p-3", children: /* @__PURE__ */ jsxs(InputGroup, { className: "rounded-lg border-transparent bg-muted px-3", children: [
|
|
4427
4427
|
/* @__PURE__ */ jsx(
|
|
4428
4428
|
Command$1.Input,
|
|
4429
4429
|
{
|
|
@@ -4467,35 +4467,6 @@ function CommandEmpty({
|
|
|
4467
4467
|
}
|
|
4468
4468
|
);
|
|
4469
4469
|
}
|
|
4470
|
-
function CommandGroup({
|
|
4471
|
-
className,
|
|
4472
|
-
...props
|
|
4473
|
-
}) {
|
|
4474
|
-
return /* @__PURE__ */ jsx(
|
|
4475
|
-
Command$1.Group,
|
|
4476
|
-
{
|
|
4477
|
-
"data-slot": "command-group",
|
|
4478
|
-
className: cn(
|
|
4479
|
-
"overflow-hidden p-1.5 text-foreground **:[[cmdk-group-heading]]:px-3 **:[[cmdk-group-heading]]:py-2 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-semibold **:[[cmdk-group-heading]]:tracking-wider **:[[cmdk-group-heading]]:text-muted-foreground **:[[cmdk-group-heading]]:uppercase",
|
|
4480
|
-
className
|
|
4481
|
-
),
|
|
4482
|
-
...props
|
|
4483
|
-
}
|
|
4484
|
-
);
|
|
4485
|
-
}
|
|
4486
|
-
function CommandSeparator({
|
|
4487
|
-
className,
|
|
4488
|
-
...props
|
|
4489
|
-
}) {
|
|
4490
|
-
return /* @__PURE__ */ jsx(
|
|
4491
|
-
Command$1.Separator,
|
|
4492
|
-
{
|
|
4493
|
-
"data-slot": "command-separator",
|
|
4494
|
-
className: cn("-mx-1.5 my-1.5 h-px bg-border/50", className),
|
|
4495
|
-
...props
|
|
4496
|
-
}
|
|
4497
|
-
);
|
|
4498
|
-
}
|
|
4499
4470
|
function CommandItem({
|
|
4500
4471
|
className,
|
|
4501
4472
|
children,
|
|
@@ -4506,7 +4477,7 @@ function CommandItem({
|
|
|
4506
4477
|
{
|
|
4507
4478
|
"data-slot": "command-item",
|
|
4508
4479
|
className: cn(
|
|
4509
|
-
"group/command-item relative flex cursor-default items-center gap-2 rounded-none px-3 py-2 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-selected:*:[svg]:text-foreground",
|
|
4480
|
+
"group/command-item relative flex cursor-default items-center gap-2 rounded-none px-3 py-2 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-muted data-[selected=true]:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-[selected=true]:*:[svg]:text-foreground",
|
|
4510
4481
|
className
|
|
4511
4482
|
),
|
|
4512
4483
|
...props,
|
|
@@ -4517,89 +4488,6 @@ function CommandItem({
|
|
|
4517
4488
|
}
|
|
4518
4489
|
);
|
|
4519
4490
|
}
|
|
4520
|
-
function DropdownMenu({
|
|
4521
|
-
...props
|
|
4522
|
-
}) {
|
|
4523
|
-
return /* @__PURE__ */ jsx(DropdownMenu$1.Root, { "data-slot": "dropdown-menu", ...props });
|
|
4524
|
-
}
|
|
4525
|
-
function DropdownMenuTrigger({
|
|
4526
|
-
...props
|
|
4527
|
-
}) {
|
|
4528
|
-
return /* @__PURE__ */ jsx(
|
|
4529
|
-
DropdownMenu$1.Trigger,
|
|
4530
|
-
{
|
|
4531
|
-
"data-slot": "dropdown-menu-trigger",
|
|
4532
|
-
...props
|
|
4533
|
-
}
|
|
4534
|
-
);
|
|
4535
|
-
}
|
|
4536
|
-
function DropdownMenuContent({
|
|
4537
|
-
className,
|
|
4538
|
-
align = "start",
|
|
4539
|
-
sideOffset = 4,
|
|
4540
|
-
...props
|
|
4541
|
-
}) {
|
|
4542
|
-
return /* @__PURE__ */ jsx(DropdownMenu$1.Portal, { children: /* @__PURE__ */ jsx(
|
|
4543
|
-
DropdownMenu$1.Content,
|
|
4544
|
-
{
|
|
4545
|
-
"data-slot": "dropdown-menu-content",
|
|
4546
|
-
sideOffset,
|
|
4547
|
-
align,
|
|
4548
|
-
className: cn("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-48 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-none bg-popover p-1.5 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
4549
|
-
...props
|
|
4550
|
-
}
|
|
4551
|
-
) });
|
|
4552
|
-
}
|
|
4553
|
-
function DropdownMenuItem({
|
|
4554
|
-
className,
|
|
4555
|
-
inset,
|
|
4556
|
-
variant = "default",
|
|
4557
|
-
...props
|
|
4558
|
-
}) {
|
|
4559
|
-
return /* @__PURE__ */ jsx(
|
|
4560
|
-
DropdownMenu$1.Item,
|
|
4561
|
-
{
|
|
4562
|
-
"data-slot": "dropdown-menu-item",
|
|
4563
|
-
"data-inset": inset,
|
|
4564
|
-
"data-variant": variant,
|
|
4565
|
-
className: cn(
|
|
4566
|
-
"group/dropdown-menu-item relative flex cursor-default items-center gap-2.5 rounded-none px-3 py-2 text-xs font-medium tracking-wider uppercase outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-9.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-[variant=destructive]:*:[svg]:text-destructive",
|
|
4567
|
-
className
|
|
4568
|
-
),
|
|
4569
|
-
...props
|
|
4570
|
-
}
|
|
4571
|
-
);
|
|
4572
|
-
}
|
|
4573
|
-
function HoverCard({
|
|
4574
|
-
...props
|
|
4575
|
-
}) {
|
|
4576
|
-
return /* @__PURE__ */ jsx(HoverCard$1.Root, { "data-slot": "hover-card", ...props });
|
|
4577
|
-
}
|
|
4578
|
-
function HoverCardTrigger({
|
|
4579
|
-
...props
|
|
4580
|
-
}) {
|
|
4581
|
-
return /* @__PURE__ */ jsx(HoverCard$1.Trigger, { "data-slot": "hover-card-trigger", ...props });
|
|
4582
|
-
}
|
|
4583
|
-
function HoverCardContent({
|
|
4584
|
-
className,
|
|
4585
|
-
align = "center",
|
|
4586
|
-
sideOffset = 4,
|
|
4587
|
-
...props
|
|
4588
|
-
}) {
|
|
4589
|
-
return /* @__PURE__ */ jsx(HoverCard$1.Portal, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ jsx(
|
|
4590
|
-
HoverCard$1.Content,
|
|
4591
|
-
{
|
|
4592
|
-
"data-slot": "hover-card-content",
|
|
4593
|
-
align,
|
|
4594
|
-
sideOffset,
|
|
4595
|
-
className: cn(
|
|
4596
|
-
"z-50 w-72 origin-(--radix-hover-card-content-transform-origin) bg-popover p-4 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
4597
|
-
className
|
|
4598
|
-
),
|
|
4599
|
-
...props
|
|
4600
|
-
}
|
|
4601
|
-
) });
|
|
4602
|
-
}
|
|
4603
4491
|
function Spinner({ className, ...props }) {
|
|
4604
4492
|
return /* @__PURE__ */ jsx(Loader2Icon, { role: "status", "aria-label": "Loading", className: cn("size-4 animate-spin", className), ...props });
|
|
4605
4493
|
}
|
|
@@ -4751,24 +4639,6 @@ var usePromptInputAttachments = () => {
|
|
|
4751
4639
|
return context;
|
|
4752
4640
|
};
|
|
4753
4641
|
var LocalReferencedSourcesContext = createContext(null);
|
|
4754
|
-
var PromptInputActionAddAttachments = ({
|
|
4755
|
-
label = "Add photos or files",
|
|
4756
|
-
...props
|
|
4757
|
-
}) => {
|
|
4758
|
-
const attachments = usePromptInputAttachments();
|
|
4759
|
-
const handleSelect = useCallback(
|
|
4760
|
-
(e) => {
|
|
4761
|
-
e.preventDefault();
|
|
4762
|
-
attachments.openFileDialog();
|
|
4763
|
-
},
|
|
4764
|
-
[attachments]
|
|
4765
|
-
);
|
|
4766
|
-
return /* @__PURE__ */ jsxs(DropdownMenuItem, { ...props, onSelect: handleSelect, children: [
|
|
4767
|
-
/* @__PURE__ */ jsx(ImageIcon, { className: "mr-2 size-4" }),
|
|
4768
|
-
" ",
|
|
4769
|
-
label
|
|
4770
|
-
] });
|
|
4771
|
-
};
|
|
4772
4642
|
var PromptInput = ({
|
|
4773
4643
|
className,
|
|
4774
4644
|
accept,
|
|
@@ -5104,7 +4974,7 @@ var PromptInput = ({
|
|
|
5104
4974
|
onSubmit: handleSubmit,
|
|
5105
4975
|
ref: formRef,
|
|
5106
4976
|
...props,
|
|
5107
|
-
children: /* @__PURE__ */ jsx(InputGroup, { className: "overflow-hidden", children })
|
|
4977
|
+
children: /* @__PURE__ */ jsx(InputGroup, { className: "overflow-hidden rounded-3xl border border-input bg-white px-3 py-1 shadow-sm dark:bg-card dark:shadow-none dark:ring-1 dark:ring-white/5 has-[textarea]:rounded-3xl has-[>[data-align=block-end]]:rounded-3xl has-[>[data-align=block-start]]:rounded-3xl", children })
|
|
5108
4978
|
}
|
|
5109
4979
|
)
|
|
5110
4980
|
] });
|
|
@@ -5194,7 +5064,7 @@ var PromptInputTextarea = ({
|
|
|
5194
5064
|
return /* @__PURE__ */ jsx(
|
|
5195
5065
|
InputGroupTextarea,
|
|
5196
5066
|
{
|
|
5197
|
-
className: cn("field-sizing-content max-h-48 min-h-16", className),
|
|
5067
|
+
className: cn("field-sizing-content max-h-48 min-h-16 px-1.5 py-3", className),
|
|
5198
5068
|
name: "message",
|
|
5199
5069
|
onCompositionEnd: handleCompositionEnd,
|
|
5200
5070
|
onCompositionStart: handleCompositionStart,
|
|
@@ -5238,7 +5108,11 @@ var PromptInputButton = ({
|
|
|
5238
5108
|
const button = /* @__PURE__ */ jsx(
|
|
5239
5109
|
InputGroupButton,
|
|
5240
5110
|
{
|
|
5241
|
-
className: cn(
|
|
5111
|
+
className: cn(
|
|
5112
|
+
"rounded-sm border border-input/70 text-foreground hover:bg-accent",
|
|
5113
|
+
newSize === "icon-sm" && "size-9",
|
|
5114
|
+
className
|
|
5115
|
+
),
|
|
5242
5116
|
size: newSize,
|
|
5243
5117
|
type: "button",
|
|
5244
5118
|
variant,
|
|
@@ -5259,19 +5133,9 @@ var PromptInputButton = ({
|
|
|
5259
5133
|
] })
|
|
5260
5134
|
] });
|
|
5261
5135
|
};
|
|
5262
|
-
var PromptInputActionMenu = (props) => /* @__PURE__ */ jsx(DropdownMenu, { ...props });
|
|
5263
|
-
var PromptInputActionMenuTrigger = ({
|
|
5264
|
-
className,
|
|
5265
|
-
children,
|
|
5266
|
-
...props
|
|
5267
|
-
}) => /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(PromptInputButton, { className, ...props, children: children ?? /* @__PURE__ */ jsx(PlusIcon, { className: "size-4" }) }) });
|
|
5268
|
-
var PromptInputActionMenuContent = ({
|
|
5269
|
-
className,
|
|
5270
|
-
...props
|
|
5271
|
-
}) => /* @__PURE__ */ jsx(DropdownMenuContent, { align: "start", className: cn(className), ...props });
|
|
5272
5136
|
var PromptInputSubmit = ({
|
|
5273
5137
|
className,
|
|
5274
|
-
variant = "
|
|
5138
|
+
variant = "secondary",
|
|
5275
5139
|
size = "icon-sm",
|
|
5276
5140
|
status,
|
|
5277
5141
|
onStop,
|
|
@@ -5280,11 +5144,11 @@ var PromptInputSubmit = ({
|
|
|
5280
5144
|
...props
|
|
5281
5145
|
}) => {
|
|
5282
5146
|
const isGenerating = status === "submitted" || status === "streaming";
|
|
5283
|
-
let Icon = /* @__PURE__ */ jsx(
|
|
5147
|
+
let Icon = /* @__PURE__ */ jsx(ArrowUpIcon, { className: "size-4" });
|
|
5284
5148
|
if (status === "submitted") {
|
|
5285
5149
|
Icon = /* @__PURE__ */ jsx(Spinner, {});
|
|
5286
5150
|
} else if (status === "streaming") {
|
|
5287
|
-
Icon = /* @__PURE__ */ jsx(SquareIcon, { className: "size-
|
|
5151
|
+
Icon = /* @__PURE__ */ jsx(SquareIcon, { className: "size-3 fill-current" });
|
|
5288
5152
|
} else if (status === "error") {
|
|
5289
5153
|
Icon = /* @__PURE__ */ jsx(XIcon, { className: "size-4" });
|
|
5290
5154
|
}
|
|
@@ -5303,7 +5167,7 @@ var PromptInputSubmit = ({
|
|
|
5303
5167
|
InputGroupButton,
|
|
5304
5168
|
{
|
|
5305
5169
|
"aria-label": isGenerating ? "Stop" : "Submit",
|
|
5306
|
-
className: cn(className),
|
|
5170
|
+
className: cn("rounded-full", className),
|
|
5307
5171
|
onClick: handleClick,
|
|
5308
5172
|
size,
|
|
5309
5173
|
type: isGenerating && onStop ? "button" : "submit",
|
|
@@ -5313,6 +5177,41 @@ var PromptInputSubmit = ({
|
|
|
5313
5177
|
}
|
|
5314
5178
|
);
|
|
5315
5179
|
};
|
|
5180
|
+
function Popover({
|
|
5181
|
+
...props
|
|
5182
|
+
}) {
|
|
5183
|
+
return /* @__PURE__ */ jsx(Popover$1.Root, { "data-slot": "popover", ...props });
|
|
5184
|
+
}
|
|
5185
|
+
function PopoverTrigger({
|
|
5186
|
+
...props
|
|
5187
|
+
}) {
|
|
5188
|
+
return /* @__PURE__ */ jsx(Popover$1.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
5189
|
+
}
|
|
5190
|
+
function PopoverContent({
|
|
5191
|
+
className,
|
|
5192
|
+
align = "center",
|
|
5193
|
+
sideOffset = 4,
|
|
5194
|
+
...props
|
|
5195
|
+
}) {
|
|
5196
|
+
return /* @__PURE__ */ jsx(Popover$1.Portal, { children: /* @__PURE__ */ jsx(
|
|
5197
|
+
Popover$1.Content,
|
|
5198
|
+
{
|
|
5199
|
+
"data-slot": "popover-content",
|
|
5200
|
+
align,
|
|
5201
|
+
sideOffset,
|
|
5202
|
+
className: cn(
|
|
5203
|
+
"z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-4 rounded-none bg-popover p-4 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-150 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
5204
|
+
className
|
|
5205
|
+
),
|
|
5206
|
+
...props
|
|
5207
|
+
}
|
|
5208
|
+
) });
|
|
5209
|
+
}
|
|
5210
|
+
function PopoverAnchor({
|
|
5211
|
+
...props
|
|
5212
|
+
}) {
|
|
5213
|
+
return /* @__PURE__ */ jsx(Popover$1.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
5214
|
+
}
|
|
5316
5215
|
function Progress({
|
|
5317
5216
|
className,
|
|
5318
5217
|
value,
|
|
@@ -5362,7 +5261,7 @@ var Context = ({
|
|
|
5362
5261
|
() => ({ maxTokens, modelId, usage, usedTokens }),
|
|
5363
5262
|
[maxTokens, modelId, usage, usedTokens]
|
|
5364
5263
|
);
|
|
5365
|
-
return /* @__PURE__ */ jsx(ContextContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
|
|
5264
|
+
return /* @__PURE__ */ jsx(ContextContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(Popover, { ...props }) });
|
|
5366
5265
|
};
|
|
5367
5266
|
var ContextIcon = () => {
|
|
5368
5267
|
const { usedTokens, maxTokens } = useContextValue();
|
|
@@ -5412,13 +5311,13 @@ var ContextIcon = () => {
|
|
|
5412
5311
|
);
|
|
5413
5312
|
};
|
|
5414
5313
|
var ContextTrigger = ({ children, ...props }) => {
|
|
5415
|
-
return /* @__PURE__ */ jsx(
|
|
5314
|
+
return /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: children ?? /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", ...props, children: /* @__PURE__ */ jsx(ContextIcon, {}) }) });
|
|
5416
5315
|
};
|
|
5417
5316
|
var ContextContent = ({
|
|
5418
5317
|
className,
|
|
5419
5318
|
...props
|
|
5420
5319
|
}) => /* @__PURE__ */ jsx(
|
|
5421
|
-
|
|
5320
|
+
PopoverContent,
|
|
5422
5321
|
{
|
|
5423
5322
|
className: cn("min-w-60 divide-y overflow-hidden p-0", className),
|
|
5424
5323
|
...props
|
|
@@ -5721,36 +5620,6 @@ function ItemActions({ className, ...props }) {
|
|
|
5721
5620
|
}
|
|
5722
5621
|
);
|
|
5723
5622
|
}
|
|
5724
|
-
function Popover({
|
|
5725
|
-
...props
|
|
5726
|
-
}) {
|
|
5727
|
-
return /* @__PURE__ */ jsx(Popover$1.Root, { "data-slot": "popover", ...props });
|
|
5728
|
-
}
|
|
5729
|
-
function PopoverContent({
|
|
5730
|
-
className,
|
|
5731
|
-
align = "center",
|
|
5732
|
-
sideOffset = 4,
|
|
5733
|
-
...props
|
|
5734
|
-
}) {
|
|
5735
|
-
return /* @__PURE__ */ jsx(Popover$1.Portal, { children: /* @__PURE__ */ jsx(
|
|
5736
|
-
Popover$1.Content,
|
|
5737
|
-
{
|
|
5738
|
-
"data-slot": "popover-content",
|
|
5739
|
-
align,
|
|
5740
|
-
sideOffset,
|
|
5741
|
-
className: cn(
|
|
5742
|
-
"z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-4 rounded-none bg-popover p-4 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
5743
|
-
className
|
|
5744
|
-
),
|
|
5745
|
-
...props
|
|
5746
|
-
}
|
|
5747
|
-
) });
|
|
5748
|
-
}
|
|
5749
|
-
function PopoverAnchor({
|
|
5750
|
-
...props
|
|
5751
|
-
}) {
|
|
5752
|
-
return /* @__PURE__ */ jsx(Popover$1.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
5753
|
-
}
|
|
5754
5623
|
function ChatComposer(props) {
|
|
5755
5624
|
return /* @__PURE__ */ jsx(PromptInputProvider, { children: /* @__PURE__ */ jsx(ChatComposerInner, { ...props }) });
|
|
5756
5625
|
}
|
|
@@ -5832,10 +5701,12 @@ function ChatComposerInner({
|
|
|
5832
5701
|
onComposerError
|
|
5833
5702
|
}) {
|
|
5834
5703
|
const { adapter } = useAgentChatAdapterContext();
|
|
5835
|
-
const { textInput } = usePromptInputController();
|
|
5704
|
+
const { textInput, attachments } = usePromptInputController();
|
|
5836
5705
|
const status = isRunning ? "streaming" : disabled ? "error" : "ready";
|
|
5837
5706
|
const [adapterCommands, setAdapterCommands] = useState([]);
|
|
5838
5707
|
const [buttonMenuOpen, setButtonMenuOpen] = useState(false);
|
|
5708
|
+
const [menuMode, setMenuMode] = useState("all");
|
|
5709
|
+
const [addMenuOpen, setAddMenuOpen] = useState(false);
|
|
5839
5710
|
const [menuDismissed, setMenuDismissed] = useState(false);
|
|
5840
5711
|
const showSlashMenu = !menuDismissed && (textInput.value.startsWith("/") || buttonMenuOpen);
|
|
5841
5712
|
useEffect(() => {
|
|
@@ -5843,17 +5714,17 @@ function ChatComposerInner({
|
|
|
5843
5714
|
setMenuDismissed(false);
|
|
5844
5715
|
}
|
|
5845
5716
|
}, [buttonMenuOpen, menuDismissed, textInput.value]);
|
|
5846
|
-
const [wasClosed, setWasClosed] = useState(true);
|
|
5847
5717
|
useEffect(() => {
|
|
5848
|
-
if (
|
|
5849
|
-
|
|
5718
|
+
if (textInput.value.startsWith("/")) {
|
|
5719
|
+
setMenuMode("all");
|
|
5720
|
+
}
|
|
5721
|
+
}, [textInput.value]);
|
|
5722
|
+
useEffect(() => {
|
|
5723
|
+
if (showSlashMenu && (menuMode === "skills" || menuMode === "all")) {
|
|
5850
5724
|
adapter.listSlashCommands?.().then(setAdapterCommands).catch(() => {
|
|
5851
5725
|
});
|
|
5852
5726
|
}
|
|
5853
|
-
|
|
5854
|
-
setWasClosed(true);
|
|
5855
|
-
}
|
|
5856
|
-
}, [adapter, showSlashMenu, wasClosed]);
|
|
5727
|
+
}, [adapter, showSlashMenu, menuMode]);
|
|
5857
5728
|
const builtinCommands = useMemo(
|
|
5858
5729
|
() => [
|
|
5859
5730
|
{ value: "/clear", label: "/clear", description: "Clear conversation" },
|
|
@@ -5874,6 +5745,23 @@ function ChatComposerInner({
|
|
|
5874
5745
|
],
|
|
5875
5746
|
[]
|
|
5876
5747
|
);
|
|
5748
|
+
const scheduledExamples = useMemo(
|
|
5749
|
+
() => [
|
|
5750
|
+
{ value: "/loop list", label: "/loop list", description: "List your active scheduled tasks" },
|
|
5751
|
+
{ value: "/loop cancel ", label: "/loop cancel <id>", description: "Cancel a scheduled task by ID" },
|
|
5752
|
+
{ value: "/loop 5m check the deployment status and surface any failures", label: "/loop 5m deployment check", description: "Every 5 minutes: poll deployment status" },
|
|
5753
|
+
{ value: "/loop 10m pull the build queue and report any stuck jobs", label: "/loop 10m build queue", description: "Every 10 minutes: review the build queue" },
|
|
5754
|
+
{ value: "/loop 15m triage new PRs assigned to me", label: "/loop 15m PR triage", description: "Every 15 minutes: triage incoming PRs" },
|
|
5755
|
+
{ value: "/loop 30m summarize new threads in support inbox", label: "/loop 30m support inbox", description: "Every 30 minutes: summarize support traffic" },
|
|
5756
|
+
{ value: "/loop 1h review the on-call dashboard and flag anomalies", label: "/loop 1h on-call check", description: "Hourly: review the on-call dashboard" },
|
|
5757
|
+
{ value: "/loop 2h scan production error rates and alert if elevated", label: "/loop 2h error scan", description: "Every 2 hours: production error scan" },
|
|
5758
|
+
{ value: "/loop 1d give me a morning briefing of yesterday's activity", label: "/loop 1d daily briefing", description: "Daily: morning briefing of prior day" },
|
|
5759
|
+
{ value: "/loop every 5 minutes check whether CI on the current branch has finished", label: "/loop every 5 minutes (verbose)", description: "Verbose interval form" },
|
|
5760
|
+
{ value: "/loop watch the active deploy and notify me when it stabilises or rolls back", label: "/loop <prompt> (dynamic)", description: "Dynamic loop \u2014 model self-paces 1m\u20131h via loop_wait" },
|
|
5761
|
+
{ value: "/loop babysit the long-running data migration and only ping me on errors or completion", label: "/loop migration watcher (dynamic)", description: "Dynamic loop \u2014 best when cadence is unpredictable" }
|
|
5762
|
+
],
|
|
5763
|
+
[]
|
|
5764
|
+
);
|
|
5877
5765
|
const searchQuery = showSlashMenu ? textInput.value.slice(1) : "";
|
|
5878
5766
|
const menuOpen = showSlashMenu;
|
|
5879
5767
|
const textareaRef = useRef(null);
|
|
@@ -5888,7 +5776,7 @@ function ChatComposerInner({
|
|
|
5888
5776
|
}, []);
|
|
5889
5777
|
const handleCommandSelect = useCallback(
|
|
5890
5778
|
(commandValue) => {
|
|
5891
|
-
textInput.setInput(commandValue
|
|
5779
|
+
textInput.setInput(`${commandValue} `);
|
|
5892
5780
|
setButtonMenuOpen(false);
|
|
5893
5781
|
setMenuDismissed(true);
|
|
5894
5782
|
focusTextareaAtEnd();
|
|
@@ -5897,7 +5785,7 @@ function ChatComposerInner({
|
|
|
5897
5785
|
);
|
|
5898
5786
|
const handleSearchChange = useCallback(
|
|
5899
5787
|
(next) => {
|
|
5900
|
-
textInput.setInput(
|
|
5788
|
+
textInput.setInput(`/${next}`);
|
|
5901
5789
|
},
|
|
5902
5790
|
[textInput]
|
|
5903
5791
|
);
|
|
@@ -5992,6 +5880,62 @@ function ChatComposerInner({
|
|
|
5992
5880
|
},
|
|
5993
5881
|
children: [
|
|
5994
5882
|
/* @__PURE__ */ jsx(AttachmentPreviewStrip, {}),
|
|
5883
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-end gap-2 px-1 pb-2", children: [
|
|
5884
|
+
/* @__PURE__ */ jsxs(
|
|
5885
|
+
Button,
|
|
5886
|
+
{
|
|
5887
|
+
type: "button",
|
|
5888
|
+
variant: "secondary",
|
|
5889
|
+
size: "sm",
|
|
5890
|
+
className: "rounded-sm -uppercase font-display bg-white dark:bg-accent border-2 border-accent",
|
|
5891
|
+
onClick: () => {
|
|
5892
|
+
setMenuMode("commands");
|
|
5893
|
+
setMenuDismissed(false);
|
|
5894
|
+
setButtonMenuOpen(true);
|
|
5895
|
+
},
|
|
5896
|
+
children: [
|
|
5897
|
+
/* @__PURE__ */ jsx(TerminalIcon, {}),
|
|
5898
|
+
"Commands"
|
|
5899
|
+
]
|
|
5900
|
+
}
|
|
5901
|
+
),
|
|
5902
|
+
/* @__PURE__ */ jsxs(
|
|
5903
|
+
Button,
|
|
5904
|
+
{
|
|
5905
|
+
type: "button",
|
|
5906
|
+
variant: "secondary",
|
|
5907
|
+
size: "sm",
|
|
5908
|
+
className: "rounded-sm -uppercase font-display bg-white dark:bg-accent border-2 border-accent",
|
|
5909
|
+
onClick: () => {
|
|
5910
|
+
setMenuMode("skills");
|
|
5911
|
+
setMenuDismissed(false);
|
|
5912
|
+
setButtonMenuOpen(true);
|
|
5913
|
+
},
|
|
5914
|
+
children: [
|
|
5915
|
+
/* @__PURE__ */ jsx(SparklesIcon, {}),
|
|
5916
|
+
"Skills"
|
|
5917
|
+
]
|
|
5918
|
+
}
|
|
5919
|
+
),
|
|
5920
|
+
/* @__PURE__ */ jsxs(
|
|
5921
|
+
Button,
|
|
5922
|
+
{
|
|
5923
|
+
type: "button",
|
|
5924
|
+
variant: "secondary",
|
|
5925
|
+
size: "sm",
|
|
5926
|
+
className: "rounded-sm -uppercase font-display bg-white dark:bg-accent border-2 border-accent",
|
|
5927
|
+
onClick: () => {
|
|
5928
|
+
setMenuMode("scheduled");
|
|
5929
|
+
setMenuDismissed(false);
|
|
5930
|
+
setButtonMenuOpen(true);
|
|
5931
|
+
},
|
|
5932
|
+
children: [
|
|
5933
|
+
/* @__PURE__ */ jsx(ClockIcon, {}),
|
|
5934
|
+
"Scheduled Tasks"
|
|
5935
|
+
]
|
|
5936
|
+
}
|
|
5937
|
+
)
|
|
5938
|
+
] }),
|
|
5995
5939
|
/* @__PURE__ */ jsx(PopoverAnchor, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
5996
5940
|
PromptInput,
|
|
5997
5941
|
{
|
|
@@ -6011,25 +5955,56 @@ function ChatComposerInner({
|
|
|
6011
5955
|
) }),
|
|
6012
5956
|
/* @__PURE__ */ jsxs(PromptInputFooter, { children: [
|
|
6013
5957
|
/* @__PURE__ */ jsxs(PromptInputTools, { children: [
|
|
6014
|
-
/* @__PURE__ */ jsxs(
|
|
6015
|
-
/* @__PURE__ */ jsx(
|
|
6016
|
-
/* @__PURE__ */ jsx(
|
|
5958
|
+
/* @__PURE__ */ jsxs(Popover, { open: addMenuOpen, onOpenChange: setAddMenuOpen, children: [
|
|
5959
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(PromptInputButton, { "aria-label": "Add", children: /* @__PURE__ */ jsx(PlusIcon, { className: "size-4" }) }) }),
|
|
5960
|
+
/* @__PURE__ */ jsx(
|
|
5961
|
+
PopoverContent,
|
|
5962
|
+
{
|
|
5963
|
+
side: "top",
|
|
5964
|
+
align: "start",
|
|
5965
|
+
className: "w-64 overflow-hidden rounded-xl p-1",
|
|
5966
|
+
children: /* @__PURE__ */ jsx(Command, { children: /* @__PURE__ */ jsxs(CommandList, { children: [
|
|
5967
|
+
/* @__PURE__ */ jsxs(
|
|
5968
|
+
CommandItem,
|
|
5969
|
+
{
|
|
5970
|
+
disabled: true,
|
|
5971
|
+
className: "gap-3 rounded-md px-3 py-2 [&>svg:last-child]:hidden",
|
|
5972
|
+
children: [
|
|
5973
|
+
/* @__PURE__ */ jsx(CloudIcon, { className: "size-4 shrink-0 text-sky-500" }),
|
|
5974
|
+
"Add from OneDrive",
|
|
5975
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4 shrink-0 text-muted-foreground" })
|
|
5976
|
+
]
|
|
5977
|
+
}
|
|
5978
|
+
),
|
|
5979
|
+
/* @__PURE__ */ jsxs(
|
|
5980
|
+
CommandItem,
|
|
5981
|
+
{
|
|
5982
|
+
disabled: true,
|
|
5983
|
+
className: "gap-3 rounded-md px-3 py-2 [&>svg:last-child]:hidden",
|
|
5984
|
+
children: [
|
|
5985
|
+
/* @__PURE__ */ jsx(HardDriveIcon, { className: "size-4 shrink-0 text-emerald-500" }),
|
|
5986
|
+
"Add from Google Drive"
|
|
5987
|
+
]
|
|
5988
|
+
}
|
|
5989
|
+
),
|
|
5990
|
+
/* @__PURE__ */ jsxs(
|
|
5991
|
+
CommandItem,
|
|
5992
|
+
{
|
|
5993
|
+
onSelect: () => {
|
|
5994
|
+
setAddMenuOpen(false);
|
|
5995
|
+
attachments.openFileDialog();
|
|
5996
|
+
},
|
|
5997
|
+
className: "gap-3 rounded-md px-3 py-2 [&>svg:last-child]:hidden",
|
|
5998
|
+
children: [
|
|
5999
|
+
/* @__PURE__ */ jsx(PaperclipIcon, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
6000
|
+
"Add local files"
|
|
6001
|
+
]
|
|
6002
|
+
}
|
|
6003
|
+
)
|
|
6004
|
+
] }) })
|
|
6005
|
+
}
|
|
6006
|
+
)
|
|
6017
6007
|
] }),
|
|
6018
|
-
/* @__PURE__ */ jsx(
|
|
6019
|
-
Button,
|
|
6020
|
-
{
|
|
6021
|
-
type: "button",
|
|
6022
|
-
variant: "ghost",
|
|
6023
|
-
size: "icon-xs",
|
|
6024
|
-
className: "text-muted-foreground",
|
|
6025
|
-
onClick: (e) => {
|
|
6026
|
-
e.preventDefault();
|
|
6027
|
-
setButtonMenuOpen((v) => !v);
|
|
6028
|
-
},
|
|
6029
|
-
"aria-label": "Slash commands",
|
|
6030
|
-
children: /* @__PURE__ */ jsx("span", { className: "text-xs font-bold", children: "/" })
|
|
6031
|
-
}
|
|
6032
|
-
),
|
|
6033
6008
|
tokenUsage && tokenUsage.contextWindow > 0 && /* @__PURE__ */ jsxs(
|
|
6034
6009
|
Context,
|
|
6035
6010
|
{
|
|
@@ -6046,7 +6021,13 @@ function ChatComposerInner({
|
|
|
6046
6021
|
outputTokenDetails: void 0
|
|
6047
6022
|
},
|
|
6048
6023
|
children: [
|
|
6049
|
-
/* @__PURE__ */ jsx(
|
|
6024
|
+
/* @__PURE__ */ jsx(
|
|
6025
|
+
ContextTrigger,
|
|
6026
|
+
{
|
|
6027
|
+
size: "icon-sm",
|
|
6028
|
+
className: "rounded-sm border border-input/70 text-foreground hover:bg-accent"
|
|
6029
|
+
}
|
|
6030
|
+
),
|
|
6050
6031
|
/* @__PURE__ */ jsxs(ContextContent, { children: [
|
|
6051
6032
|
/* @__PURE__ */ jsx(ContextContentHeader, {}),
|
|
6052
6033
|
/* @__PURE__ */ jsx(ContextContentBody, { children: tokenUsage.totalTokens > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -6091,14 +6072,14 @@ function ChatComposerInner({
|
|
|
6091
6072
|
{
|
|
6092
6073
|
side: "top",
|
|
6093
6074
|
align: "start",
|
|
6094
|
-
className: "overflow-hidden p-0",
|
|
6075
|
+
className: "overflow-hidden rounded-xl p-0",
|
|
6095
6076
|
style: { width: "var(--radix-popover-trigger-width)" },
|
|
6096
6077
|
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
6097
6078
|
onEscapeKeyDown: () => {
|
|
6098
6079
|
focusTextareaAtEnd();
|
|
6099
6080
|
},
|
|
6100
6081
|
children: /* @__PURE__ */ jsxs(Command, { children: [
|
|
6101
|
-
/* @__PURE__ */ jsx(
|
|
6082
|
+
menuMode === "skills" ? /* @__PURE__ */ jsx(CommandInput, { placeholder: "Search skills..." }) : menuMode === "scheduled" ? /* @__PURE__ */ jsx(CommandInput, { placeholder: "Search scheduled tasks..." }) : /* @__PURE__ */ jsx(
|
|
6102
6083
|
CommandInput,
|
|
6103
6084
|
{
|
|
6104
6085
|
placeholder: "Type a command or search...",
|
|
@@ -6107,8 +6088,36 @@ function ChatComposerInner({
|
|
|
6107
6088
|
}
|
|
6108
6089
|
),
|
|
6109
6090
|
/* @__PURE__ */ jsxs(CommandList, { children: [
|
|
6110
|
-
/* @__PURE__ */ jsx(CommandEmpty, { children: "No commands found." }),
|
|
6111
|
-
|
|
6091
|
+
/* @__PURE__ */ jsx(CommandEmpty, { children: menuMode === "skills" ? "No skills found." : menuMode === "scheduled" ? "No scheduled tasks found." : "No commands found." }),
|
|
6092
|
+
menuMode === "scheduled" && scheduledExamples.map((cmd) => /* @__PURE__ */ jsxs(
|
|
6093
|
+
CommandItem,
|
|
6094
|
+
{
|
|
6095
|
+
value: cmd.value,
|
|
6096
|
+
keywords: [cmd.description],
|
|
6097
|
+
onSelect: () => handleCommandSelect(cmd.value),
|
|
6098
|
+
className: "grid grid-cols-[14rem_1fr] items-baseline gap-3 [&_svg]:hidden",
|
|
6099
|
+
children: [
|
|
6100
|
+
/* @__PURE__ */ jsx(
|
|
6101
|
+
"span",
|
|
6102
|
+
{
|
|
6103
|
+
className: "font-mono font-semibold text-foreground truncate",
|
|
6104
|
+
title: cmd.label,
|
|
6105
|
+
children: cmd.label
|
|
6106
|
+
}
|
|
6107
|
+
),
|
|
6108
|
+
/* @__PURE__ */ jsx(
|
|
6109
|
+
"span",
|
|
6110
|
+
{
|
|
6111
|
+
className: "min-w-0 truncate text-sm text-muted-foreground",
|
|
6112
|
+
title: cmd.description,
|
|
6113
|
+
children: cmd.description
|
|
6114
|
+
}
|
|
6115
|
+
)
|
|
6116
|
+
]
|
|
6117
|
+
},
|
|
6118
|
+
cmd.value
|
|
6119
|
+
)),
|
|
6120
|
+
(menuMode === "commands" || menuMode === "all") && builtinCommands.map((cmd) => /* @__PURE__ */ jsxs(
|
|
6112
6121
|
CommandItem,
|
|
6113
6122
|
{
|
|
6114
6123
|
value: cmd.value,
|
|
@@ -6119,7 +6128,7 @@ function ChatComposerInner({
|
|
|
6119
6128
|
/* @__PURE__ */ jsx(
|
|
6120
6129
|
"span",
|
|
6121
6130
|
{
|
|
6122
|
-
className: "font-mono text-foreground truncate",
|
|
6131
|
+
className: "font-mono font-semibold text-foreground truncate",
|
|
6123
6132
|
title: cmd.label,
|
|
6124
6133
|
children: cmd.label
|
|
6125
6134
|
}
|
|
@@ -6127,7 +6136,7 @@ function ChatComposerInner({
|
|
|
6127
6136
|
/* @__PURE__ */ jsx(
|
|
6128
6137
|
"span",
|
|
6129
6138
|
{
|
|
6130
|
-
className: "min-w-0 truncate text-
|
|
6139
|
+
className: "min-w-0 truncate text-sm text-muted-foreground",
|
|
6131
6140
|
title: cmd.description,
|
|
6132
6141
|
children: cmd.description
|
|
6133
6142
|
}
|
|
@@ -6135,9 +6144,8 @@ function ChatComposerInner({
|
|
|
6135
6144
|
]
|
|
6136
6145
|
},
|
|
6137
6146
|
cmd.value
|
|
6138
|
-
))
|
|
6139
|
-
|
|
6140
|
-
adapterCommands.length > 0 && /* @__PURE__ */ jsx(CommandGroup, { heading: "Skills", children: adapterCommands.map((cmd) => /* @__PURE__ */ jsxs(
|
|
6147
|
+
)),
|
|
6148
|
+
(menuMode === "skills" || menuMode === "all") && adapterCommands.map((cmd) => /* @__PURE__ */ jsxs(
|
|
6141
6149
|
CommandItem,
|
|
6142
6150
|
{
|
|
6143
6151
|
value: cmd.value,
|
|
@@ -6148,7 +6156,7 @@ function ChatComposerInner({
|
|
|
6148
6156
|
/* @__PURE__ */ jsx(
|
|
6149
6157
|
"span",
|
|
6150
6158
|
{
|
|
6151
|
-
className: "font-mono text-foreground truncate",
|
|
6159
|
+
className: "font-mono font-semibold text-foreground truncate",
|
|
6152
6160
|
title: cmd.label,
|
|
6153
6161
|
children: cmd.label
|
|
6154
6162
|
}
|
|
@@ -6156,7 +6164,7 @@ function ChatComposerInner({
|
|
|
6156
6164
|
/* @__PURE__ */ jsx(
|
|
6157
6165
|
"span",
|
|
6158
6166
|
{
|
|
6159
|
-
className: "min-w-0 truncate text-
|
|
6167
|
+
className: "min-w-0 truncate text-sm text-muted-foreground",
|
|
6160
6168
|
title: cmd.description,
|
|
6161
6169
|
children: cmd.description
|
|
6162
6170
|
}
|
|
@@ -6164,7 +6172,7 @@ function ChatComposerInner({
|
|
|
6164
6172
|
]
|
|
6165
6173
|
},
|
|
6166
6174
|
cmd.value
|
|
6167
|
-
))
|
|
6175
|
+
))
|
|
6168
6176
|
] })
|
|
6169
6177
|
] })
|
|
6170
6178
|
}
|
|
@@ -7314,7 +7322,7 @@ function ChatThread({
|
|
|
7314
7322
|
] }) }),
|
|
7315
7323
|
/* @__PURE__ */ jsx(ConversationScrollButton, {})
|
|
7316
7324
|
] }),
|
|
7317
|
-
/* @__PURE__ */ jsxs("div", { className: "mx-auto w-full max-w-4xl px-6 pb-5 pt-3", children: [
|
|
7325
|
+
/* @__PURE__ */ jsxs("div", { className: "mx-auto w-full max-w-4xl px-3 sm:px-6 pb-3 sm:pb-5 pt-3", children: [
|
|
7318
7326
|
retryIndicator && /* @__PURE__ */ jsx("div", { className: "mb-2", children: /* @__PURE__ */ jsx(RetryBanner, { indicator: retryIndicator }) }),
|
|
7319
7327
|
disabled && disabledReason ? /* @__PURE__ */ jsx(
|
|
7320
7328
|
"div",
|
|
@@ -7970,7 +7978,7 @@ function RenderEntries({
|
|
|
7970
7978
|
/* @__PURE__ */ jsx("span", { className: "size-4 shrink-0" }),
|
|
7971
7979
|
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: entry.name }),
|
|
7972
7980
|
entry.size != null && /* @__PURE__ */ jsx("span", { className: "ml-1 shrink-0 text-xs text-muted-foreground/60", children: formatFileSize(entry.size) }),
|
|
7973
|
-
/* @__PURE__ */ jsxs("div", { className: "ml-1 flex shrink-0 items-center gap-0 opacity-
|
|
7981
|
+
/* @__PURE__ */ jsxs("div", { className: "ml-1 flex shrink-0 items-center gap-0 opacity-100 transition-opacity md:opacity-0 md:group-hover:opacity-100", children: [
|
|
7974
7982
|
/* @__PURE__ */ jsx(
|
|
7975
7983
|
"a",
|
|
7976
7984
|
{
|
|
@@ -9495,6 +9503,9 @@ function parseGoalDefinition(content) {
|
|
|
9495
9503
|
const rubric = match ? args.slice(match.index + match[0].length).trim() : "";
|
|
9496
9504
|
return rubric ? { description, rubric } : { description };
|
|
9497
9505
|
}
|
|
9506
|
+
var RIGHT_STACK_STYLE = {
|
|
9507
|
+
["--right-stack-w"]: "440px"
|
|
9508
|
+
};
|
|
9498
9509
|
function AgentChat({
|
|
9499
9510
|
adapter,
|
|
9500
9511
|
agentId,
|
|
@@ -9506,6 +9517,7 @@ function AgentChat({
|
|
|
9506
9517
|
onComposerError
|
|
9507
9518
|
}) {
|
|
9508
9519
|
const [workspacePath, setWorkspacePath] = useState(null);
|
|
9520
|
+
const [mobileView, setMobileView] = useState("chat");
|
|
9509
9521
|
const runtime = useAgentChatRuntime({
|
|
9510
9522
|
adapter,
|
|
9511
9523
|
agentId,
|
|
@@ -9523,10 +9535,12 @@ function AgentChat({
|
|
|
9523
9535
|
const handleFileSelect = useCallback(
|
|
9524
9536
|
(path) => {
|
|
9525
9537
|
setWorkspacePath(path);
|
|
9538
|
+
setMobileView("workspace");
|
|
9526
9539
|
onFileSelect?.(path);
|
|
9527
9540
|
},
|
|
9528
9541
|
[onFileSelect]
|
|
9529
9542
|
);
|
|
9543
|
+
const showMobileToggle = Boolean(sessionId);
|
|
9530
9544
|
return /* @__PURE__ */ jsx(
|
|
9531
9545
|
AgentChatAdapterProvider,
|
|
9532
9546
|
{
|
|
@@ -9539,15 +9553,56 @@ function AgentChat({
|
|
|
9539
9553
|
"section",
|
|
9540
9554
|
{
|
|
9541
9555
|
"data-testid": "agent-chat-layout",
|
|
9542
|
-
|
|
9543
|
-
|
|
9556
|
+
"data-mobile-view": mobileView,
|
|
9557
|
+
className: cn(
|
|
9558
|
+
// Phone: flex column, tab toggle on top, then either chat or
|
|
9559
|
+
// right stack visible based on `data-mobile-view`.
|
|
9560
|
+
"flex min-h-0 flex-1 flex-col overflow-hidden bg-background text-sm text-foreground",
|
|
9561
|
+
// md+: restore desktop two-pane layout.
|
|
9562
|
+
hasBrowserPanel ? "md:relative md:flex-row" : "md:flex-row"
|
|
9563
|
+
),
|
|
9564
|
+
style: { direction: "ltr", ...RIGHT_STACK_STYLE },
|
|
9544
9565
|
children: [
|
|
9566
|
+
showMobileToggle && /* @__PURE__ */ jsxs("div", { className: "md:hidden flex shrink-0 border-b border-line bg-card", children: [
|
|
9567
|
+
/* @__PURE__ */ jsx(
|
|
9568
|
+
"button",
|
|
9569
|
+
{
|
|
9570
|
+
type: "button",
|
|
9571
|
+
onClick: () => setMobileView("chat"),
|
|
9572
|
+
"aria-pressed": mobileView === "chat",
|
|
9573
|
+
className: cn(
|
|
9574
|
+
"flex-1 px-4 py-3 text-sm font-medium border-b-2 -mb-px transition-colors",
|
|
9575
|
+
mobileView === "chat" ? "border-primary text-foreground" : "border-transparent text-subtle hover:text-foreground"
|
|
9576
|
+
),
|
|
9577
|
+
children: "Chat"
|
|
9578
|
+
}
|
|
9579
|
+
),
|
|
9580
|
+
/* @__PURE__ */ jsx(
|
|
9581
|
+
"button",
|
|
9582
|
+
{
|
|
9583
|
+
type: "button",
|
|
9584
|
+
onClick: () => setMobileView("workspace"),
|
|
9585
|
+
"aria-pressed": mobileView === "workspace",
|
|
9586
|
+
className: cn(
|
|
9587
|
+
"flex-1 px-4 py-3 text-sm font-medium border-b-2 -mb-px transition-colors",
|
|
9588
|
+
mobileView === "workspace" ? "border-primary text-foreground" : "border-transparent text-subtle hover:text-foreground"
|
|
9589
|
+
),
|
|
9590
|
+
children: "Workspace"
|
|
9591
|
+
}
|
|
9592
|
+
)
|
|
9593
|
+
] }),
|
|
9545
9594
|
/* @__PURE__ */ jsx(
|
|
9546
9595
|
"div",
|
|
9547
9596
|
{
|
|
9548
9597
|
"data-testid": "chat-panel",
|
|
9549
|
-
|
|
9550
|
-
|
|
9598
|
+
"data-mobile-view": mobileView,
|
|
9599
|
+
className: cn(
|
|
9600
|
+
// Phone: full width column, hidden when workspace tab active.
|
|
9601
|
+
"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden",
|
|
9602
|
+
showMobileToggle && "data-[mobile-view=workspace]:hidden md:flex!",
|
|
9603
|
+
// md+: restore desktop positioning.
|
|
9604
|
+
hasBrowserPanel ? "md:absolute md:inset-y-0 md:left-0 md:right-(--right-stack-w,440px) md:flex" : "md:relative md:flex-1"
|
|
9605
|
+
),
|
|
9551
9606
|
children: /* @__PURE__ */ jsx(
|
|
9552
9607
|
ChatThread,
|
|
9553
9608
|
{
|
|
@@ -9572,8 +9627,16 @@ function AgentChat({
|
|
|
9572
9627
|
"div",
|
|
9573
9628
|
{
|
|
9574
9629
|
"data-testid": "right-stack",
|
|
9575
|
-
|
|
9576
|
-
|
|
9630
|
+
"data-mobile-view": mobileView,
|
|
9631
|
+
className: cn(
|
|
9632
|
+
// Phone: full width column, hidden when chat tab active.
|
|
9633
|
+
"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden",
|
|
9634
|
+
showMobileToggle && "data-[mobile-view=chat]:hidden md:flex!",
|
|
9635
|
+
// md+: restore desktop positioning. With browser panel the
|
|
9636
|
+
// right stack is absolutely positioned at the configured
|
|
9637
|
+
// width; without it the stack flows in the row.
|
|
9638
|
+
hasBrowserPanel ? "md:absolute md:inset-y-0 md:right-0 md:w-(--right-stack-w,440px) md:flex-none" : "md:relative md:shrink-0 md:flex-none md:w-(--right-stack-w,440px)"
|
|
9639
|
+
),
|
|
9577
9640
|
children: [
|
|
9578
9641
|
hasBrowserPanel && /* @__PURE__ */ jsx(
|
|
9579
9642
|
"div",
|
|
@@ -10556,16 +10619,16 @@ function MissionDashboard({
|
|
|
10556
10619
|
}
|
|
10557
10620
|
};
|
|
10558
10621
|
const statusVariant = mission.status === "satisfied" ? "default" : mission.status === "failed" || mission.status === "cancelled" ? "destructive" : "secondary";
|
|
10559
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-6 p-6 max-w-6xl mx-auto", children: [
|
|
10622
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 p-4 sm:gap-6 sm:p-6 max-w-6xl mx-auto", children: [
|
|
10560
10623
|
/* @__PURE__ */ jsxs(Card, { children: [
|
|
10561
|
-
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between
|
|
10562
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
10624
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-stretch gap-4 sm:flex-row sm:items-start sm:justify-between", children: [
|
|
10625
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1 min-w-0 flex-1", children: [
|
|
10563
10626
|
/* @__PURE__ */ jsx(CardTitle, { className: "wrap-break-word -uppercase text-sm", children: mission.description }),
|
|
10564
10627
|
/* @__PURE__ */ jsxs(CardDescription, { className: "wrap-break-word text-foreground/70", children: [
|
|
10565
10628
|
"Rubric: ",
|
|
10566
10629
|
mission.rubric
|
|
10567
10630
|
] }),
|
|
10568
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 pt-2 text-xs text-foreground/70", children: [
|
|
10631
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1 pt-2 text-xs text-foreground/70", children: [
|
|
10569
10632
|
/* @__PURE__ */ jsx(Badge, { variant: statusVariant, className: "font-mono text-foreground", children: mission.status }),
|
|
10570
10633
|
/* @__PURE__ */ jsxs("span", { className: "font-mono text-primary", children: [
|
|
10571
10634
|
"Iteration ",
|
|
@@ -10580,7 +10643,7 @@ function MissionDashboard({
|
|
|
10580
10643
|
] }) : null
|
|
10581
10644
|
] })
|
|
10582
10645
|
] }),
|
|
10583
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: ACTIVE_MISSION_STATUSES.has(mission.status) ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10646
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-2 shrink-0", children: ACTIVE_MISSION_STATUSES.has(mission.status) ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10584
10647
|
mission.status === "active" ? /* @__PURE__ */ jsxs(
|
|
10585
10648
|
Button,
|
|
10586
10649
|
{
|
|
@@ -10700,7 +10763,7 @@ function MissionDashboard({
|
|
|
10700
10763
|
return /* @__PURE__ */ jsxs(
|
|
10701
10764
|
"li",
|
|
10702
10765
|
{
|
|
10703
|
-
className: "flex items-start justify-between
|
|
10766
|
+
className: "flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between rounded border border-border/40 px-3 py-2 text-sm",
|
|
10704
10767
|
children: [
|
|
10705
10768
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 space-y-1", children: [
|
|
10706
10769
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -10858,7 +10921,8 @@ function MissionRow({
|
|
|
10858
10921
|
"div",
|
|
10859
10922
|
{
|
|
10860
10923
|
className: cn(
|
|
10861
|
-
"group flex min-w-0 items-start gap-2 border-l-2 border-l-transparent px-3 py-2 text-sm transition-colors cursor-pointer hover:border-l-primary hover:bg-input"
|
|
10924
|
+
"group flex min-w-0 items-start gap-2 border-l-2 border-l-transparent px-3 py-2 text-sm transition-colors cursor-pointer hover:border-l-primary hover:bg-input",
|
|
10925
|
+
"min-h-11 md:min-h-0"
|
|
10862
10926
|
),
|
|
10863
10927
|
onClick: openMission,
|
|
10864
10928
|
onKeyDown: handleRowKeyDown,
|
|
@@ -10885,7 +10949,7 @@ function MissionRow({
|
|
|
10885
10949
|
"button",
|
|
10886
10950
|
{
|
|
10887
10951
|
type: "button",
|
|
10888
|
-
className: "rounded p-1 text-faint opacity-70 transition-all hover:bg-line hover:text-foreground disabled:pointer-events-none disabled:opacity-40 group-hover:opacity-100",
|
|
10952
|
+
className: "rounded p-2 md:p-1 text-faint opacity-100 md:opacity-70 transition-all hover:bg-line hover:text-foreground disabled:pointer-events-none disabled:opacity-40 md:group-hover:opacity-100",
|
|
10889
10953
|
onClick: (e) => {
|
|
10890
10954
|
stopActionClick(e);
|
|
10891
10955
|
onPause(mission.id);
|
|
@@ -10900,7 +10964,7 @@ function MissionRow({
|
|
|
10900
10964
|
"button",
|
|
10901
10965
|
{
|
|
10902
10966
|
type: "button",
|
|
10903
|
-
className: "rounded p-1 text-faint opacity-70 transition-all hover:bg-line hover:text-foreground disabled:pointer-events-none disabled:opacity-40 group-hover:opacity-100",
|
|
10967
|
+
className: "rounded p-2 md:p-1 text-faint opacity-100 md:opacity-70 transition-all hover:bg-line hover:text-foreground disabled:pointer-events-none disabled:opacity-40 md:group-hover:opacity-100",
|
|
10904
10968
|
onClick: (e) => {
|
|
10905
10969
|
stopActionClick(e);
|
|
10906
10970
|
onResume(mission.id);
|
|
@@ -10915,7 +10979,7 @@ function MissionRow({
|
|
|
10915
10979
|
"button",
|
|
10916
10980
|
{
|
|
10917
10981
|
type: "button",
|
|
10918
|
-
className: "rounded p-1 text-faint opacity-70 transition-all hover:bg-destructive/10 hover:text-destructive disabled:pointer-events-none disabled:opacity-40 group-hover:opacity-100",
|
|
10982
|
+
className: "rounded p-2 md:p-1 text-faint opacity-100 md:opacity-70 transition-all hover:bg-destructive/10 hover:text-destructive disabled:pointer-events-none disabled:opacity-40 md:group-hover:opacity-100",
|
|
10919
10983
|
onClick: (e) => {
|
|
10920
10984
|
stopActionClick(e);
|
|
10921
10985
|
onCancel(mission.id);
|
|
@@ -11192,6 +11256,7 @@ function ScheduledWorkRow({
|
|
|
11192
11256
|
{
|
|
11193
11257
|
className: cn(
|
|
11194
11258
|
"group flex min-w-0 items-start gap-2 border-l-2 border-l-transparent px-3 py-2 text-sm transition-colors hover:border-l-primary hover:bg-input",
|
|
11259
|
+
"min-h-11 md:min-h-0",
|
|
11195
11260
|
lastSessionId && "cursor-pointer"
|
|
11196
11261
|
),
|
|
11197
11262
|
onClick: openLastRun,
|
|
@@ -11218,7 +11283,7 @@ function ScheduledWorkRow({
|
|
|
11218
11283
|
"button",
|
|
11219
11284
|
{
|
|
11220
11285
|
type: "button",
|
|
11221
|
-
className: "rounded p-1 text-faint opacity-70 transition-all hover:bg-line hover:text-foreground disabled:pointer-events-none disabled:opacity-40 group-hover:opacity-100",
|
|
11286
|
+
className: "rounded p-2 md:p-1 text-faint opacity-100 md:opacity-70 transition-all hover:bg-line hover:text-foreground disabled:pointer-events-none disabled:opacity-40 md:group-hover:opacity-100",
|
|
11222
11287
|
onClick: (e) => {
|
|
11223
11288
|
stopActionClick(e);
|
|
11224
11289
|
onRunNow(item.id);
|
|
@@ -11233,7 +11298,7 @@ function ScheduledWorkRow({
|
|
|
11233
11298
|
"button",
|
|
11234
11299
|
{
|
|
11235
11300
|
type: "button",
|
|
11236
|
-
className: "rounded p-1 text-faint opacity-70 transition-all hover:bg-destructive/10 hover:text-destructive disabled:pointer-events-none disabled:opacity-40 group-hover:opacity-100",
|
|
11301
|
+
className: "rounded p-2 md:p-1 text-faint opacity-100 md:opacity-70 transition-all hover:bg-destructive/10 hover:text-destructive disabled:pointer-events-none disabled:opacity-40 md:group-hover:opacity-100",
|
|
11237
11302
|
onClick: (e) => {
|
|
11238
11303
|
stopActionClick(e);
|
|
11239
11304
|
onCancel(item.id);
|
|
@@ -11539,6 +11604,7 @@ function TreeNodeRow({
|
|
|
11539
11604
|
},
|
|
11540
11605
|
className: cn(
|
|
11541
11606
|
"group flex items-center gap-2 w-full py-2 pr-2 text-left cursor-pointer transition-colors border-l-2",
|
|
11607
|
+
"min-h-11 md:min-h-0",
|
|
11542
11608
|
isActive ? "bg-line text-foreground border-l-primary" : "bg-transparent text-subtle hover:bg-input hover:text-foreground border-l-transparent"
|
|
11543
11609
|
),
|
|
11544
11610
|
style: { paddingLeft: `${depth * 12 + 12}px` },
|
|
@@ -11547,7 +11613,7 @@ function TreeNodeRow({
|
|
|
11547
11613
|
"button",
|
|
11548
11614
|
{
|
|
11549
11615
|
type: "button",
|
|
11550
|
-
className: "p-0.5 rounded hover:bg-line shrink-0",
|
|
11616
|
+
className: "p-2 md:p-0.5 rounded hover:bg-line shrink-0",
|
|
11551
11617
|
onClick: (e) => {
|
|
11552
11618
|
e.stopPropagation();
|
|
11553
11619
|
setExpanded(!expanded);
|
|
@@ -11565,7 +11631,7 @@ function TreeNodeRow({
|
|
|
11565
11631
|
"button",
|
|
11566
11632
|
{
|
|
11567
11633
|
type: "button",
|
|
11568
|
-
className: "p-1 rounded opacity-0 group-hover:opacity-100 hover:bg-destructive/10 hover:text-destructive transition-all",
|
|
11634
|
+
className: "p-2 md:p-1 rounded opacity-100 md:opacity-0 md:group-hover:opacity-100 hover:bg-destructive/10 hover:text-destructive transition-all",
|
|
11569
11635
|
onClick: (e) => {
|
|
11570
11636
|
e.stopPropagation();
|
|
11571
11637
|
onStop(entry.id);
|
|
@@ -11580,8 +11646,8 @@ function TreeNodeRow({
|
|
|
11580
11646
|
{
|
|
11581
11647
|
type: "button",
|
|
11582
11648
|
className: cn(
|
|
11583
|
-
"p-1 rounded hover:bg-destructive/10 hover:text-destructive disabled:pointer-events-none transition-all",
|
|
11584
|
-
deletingSessionId === entry.id ? "opacity-100" : "opacity-0 group-hover:opacity-100 focus-visible:opacity-100"
|
|
11649
|
+
"p-2 md:p-1 rounded hover:bg-destructive/10 hover:text-destructive disabled:pointer-events-none transition-all",
|
|
11650
|
+
deletingSessionId === entry.id ? "opacity-100" : "opacity-100 md:opacity-0 md:group-hover:opacity-100 md:focus-visible:opacity-100"
|
|
11585
11651
|
),
|
|
11586
11652
|
onClick: (e) => {
|
|
11587
11653
|
e.stopPropagation();
|