@inf-monkeys-tech/monkeys-design 1.0.11 → 1.0.12
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/components/agent-workbench/index.d.mts +57 -2
- package/dist/components/agent-workbench/index.d.ts +57 -2
- package/dist/components/agent-workbench/index.js +669 -43
- package/dist/components/agent-workbench/index.js.map +1 -1
- package/dist/components/agent-workbench/index.mjs +636 -39
- package/dist/components/agent-workbench/index.mjs.map +1 -1
- package/dist/components/base/index.js +32 -0
- package/dist/components/base/index.js.map +1 -1
- package/dist/components/base/index.mjs +32 -0
- package/dist/components/base/index.mjs.map +1 -1
- package/dist/components/data-explorer/index.js +32 -0
- package/dist/components/data-explorer/index.js.map +1 -1
- package/dist/components/data-explorer/index.mjs +32 -0
- package/dist/components/data-explorer/index.mjs.map +1 -1
- package/dist/components/layout/index.js +32 -0
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/layout/index.mjs +32 -0
- package/dist/components/layout/index.mjs.map +1 -1
- package/dist/components/runtime/index.js +32 -0
- package/dist/components/runtime/index.js.map +1 -1
- package/dist/components/runtime/index.mjs +32 -0
- package/dist/components/runtime/index.mjs.map +1 -1
- package/dist/components/toast/index.d.mts +1 -1
- package/dist/components/toast/index.d.ts +1 -1
- package/dist/components/toast/index.js +32 -0
- package/dist/components/toast/index.js.map +1 -1
- package/dist/components/toast/index.mjs +32 -0
- package/dist/components/toast/index.mjs.map +1 -1
- package/dist/components/toolbar/index.js +32 -0
- package/dist/components/toolbar/index.js.map +1 -1
- package/dist/components/toolbar/index.mjs +32 -0
- package/dist/components/toolbar/index.mjs.map +1 -1
- package/dist/components/workbench/index.js +32 -0
- package/dist/components/workbench/index.js.map +1 -1
- package/dist/components/workbench/index.mjs +32 -0
- package/dist/components/workbench/index.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1021 -386
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +645 -17
- package/dist/index.mjs.map +1 -1
- package/dist/locale/index.d.mts +70 -2
- package/dist/locale/index.d.ts +70 -2
- package/dist/locale/index.js +68 -0
- package/dist/locale/index.js.map +1 -1
- package/dist/locale/index.mjs +68 -0
- package/dist/locale/index.mjs.map +1 -1
- package/dist/provider/index.d.mts +2 -2
- package/dist/provider/index.d.ts +2 -2
- package/dist/provider/index.js +68 -0
- package/dist/provider/index.js.map +1 -1
- package/dist/provider/index.mjs +68 -0
- package/dist/provider/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/{types-3d3e043f0ccb.d.mts → types-37967a434f7c.d.mts} +35 -0
- package/dist/{types-3d3e043f0ccb.d.ts → types-37967a434f7c.d.ts} +35 -0
- package/package.json +3 -3
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import '
|
|
4
|
-
import
|
|
1
|
+
import { ChevronDown, Check, ChevronRight, Circle, ChevronUp, Search, X, Plus, Pin, SquarePen, Blocks, Settings, TerminalSquare, Clock3, FileOutput, Download, RefreshCw, Bot, Image, Loader2, CheckCircle2, AlertCircle, Ellipsis, Pencil, Trash2, XCircle, CircleStop, Copy, RotateCcw, FileCode2, Files, TestTube2 } from 'lucide-react';
|
|
2
|
+
import * as React2 from 'react';
|
|
3
|
+
import { createContext, useRef, useMemo, useEffect, useState, useContext } from 'react';
|
|
4
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
5
|
+
import { twMerge } from 'tailwind-merge';
|
|
6
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
8
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
9
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
10
|
+
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
11
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
12
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
13
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
14
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
15
|
+
import { cva } from 'class-variance-authority';
|
|
16
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
5
17
|
|
|
6
|
-
// src/components/agent-workbench/
|
|
18
|
+
// src/components/agent-workbench/AgentWorkbenchSidebar.tsx
|
|
7
19
|
|
|
8
20
|
// src/locale/en-US.ts
|
|
9
21
|
var enUS = {
|
|
@@ -135,6 +147,38 @@ var enUS = {
|
|
|
135
147
|
label: "Context usage",
|
|
136
148
|
context: ({ used, total }) => `${used} / ${total} tokens`
|
|
137
149
|
},
|
|
150
|
+
navigation: {
|
|
151
|
+
search: "Search agents and sessions",
|
|
152
|
+
searchShortcut: "Focus search",
|
|
153
|
+
clearSearch: "Clear search",
|
|
154
|
+
tabsLabel: "Agent workbench navigation",
|
|
155
|
+
agents: "Agents",
|
|
156
|
+
sessions: "Sessions",
|
|
157
|
+
newAgent: "New Agent",
|
|
158
|
+
newSession: "New Session",
|
|
159
|
+
capabilities: "Capabilities & Extensions",
|
|
160
|
+
settings: "Agent Settings",
|
|
161
|
+
allAgents: "All Agents",
|
|
162
|
+
recentSessions: "Recent Sessions",
|
|
163
|
+
builtIn: "Built-in",
|
|
164
|
+
noDescription: "No description",
|
|
165
|
+
loading: "Loading...",
|
|
166
|
+
emptyAgents: "No agents yet",
|
|
167
|
+
emptySessions: "No sessions yet",
|
|
168
|
+
noResults: "No matching results",
|
|
169
|
+
retry: "Retry",
|
|
170
|
+
pin: "Pin",
|
|
171
|
+
unpin: "Unpin",
|
|
172
|
+
rename: "Rename",
|
|
173
|
+
delete: "Delete",
|
|
174
|
+
actions: "Actions",
|
|
175
|
+
save: "Save",
|
|
176
|
+
cancel: "Cancel",
|
|
177
|
+
running: "Running",
|
|
178
|
+
completed: "Completed",
|
|
179
|
+
failed: "Failed",
|
|
180
|
+
contextUsage: ({ percent }) => `${percent}% context used`
|
|
181
|
+
},
|
|
138
182
|
details: {
|
|
139
183
|
title: "Task details",
|
|
140
184
|
description: "Summary and workspace activity",
|
|
@@ -244,9 +288,562 @@ function useMonkeysLocale() {
|
|
|
244
288
|
function useMonkeysLocaleMessages() {
|
|
245
289
|
return useContext(MonkeysLocaleContext).messages;
|
|
246
290
|
}
|
|
247
|
-
function cn(...
|
|
291
|
+
function cn(...parts) {
|
|
292
|
+
return twMerge(parts.filter(Boolean).join(" "));
|
|
293
|
+
}
|
|
294
|
+
function cn2(...inputs) {
|
|
248
295
|
return inputs.filter(Boolean).join(" ");
|
|
249
296
|
}
|
|
297
|
+
var AccordionItem = React2.forwardRef(({ className, style, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
298
|
+
AccordionPrimitive.Item,
|
|
299
|
+
{
|
|
300
|
+
ref,
|
|
301
|
+
className: cn("border-b", className),
|
|
302
|
+
style: {
|
|
303
|
+
borderColor: "var(--monkeys-component-accordion-item-border-color, hsl(var(--border)))",
|
|
304
|
+
...style
|
|
305
|
+
},
|
|
306
|
+
...props
|
|
307
|
+
}
|
|
308
|
+
));
|
|
309
|
+
AccordionItem.displayName = "AccordionItem";
|
|
310
|
+
var AccordionTrigger = React2.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
311
|
+
AccordionPrimitive.Trigger,
|
|
312
|
+
{
|
|
313
|
+
ref,
|
|
314
|
+
className: cn(
|
|
315
|
+
"flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
|
|
316
|
+
className
|
|
317
|
+
),
|
|
318
|
+
...props,
|
|
319
|
+
children: [
|
|
320
|
+
children,
|
|
321
|
+
/* @__PURE__ */ jsx(
|
|
322
|
+
ChevronDown,
|
|
323
|
+
{
|
|
324
|
+
"aria-hidden": "true",
|
|
325
|
+
className: "h-4 w-4 shrink-0 transition-transform duration-200"
|
|
326
|
+
}
|
|
327
|
+
)
|
|
328
|
+
]
|
|
329
|
+
}
|
|
330
|
+
) }));
|
|
331
|
+
AccordionTrigger.displayName = "AccordionTrigger";
|
|
332
|
+
var AccordionContent = React2.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
333
|
+
AccordionPrimitive.Content,
|
|
334
|
+
{
|
|
335
|
+
ref,
|
|
336
|
+
className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
337
|
+
...props,
|
|
338
|
+
children: /* @__PURE__ */ jsx("div", { className: cn("pb-4 pt-0", className), children })
|
|
339
|
+
}
|
|
340
|
+
));
|
|
341
|
+
AccordionContent.displayName = "AccordionContent";
|
|
342
|
+
var Checkbox = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
343
|
+
CheckboxPrimitive.Root,
|
|
344
|
+
{
|
|
345
|
+
ref,
|
|
346
|
+
className: cn(
|
|
347
|
+
"peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
348
|
+
className
|
|
349
|
+
),
|
|
350
|
+
...props,
|
|
351
|
+
children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current", children: /* @__PURE__ */ jsx(Check, { "aria-hidden": "true", className: "h-4 w-4" }) })
|
|
352
|
+
}
|
|
353
|
+
));
|
|
354
|
+
Checkbox.displayName = "Checkbox";
|
|
355
|
+
var buttonVariants = cva(
|
|
356
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
357
|
+
{
|
|
358
|
+
variants: {
|
|
359
|
+
variant: {
|
|
360
|
+
default: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",
|
|
361
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
362
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
363
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
364
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
365
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
366
|
+
},
|
|
367
|
+
size: {
|
|
368
|
+
default: "h-10 px-4 py-2",
|
|
369
|
+
sm: "h-9 rounded-sm px-3",
|
|
370
|
+
lg: "h-11 rounded-md px-8",
|
|
371
|
+
icon: "h-10 w-10"
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
defaultVariants: { variant: "default", size: "default" }
|
|
375
|
+
}
|
|
376
|
+
);
|
|
377
|
+
var Button = React2.forwardRef(
|
|
378
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
379
|
+
const Component = asChild ? Slot : "button";
|
|
380
|
+
return /* @__PURE__ */ jsx(
|
|
381
|
+
Component,
|
|
382
|
+
{
|
|
383
|
+
ref,
|
|
384
|
+
className: buttonVariants({ variant, size, className }),
|
|
385
|
+
...props
|
|
386
|
+
}
|
|
387
|
+
);
|
|
388
|
+
}
|
|
389
|
+
);
|
|
390
|
+
Button.displayName = "Button";
|
|
391
|
+
var PopoverContent = React2.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
392
|
+
PopoverPrimitive.Content,
|
|
393
|
+
{
|
|
394
|
+
ref,
|
|
395
|
+
align,
|
|
396
|
+
sideOffset,
|
|
397
|
+
className: cn(
|
|
398
|
+
"z-50 w-72 rounded-lg border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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",
|
|
399
|
+
className
|
|
400
|
+
),
|
|
401
|
+
...props
|
|
402
|
+
}
|
|
403
|
+
) }));
|
|
404
|
+
PopoverContent.displayName = "PopoverContent";
|
|
405
|
+
var ScrollArea = React2.forwardRef(
|
|
406
|
+
({
|
|
407
|
+
className,
|
|
408
|
+
children,
|
|
409
|
+
viewportClassName,
|
|
410
|
+
viewportRef,
|
|
411
|
+
onViewportScroll,
|
|
412
|
+
scrollbar = true,
|
|
413
|
+
scrollbarOrientation = "vertical",
|
|
414
|
+
scrollBarDisabled = false,
|
|
415
|
+
...props
|
|
416
|
+
}, ref) => /* @__PURE__ */ jsxs(
|
|
417
|
+
ScrollAreaPrimitive.Root,
|
|
418
|
+
{
|
|
419
|
+
ref,
|
|
420
|
+
className: cn(
|
|
421
|
+
"group relative overflow-hidden",
|
|
422
|
+
scrollBarDisabled && "no-scrollbar",
|
|
423
|
+
className
|
|
424
|
+
),
|
|
425
|
+
...props,
|
|
426
|
+
children: [
|
|
427
|
+
/* @__PURE__ */ jsx(
|
|
428
|
+
ScrollAreaPrimitive.Viewport,
|
|
429
|
+
{
|
|
430
|
+
ref: viewportRef,
|
|
431
|
+
onScroll: onViewportScroll,
|
|
432
|
+
className: cn("h-full w-full rounded-[inherit]", viewportClassName),
|
|
433
|
+
children
|
|
434
|
+
}
|
|
435
|
+
),
|
|
436
|
+
scrollbar ? /* @__PURE__ */ jsx(
|
|
437
|
+
ScrollBar,
|
|
438
|
+
{
|
|
439
|
+
orientation: scrollbarOrientation,
|
|
440
|
+
className: cn(scrollBarDisabled && "size-0 p-0")
|
|
441
|
+
}
|
|
442
|
+
) : null,
|
|
443
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
|
|
444
|
+
]
|
|
445
|
+
}
|
|
446
|
+
)
|
|
447
|
+
);
|
|
448
|
+
ScrollArea.displayName = "ScrollArea";
|
|
449
|
+
var ScrollBar = React2.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
450
|
+
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
451
|
+
{
|
|
452
|
+
ref,
|
|
453
|
+
orientation,
|
|
454
|
+
className: cn(
|
|
455
|
+
"flex touch-none select-none opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100 data-[state=visible]:opacity-100",
|
|
456
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-px",
|
|
457
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-px",
|
|
458
|
+
className
|
|
459
|
+
),
|
|
460
|
+
...props,
|
|
461
|
+
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
462
|
+
}
|
|
463
|
+
));
|
|
464
|
+
ScrollBar.displayName = "ScrollBar";
|
|
465
|
+
var Switch = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
466
|
+
SwitchPrimitive.Root,
|
|
467
|
+
{
|
|
468
|
+
ref,
|
|
469
|
+
className: cn(
|
|
470
|
+
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
471
|
+
className
|
|
472
|
+
),
|
|
473
|
+
...props,
|
|
474
|
+
children: /* @__PURE__ */ jsx(SwitchPrimitive.Thumb, { className: "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0" })
|
|
475
|
+
}
|
|
476
|
+
));
|
|
477
|
+
Switch.displayName = "Switch";
|
|
478
|
+
var Tabs = React2.forwardRef(({ variant = "default", ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.Root, { ref, "data-variant": variant, ...props }));
|
|
479
|
+
Tabs.displayName = "Tabs";
|
|
480
|
+
var TabsList = React2.forwardRef(({ className, gap, style, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
481
|
+
TabsPrimitive.List,
|
|
482
|
+
{
|
|
483
|
+
ref,
|
|
484
|
+
className: cn(
|
|
485
|
+
"inline-flex h-10 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
|
|
486
|
+
className
|
|
487
|
+
),
|
|
488
|
+
style: { gap, ...style },
|
|
489
|
+
...props
|
|
490
|
+
}
|
|
491
|
+
));
|
|
492
|
+
TabsList.displayName = "TabsList";
|
|
493
|
+
var TabsTrigger = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
494
|
+
TabsPrimitive.Trigger,
|
|
495
|
+
{
|
|
496
|
+
ref,
|
|
497
|
+
className: cn(
|
|
498
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
|
|
499
|
+
className
|
|
500
|
+
),
|
|
501
|
+
...props
|
|
502
|
+
}
|
|
503
|
+
));
|
|
504
|
+
TabsTrigger.displayName = "TabsTrigger";
|
|
505
|
+
var TabsContent = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
506
|
+
TabsPrimitive.Content,
|
|
507
|
+
{
|
|
508
|
+
ref,
|
|
509
|
+
className: cn(
|
|
510
|
+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
511
|
+
className
|
|
512
|
+
),
|
|
513
|
+
...props
|
|
514
|
+
}
|
|
515
|
+
));
|
|
516
|
+
TabsContent.displayName = "TabsContent";
|
|
517
|
+
var TooltipContent = React2.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
518
|
+
TooltipPrimitive.Content,
|
|
519
|
+
{
|
|
520
|
+
ref,
|
|
521
|
+
sideOffset,
|
|
522
|
+
className: cn(
|
|
523
|
+
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-xs text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 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",
|
|
524
|
+
className
|
|
525
|
+
),
|
|
526
|
+
...props
|
|
527
|
+
}
|
|
528
|
+
) }));
|
|
529
|
+
TooltipContent.displayName = "TooltipContent";
|
|
530
|
+
var menuItemClassName = "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0";
|
|
531
|
+
var menuContentClassName = "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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";
|
|
532
|
+
var DropdownMenu2 = DropdownMenuPrimitive.Root;
|
|
533
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
534
|
+
var DropdownMenuSubTrigger = React2.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.SubTrigger, { ref, className: cn(menuItemClassName, "data-[state=open]:bg-accent", inset && "pl-8", className), ...props, children: [
|
|
535
|
+
children,
|
|
536
|
+
/* @__PURE__ */ jsx(ChevronRight, { "aria-hidden": "true", className: "ml-auto" })
|
|
537
|
+
] }));
|
|
538
|
+
DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
|
|
539
|
+
var DropdownMenuSubContent = React2.forwardRef(
|
|
540
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.SubContent, { ref, className: cn(menuContentClassName, className), ...props })
|
|
541
|
+
);
|
|
542
|
+
DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
|
|
543
|
+
var DropdownMenuContent = React2.forwardRef(
|
|
544
|
+
({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Content, { ref, sideOffset, className: cn(menuContentClassName, className), ...props }) })
|
|
545
|
+
);
|
|
546
|
+
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
547
|
+
var DropdownMenuItem = React2.forwardRef(
|
|
548
|
+
({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Item, { ref, className: cn(menuItemClassName, inset && "pl-8", className), ...props })
|
|
549
|
+
);
|
|
550
|
+
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
551
|
+
var DropdownMenuCheckboxItem = React2.forwardRef(
|
|
552
|
+
({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.CheckboxItem, { ref, className: cn(menuItemClassName, "pl-8", className), checked, ...props, children: [
|
|
553
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { "aria-hidden": "true", className: "h-4 w-4" }) }) }),
|
|
554
|
+
children
|
|
555
|
+
] })
|
|
556
|
+
);
|
|
557
|
+
DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
|
|
558
|
+
var DropdownMenuRadioItem = React2.forwardRef(
|
|
559
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.RadioItem, { ref, className: cn(menuItemClassName, "pl-8", className), ...props, children: [
|
|
560
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { "aria-hidden": "true", className: "h-2 w-2 fill-current" }) }) }),
|
|
561
|
+
children
|
|
562
|
+
] })
|
|
563
|
+
);
|
|
564
|
+
DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
|
|
565
|
+
var DropdownMenuLabel = React2.forwardRef(
|
|
566
|
+
({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Label, { ref, className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className), ...props })
|
|
567
|
+
);
|
|
568
|
+
DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
569
|
+
var DropdownMenuSeparator = React2.forwardRef(
|
|
570
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })
|
|
571
|
+
);
|
|
572
|
+
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
573
|
+
var SelectTrigger = React2.forwardRef(
|
|
574
|
+
({ className, children, iconClassName, size = "default", ...props }, ref) => /* @__PURE__ */ jsxs(SelectPrimitive.Trigger, { ref, className: cn("flex h-10 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-background px-3 py-2 text-left text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:min-w-0 [&>span]:flex-1 [&>span]:text-left", size === "sm" && "h-8 px-2 py-1 text-xs", className), ...props, children: [
|
|
575
|
+
children,
|
|
576
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { "aria-hidden": "true", className: cn("h-4 w-4 opacity-50", iconClassName) }) })
|
|
577
|
+
] })
|
|
578
|
+
);
|
|
579
|
+
SelectTrigger.displayName = "SelectTrigger";
|
|
580
|
+
var SelectScrollUpButton = React2.forwardRef(
|
|
581
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.ScrollUpButton, { ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: /* @__PURE__ */ jsx(ChevronUp, { "aria-hidden": "true", className: "h-4 w-4" }) })
|
|
582
|
+
);
|
|
583
|
+
SelectScrollUpButton.displayName = "SelectScrollUpButton";
|
|
584
|
+
var SelectScrollDownButton = React2.forwardRef(
|
|
585
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.ScrollDownButton, { ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: /* @__PURE__ */ jsx(ChevronDown, { "aria-hidden": "true", className: "h-4 w-4" }) })
|
|
586
|
+
);
|
|
587
|
+
SelectScrollDownButton.displayName = "SelectScrollDownButton";
|
|
588
|
+
var SelectContent = React2.forwardRef(
|
|
589
|
+
({ className, children, position = "popper", viewportClassName, disableTriggerViewportSizing = false, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(SelectPrimitive.Content, { ref, position, className: cn(menuContentClassName, "relative max-h-[var(--radix-select-content-available-height)] overflow-y-auto overflow-x-hidden", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className), ...props, children: [
|
|
590
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
591
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Viewport, { className: cn("p-1", position === "popper" && "w-full min-w-[var(--radix-select-trigger-width)]", position === "popper" && !disableTriggerViewportSizing && "h-[var(--radix-select-trigger-height)]", viewportClassName), children }),
|
|
592
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
593
|
+
] }) })
|
|
594
|
+
);
|
|
595
|
+
SelectContent.displayName = "SelectContent";
|
|
596
|
+
var SelectLabel = React2.forwardRef(
|
|
597
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Label, { ref, className: cn("px-2 py-1.5 text-sm font-semibold", className), ...props })
|
|
598
|
+
);
|
|
599
|
+
SelectLabel.displayName = "SelectLabel";
|
|
600
|
+
var SelectItem = React2.forwardRef(
|
|
601
|
+
({ className, children, indicatorClassName, itemText, hideIndicator = false, ...props }, ref) => /* @__PURE__ */ jsxs(SelectPrimitive.Item, { ref, className: cn(menuItemClassName, "w-full", hideIndicator ? "px-2" : "pl-8 pr-2", className), ...props, children: [
|
|
602
|
+
!hideIndicator ? /* @__PURE__ */ jsx("span", { className: cn("absolute left-2 flex h-3.5 w-3.5 items-center justify-center", indicatorClassName), children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { "aria-hidden": "true", className: "h-4 w-4" }) }) }) : null,
|
|
603
|
+
itemText ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
604
|
+
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { asChild: true, children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: itemText }) }),
|
|
605
|
+
children
|
|
606
|
+
] }) : /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
|
|
607
|
+
] })
|
|
608
|
+
);
|
|
609
|
+
SelectItem.displayName = "SelectItem";
|
|
610
|
+
var SelectSeparator = React2.forwardRef(
|
|
611
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })
|
|
612
|
+
);
|
|
613
|
+
SelectSeparator.displayName = "SelectSeparator";
|
|
614
|
+
function ItemAvatar({ item }) {
|
|
615
|
+
const [failed, setFailed] = useState(false);
|
|
616
|
+
if (item.iconUrl && !failed) {
|
|
617
|
+
return /* @__PURE__ */ jsx("img", { src: item.iconUrl, alt: "", className: "size-full object-cover", onError: () => setFailed(true) });
|
|
618
|
+
}
|
|
619
|
+
const initial = item.name.trim().charAt(0).toLocaleUpperCase();
|
|
620
|
+
return initial ? /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold", children: initial }) : /* @__PURE__ */ jsx(Bot, { className: "size-4" });
|
|
621
|
+
}
|
|
622
|
+
function SessionAvatar({ item }) {
|
|
623
|
+
const [failed, setFailed] = useState(false);
|
|
624
|
+
if (item.thumbnailUrl && !failed) {
|
|
625
|
+
return /* @__PURE__ */ jsx(
|
|
626
|
+
"img",
|
|
627
|
+
{
|
|
628
|
+
src: item.thumbnailUrl,
|
|
629
|
+
alt: "",
|
|
630
|
+
className: "size-full object-cover",
|
|
631
|
+
loading: "lazy",
|
|
632
|
+
onError: () => setFailed(true)
|
|
633
|
+
}
|
|
634
|
+
);
|
|
635
|
+
}
|
|
636
|
+
return /* @__PURE__ */ jsx(Image, { className: "size-5", "aria-hidden": "true" });
|
|
637
|
+
}
|
|
638
|
+
function CollectionState({
|
|
639
|
+
status,
|
|
640
|
+
empty,
|
|
641
|
+
noResults,
|
|
642
|
+
hasItems,
|
|
643
|
+
query,
|
|
644
|
+
error,
|
|
645
|
+
onRetry
|
|
646
|
+
}) {
|
|
647
|
+
const messages = useMonkeysLocaleMessages().agentWorkbench.navigation;
|
|
648
|
+
if (status === "loading" && !hasItems) {
|
|
649
|
+
return /* @__PURE__ */ jsx("div", { className: "px-3 py-8 text-center text-sm text-muted-foreground", children: messages.loading });
|
|
650
|
+
}
|
|
651
|
+
if (status === "error") {
|
|
652
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3 px-3 py-8 text-center", children: [
|
|
653
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", role: "alert", children: error }),
|
|
654
|
+
/* @__PURE__ */ jsxs("button", { type: "button", className: "inline-flex items-center gap-1.5 text-sm font-medium text-primary", onClick: onRetry, children: [
|
|
655
|
+
/* @__PURE__ */ jsx(RefreshCw, { className: "size-3.5", "aria-hidden": "true" }),
|
|
656
|
+
messages.retry
|
|
657
|
+
] })
|
|
658
|
+
] });
|
|
659
|
+
}
|
|
660
|
+
if (!hasItems) {
|
|
661
|
+
return /* @__PURE__ */ jsx("div", { className: "px-3 py-8 text-center text-sm text-muted-foreground", children: query ? noResults : empty });
|
|
662
|
+
}
|
|
663
|
+
return null;
|
|
664
|
+
}
|
|
665
|
+
function StatusIndicator({ status }) {
|
|
666
|
+
const messages = useMonkeysLocaleMessages().agentWorkbench.navigation;
|
|
667
|
+
if (status === "running") {
|
|
668
|
+
return /* @__PURE__ */ jsx(Loader2, { className: "size-4 animate-spin text-primary", "aria-label": messages.running });
|
|
669
|
+
}
|
|
670
|
+
if (status === "completed") {
|
|
671
|
+
return /* @__PURE__ */ jsx(CheckCircle2, { className: "size-4 text-primary", "aria-label": messages.completed });
|
|
672
|
+
}
|
|
673
|
+
if (status === "error") {
|
|
674
|
+
return /* @__PURE__ */ jsx(AlertCircle, { className: "size-4 text-destructive-text", "aria-label": messages.failed });
|
|
675
|
+
}
|
|
676
|
+
return null;
|
|
677
|
+
}
|
|
678
|
+
function SessionActions({
|
|
679
|
+
item,
|
|
680
|
+
capabilities,
|
|
681
|
+
onIntent
|
|
682
|
+
}) {
|
|
683
|
+
const messages = useMonkeysLocaleMessages().agentWorkbench.navigation;
|
|
684
|
+
if (!capabilities.renameSessions && !capabilities.deleteSessions) return null;
|
|
685
|
+
return /* @__PURE__ */ jsxs(DropdownMenu2, { children: [
|
|
686
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx("button", { type: "button", className: "flex size-8 items-center justify-center rounded-md hover:bg-muted", "aria-label": messages.actions, children: /* @__PURE__ */ jsx(Ellipsis, { className: "size-4", "aria-hidden": "true" }) }) }),
|
|
687
|
+
/* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", children: [
|
|
688
|
+
capabilities.renameSessions ? /* @__PURE__ */ jsxs(DropdownMenuItem, { onSelect: () => onIntent?.({ type: "rename-session", sessionId: item.id, title: item.title }), children: [
|
|
689
|
+
/* @__PURE__ */ jsx(Pencil, { className: "mr-2 size-4", "aria-hidden": "true" }),
|
|
690
|
+
messages.rename
|
|
691
|
+
] }) : null,
|
|
692
|
+
capabilities.deleteSessions ? /* @__PURE__ */ jsxs(DropdownMenuItem, { className: "text-destructive-text", onSelect: () => onIntent?.({ type: "delete-session", sessionId: item.id }), children: [
|
|
693
|
+
/* @__PURE__ */ jsx(Trash2, { className: "mr-2 size-4", "aria-hidden": "true" }),
|
|
694
|
+
messages.delete
|
|
695
|
+
] }) : null
|
|
696
|
+
] })
|
|
697
|
+
] });
|
|
698
|
+
}
|
|
699
|
+
function AgentWorkbenchSidebar({ viewModel, className, classNames, onIntent }) {
|
|
700
|
+
const { locale } = useMonkeysLocale();
|
|
701
|
+
const messages = useMonkeysLocaleMessages().agentWorkbench.navigation;
|
|
702
|
+
const searchRef = useRef(null);
|
|
703
|
+
const query = viewModel.searchQuery.trim().toLocaleLowerCase();
|
|
704
|
+
const agents = useMemo(
|
|
705
|
+
() => viewModel.agents.items.filter((item) => !query || `${item.name} ${item.description ?? ""}`.toLocaleLowerCase().includes(query)),
|
|
706
|
+
[query, viewModel.agents.items]
|
|
707
|
+
);
|
|
708
|
+
const sessions = useMemo(
|
|
709
|
+
() => viewModel.sessions.items.filter((item) => !query || item.title.toLocaleLowerCase().includes(query)),
|
|
710
|
+
[query, viewModel.sessions.items]
|
|
711
|
+
);
|
|
712
|
+
useEffect(() => {
|
|
713
|
+
const handleShortcut = (event) => {
|
|
714
|
+
if (!(event.ctrlKey || event.metaKey) || event.key.toLocaleLowerCase() !== "k") return;
|
|
715
|
+
event.preventDefault();
|
|
716
|
+
searchRef.current?.focus();
|
|
717
|
+
searchRef.current?.select();
|
|
718
|
+
};
|
|
719
|
+
window.addEventListener("keydown", handleShortcut);
|
|
720
|
+
return () => window.removeEventListener("keydown", handleShortcut);
|
|
721
|
+
}, []);
|
|
722
|
+
return /* @__PURE__ */ jsx("nav", { "aria-label": messages.tabsLabel, className: cn2("h-full min-h-0", classNames?.root, className), children: /* @__PURE__ */ jsxs(
|
|
723
|
+
Tabs,
|
|
724
|
+
{
|
|
725
|
+
value: viewModel.activeTab,
|
|
726
|
+
onValueChange: (value) => {
|
|
727
|
+
if (value === "agents" || value === "sessions") onIntent?.({ type: "change-tab", tab: value });
|
|
728
|
+
},
|
|
729
|
+
className: "flex h-full min-h-0 flex-col bg-background text-foreground",
|
|
730
|
+
children: [
|
|
731
|
+
/* @__PURE__ */ jsxs("div", { className: "shrink-0 space-y-3 p-4 pb-2", children: [
|
|
732
|
+
/* @__PURE__ */ jsxs("div", { className: cn2("flex h-10 items-center gap-2 rounded-lg border border-border bg-card px-3 focus-within:ring-2 focus-within:ring-ring", classNames?.search), children: [
|
|
733
|
+
/* @__PURE__ */ jsx(Search, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": "true" }),
|
|
734
|
+
/* @__PURE__ */ jsx(
|
|
735
|
+
"input",
|
|
736
|
+
{
|
|
737
|
+
ref: searchRef,
|
|
738
|
+
type: "search",
|
|
739
|
+
value: viewModel.searchQuery,
|
|
740
|
+
"aria-label": messages.search,
|
|
741
|
+
placeholder: messages.search,
|
|
742
|
+
className: "min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground [&::-webkit-search-cancel-button]:hidden",
|
|
743
|
+
onChange: (event) => onIntent?.({ type: "change-search", query: event.target.value }),
|
|
744
|
+
onKeyDown: (event) => {
|
|
745
|
+
if (event.key !== "Escape") return;
|
|
746
|
+
onIntent?.({ type: "change-search", query: "" });
|
|
747
|
+
event.currentTarget.blur();
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
),
|
|
751
|
+
viewModel.searchQuery ? /* @__PURE__ */ jsx("button", { type: "button", className: "flex size-6 items-center justify-center rounded-md hover:bg-muted", "aria-label": messages.clearSearch, onClick: () => onIntent?.({ type: "change-search", query: "" }), children: /* @__PURE__ */ jsx(X, { className: "size-3.5", "aria-hidden": "true" }) }) : /* @__PURE__ */ jsx("kbd", { className: "rounded border border-border px-1.5 py-0.5 text-[10px] text-muted-foreground", children: "Ctrl K" })
|
|
752
|
+
] }),
|
|
753
|
+
/* @__PURE__ */ jsxs(TabsList, { className: cn2("grid w-full grid-cols-2 text-foreground", classNames?.tabs), "aria-label": messages.tabsLabel, children: [
|
|
754
|
+
/* @__PURE__ */ jsx(TabsTrigger, { value: "agents", children: messages.agents }),
|
|
755
|
+
/* @__PURE__ */ jsx(TabsTrigger, { value: "sessions", children: messages.sessions })
|
|
756
|
+
] })
|
|
757
|
+
] }),
|
|
758
|
+
/* @__PURE__ */ jsxs(TabsContent, { value: "agents", className: cn2("mt-0 min-h-0 flex-1 overflow-y-auto px-4 pb-4", classNames?.body), children: [
|
|
759
|
+
viewModel.capabilities.createAgent ? /* @__PURE__ */ jsxs("button", { type: "button", className: "mb-3 flex h-9 w-full items-center gap-2 rounded-md px-3 text-left text-sm font-medium hover:bg-muted", onClick: () => onIntent?.({ type: "create-agent" }), children: [
|
|
760
|
+
/* @__PURE__ */ jsx(Plus, { className: "size-4", "aria-hidden": "true" }),
|
|
761
|
+
messages.newAgent
|
|
762
|
+
] }) : null,
|
|
763
|
+
/* @__PURE__ */ jsx("h3", { className: "mb-2 px-3 text-xs font-medium text-muted-foreground", children: messages.allAgents }),
|
|
764
|
+
/* @__PURE__ */ jsx(CollectionState, { status: viewModel.agents.status, empty: messages.emptyAgents, noResults: messages.noResults, hasItems: agents.length > 0, query, error: viewModel.agents.error, onRetry: () => onIntent?.({ type: "retry-agents" }) }),
|
|
765
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-1", children: agents.map((item) => /* @__PURE__ */ jsxs(
|
|
766
|
+
"div",
|
|
767
|
+
{
|
|
768
|
+
"aria-current": item.id === viewModel.selectedAgentItem ? "page" : void 0,
|
|
769
|
+
className: cn2("group flex w-full items-center gap-3 rounded-lg border border-transparent px-3 py-2 text-left hover:bg-muted aria-[current=page]:border-primary aria-[current=page]:bg-muted", classNames?.item),
|
|
770
|
+
children: [
|
|
771
|
+
/* @__PURE__ */ jsxs("button", { type: "button", className: "flex min-w-0 flex-1 items-center gap-3 text-left", onClick: () => onIntent?.({ type: "select-agent", itemId: item.id }), children: [
|
|
772
|
+
/* @__PURE__ */ jsx("span", { className: "flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx(ItemAvatar, { item }) }),
|
|
773
|
+
/* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
774
|
+
/* @__PURE__ */ jsx("span", { className: "block truncate text-sm font-medium", children: item.name }),
|
|
775
|
+
/* @__PURE__ */ jsx("span", { className: "block truncate text-xs text-foreground/80", children: item.description || messages.noDescription })
|
|
776
|
+
] })
|
|
777
|
+
] }),
|
|
778
|
+
item.builtIn ? /* @__PURE__ */ jsx("span", { className: "rounded-full bg-muted px-1.5 py-1 text-[10px] text-foreground", children: messages.builtIn }) : null,
|
|
779
|
+
viewModel.capabilities.pinAgents ? /* @__PURE__ */ jsx(
|
|
780
|
+
"button",
|
|
781
|
+
{
|
|
782
|
+
type: "button",
|
|
783
|
+
"aria-label": item.pinned ? messages.unpin : messages.pin,
|
|
784
|
+
className: cn2("flex size-8 items-center justify-center rounded-md text-muted-foreground opacity-0 hover:bg-muted group-hover:opacity-100", item.pinned && "text-primary opacity-100"),
|
|
785
|
+
onClick: (event) => {
|
|
786
|
+
event.stopPropagation();
|
|
787
|
+
onIntent?.({ type: "toggle-agent-pin", itemId: item.id, pinned: !item.pinned });
|
|
788
|
+
},
|
|
789
|
+
onKeyDown: (event) => {
|
|
790
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
791
|
+
event.preventDefault();
|
|
792
|
+
event.stopPropagation();
|
|
793
|
+
onIntent?.({ type: "toggle-agent-pin", itemId: item.id, pinned: !item.pinned });
|
|
794
|
+
}
|
|
795
|
+
},
|
|
796
|
+
children: /* @__PURE__ */ jsx(Pin, { className: cn2("size-4", item.pinned && "fill-current", item.pinPending && "animate-pulse") })
|
|
797
|
+
}
|
|
798
|
+
) : null
|
|
799
|
+
]
|
|
800
|
+
},
|
|
801
|
+
item.id
|
|
802
|
+
)) })
|
|
803
|
+
] }),
|
|
804
|
+
/* @__PURE__ */ jsxs(TabsContent, { value: "sessions", className: cn2("mt-0 min-h-0 flex-1 overflow-y-auto px-4 pb-4", classNames?.body), children: [
|
|
805
|
+
viewModel.capabilities.createSession ? /* @__PURE__ */ jsxs("button", { type: "button", className: "flex h-9 w-full items-center gap-2 rounded-md px-3 text-left text-sm font-medium hover:bg-muted", onClick: () => onIntent?.({ type: "create-session" }), children: [
|
|
806
|
+
/* @__PURE__ */ jsx(SquarePen, { className: "size-4", "aria-hidden": "true" }),
|
|
807
|
+
messages.newSession
|
|
808
|
+
] }) : null,
|
|
809
|
+
viewModel.capabilities.manageCapabilities ? /* @__PURE__ */ jsxs("button", { type: "button", className: "mb-3 flex h-9 w-full items-center gap-2 rounded-md px-3 text-left text-sm font-medium hover:bg-muted", onClick: () => onIntent?.({ type: "open-capabilities" }), children: [
|
|
810
|
+
/* @__PURE__ */ jsx(Blocks, { className: "size-4", "aria-hidden": "true" }),
|
|
811
|
+
messages.capabilities
|
|
812
|
+
] }) : null,
|
|
813
|
+
/* @__PURE__ */ jsx("h3", { className: "mb-2 px-3 text-xs font-medium text-muted-foreground", children: messages.recentSessions }),
|
|
814
|
+
/* @__PURE__ */ jsx(CollectionState, { status: viewModel.sessions.status, empty: messages.emptySessions, noResults: messages.noResults, hasItems: sessions.length > 0, query, error: viewModel.sessions.error, onRetry: () => onIntent?.({ type: "retry-sessions" }) }),
|
|
815
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-1", children: sessions.map((item) => {
|
|
816
|
+
const percent = item.contextUsage ? Math.min(100, Math.round(item.contextUsage.usedTokens / item.contextUsage.maxTokens * 100)) : void 0;
|
|
817
|
+
return /* @__PURE__ */ jsxs("div", { "aria-current": item.id === viewModel.selectedSessionItem ? "page" : void 0, className: cn2("group flex w-full items-center gap-3 rounded-lg border border-transparent px-3 py-2 text-left hover:bg-muted aria-[current=page]:border-primary aria-[current=page]:bg-muted", classNames?.item), children: [
|
|
818
|
+
/* @__PURE__ */ jsxs("button", { type: "button", className: "flex min-w-0 flex-1 items-center gap-3 text-left", onClick: () => onIntent?.({ type: "select-session", sessionId: item.id }), children: [
|
|
819
|
+
/* @__PURE__ */ jsx("span", { className: "flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx(SessionAvatar, { item }) }),
|
|
820
|
+
/* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
821
|
+
/* @__PURE__ */ jsx("span", { className: "block truncate text-sm font-medium", children: item.title }),
|
|
822
|
+
/* @__PURE__ */ jsx("span", { className: "block truncate text-xs text-foreground/80", children: new Intl.DateTimeFormat(locale, { dateStyle: "medium", timeStyle: "short" }).format(new Date(item.updatedAt)) })
|
|
823
|
+
] })
|
|
824
|
+
] }),
|
|
825
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1", children: [
|
|
826
|
+
percent !== void 0 && item.status === "idle" ? /* @__PURE__ */ jsxs("span", { className: "text-xs text-foreground", "aria-label": messages.contextUsage({ percent }), children: [
|
|
827
|
+
percent,
|
|
828
|
+
"%"
|
|
829
|
+
] }) : /* @__PURE__ */ jsx(StatusIndicator, { status: item.status }),
|
|
830
|
+
viewModel.capabilities.pinSessions ? /* @__PURE__ */ jsx("button", { type: "button", "aria-label": item.pinned ? messages.unpin : messages.pin, className: cn2("flex size-8 items-center justify-center rounded-md text-muted-foreground opacity-0 hover:bg-muted group-hover:opacity-100", item.pinned && "text-primary opacity-100"), onClick: (event) => {
|
|
831
|
+
event.stopPropagation();
|
|
832
|
+
onIntent?.({ type: "toggle-session-pin", sessionId: item.id, pinned: !item.pinned });
|
|
833
|
+
}, children: /* @__PURE__ */ jsx(Pin, { className: cn2("size-4", item.pinned && "fill-current") }) }) : null,
|
|
834
|
+
/* @__PURE__ */ jsx("span", { onClick: (event) => event.stopPropagation(), onKeyDown: (event) => event.stopPropagation(), children: /* @__PURE__ */ jsx(SessionActions, { item, capabilities: viewModel.capabilities, onIntent }) })
|
|
835
|
+
] })
|
|
836
|
+
] }, item.id);
|
|
837
|
+
}) })
|
|
838
|
+
] }),
|
|
839
|
+
viewModel.capabilities.manageAgentSettings ? /* @__PURE__ */ jsx("div", { className: cn2("shrink-0 border-t border-border p-4", classNames?.footer), children: /* @__PURE__ */ jsxs("button", { type: "button", className: "flex h-10 w-full items-center gap-2 rounded-md px-3 text-left text-sm font-medium hover:bg-muted", onClick: () => onIntent?.({ type: "open-agent-settings" }), children: [
|
|
840
|
+
/* @__PURE__ */ jsx(Settings, { className: "size-4", "aria-hidden": "true" }),
|
|
841
|
+
messages.settings
|
|
842
|
+
] }) }) : null
|
|
843
|
+
]
|
|
844
|
+
}
|
|
845
|
+
) });
|
|
846
|
+
}
|
|
250
847
|
|
|
251
848
|
// src/components/agent-workbench/activity-model.ts
|
|
252
849
|
var EVENT_CAPABILITIES = {
|
|
@@ -345,7 +942,7 @@ function JsonValue({ value, className }) {
|
|
|
345
942
|
return /* @__PURE__ */ jsx(
|
|
346
943
|
"pre",
|
|
347
944
|
{
|
|
348
|
-
className:
|
|
945
|
+
className: cn2(
|
|
349
946
|
"max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-md bg-muted p-3 font-mono text-xs text-foreground",
|
|
350
947
|
className
|
|
351
948
|
),
|
|
@@ -360,12 +957,12 @@ function ToolStatus({ status }) {
|
|
|
360
957
|
return /* @__PURE__ */ jsx(Clock3, { className: commonClassName, "aria-hidden": "true" });
|
|
361
958
|
}
|
|
362
959
|
if (status === "running") {
|
|
363
|
-
return /* @__PURE__ */ jsx(Loader2, { className:
|
|
960
|
+
return /* @__PURE__ */ jsx(Loader2, { className: cn2(commonClassName, "animate-spin"), "aria-hidden": "true" });
|
|
364
961
|
}
|
|
365
962
|
if (status === "completed") {
|
|
366
|
-
return /* @__PURE__ */ jsx(CheckCircle2, { className:
|
|
963
|
+
return /* @__PURE__ */ jsx(CheckCircle2, { className: cn2(commonClassName, "text-primary"), "aria-hidden": "true" });
|
|
367
964
|
}
|
|
368
|
-
return /* @__PURE__ */ jsx(XCircle, { className:
|
|
965
|
+
return /* @__PURE__ */ jsx(XCircle, { className: cn2(commonClassName, "text-destructive-text"), "aria-hidden": "true" });
|
|
369
966
|
}
|
|
370
967
|
function AgentWorkbenchTool({
|
|
371
968
|
event,
|
|
@@ -388,7 +985,7 @@ function AgentWorkbenchTool({
|
|
|
388
985
|
"details",
|
|
389
986
|
{
|
|
390
987
|
open: isExpanded,
|
|
391
|
-
className:
|
|
988
|
+
className: cn2(
|
|
392
989
|
"group rounded-lg border border-border bg-card text-card-foreground",
|
|
393
990
|
classNames?.root,
|
|
394
991
|
className
|
|
@@ -398,7 +995,7 @@ function AgentWorkbenchTool({
|
|
|
398
995
|
/* @__PURE__ */ jsxs(
|
|
399
996
|
"summary",
|
|
400
997
|
{
|
|
401
|
-
className:
|
|
998
|
+
className: cn2(
|
|
402
999
|
"flex cursor-pointer list-none items-center gap-2 px-3 py-2.5 text-sm outline-none focus-visible:ring-2 focus-visible:ring-ring [&::-webkit-details-marker]:hidden",
|
|
403
1000
|
classNames?.trigger
|
|
404
1001
|
),
|
|
@@ -409,7 +1006,7 @@ function AgentWorkbenchTool({
|
|
|
409
1006
|
children: [
|
|
410
1007
|
/* @__PURE__ */ jsx(TerminalSquare, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": "true" }),
|
|
411
1008
|
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate font-medium", children: event.payload.toolName }),
|
|
412
|
-
/* @__PURE__ */ jsxs("span", { className: "inline-flex shrink-0 items-center gap-1 rounded-full bg-muted px-2 py-0.5 text-xs text-
|
|
1009
|
+
/* @__PURE__ */ jsxs("span", { className: "inline-flex shrink-0 items-center gap-1 rounded-full bg-muted px-2 py-0.5 text-xs text-foreground", children: [
|
|
413
1010
|
/* @__PURE__ */ jsx(ToolStatus, { status }),
|
|
414
1011
|
messages.status[status]
|
|
415
1012
|
] }),
|
|
@@ -423,7 +1020,7 @@ function AgentWorkbenchTool({
|
|
|
423
1020
|
]
|
|
424
1021
|
}
|
|
425
1022
|
),
|
|
426
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
1023
|
+
/* @__PURE__ */ jsxs("div", { className: cn2("space-y-3 border-t border-border px-3 py-3 text-sm", classNames?.content), children: [
|
|
427
1024
|
event.payload.input !== void 0 ? /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
428
1025
|
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium text-muted-foreground", children: messages.input }),
|
|
429
1026
|
/* @__PURE__ */ jsx(JsonValue, { value: event.payload.input, className: classNames?.input })
|
|
@@ -439,7 +1036,7 @@ function AgentWorkbenchTool({
|
|
|
439
1036
|
);
|
|
440
1037
|
}
|
|
441
1038
|
function ActivityDetails({
|
|
442
|
-
icon:
|
|
1039
|
+
icon: Icon2,
|
|
443
1040
|
title,
|
|
444
1041
|
open,
|
|
445
1042
|
streaming,
|
|
@@ -451,7 +1048,7 @@ function ActivityDetails({
|
|
|
451
1048
|
return /* @__PURE__ */ jsxs(
|
|
452
1049
|
"details",
|
|
453
1050
|
{
|
|
454
|
-
className:
|
|
1051
|
+
className: cn2(
|
|
455
1052
|
"group rounded-lg border border-border bg-card text-card-foreground",
|
|
456
1053
|
className
|
|
457
1054
|
),
|
|
@@ -460,12 +1057,12 @@ function ActivityDetails({
|
|
|
460
1057
|
/* @__PURE__ */ jsxs(
|
|
461
1058
|
"summary",
|
|
462
1059
|
{
|
|
463
|
-
className:
|
|
1060
|
+
className: cn2(
|
|
464
1061
|
"flex cursor-pointer list-none items-center gap-2 px-3 py-2.5 text-sm font-medium outline-none focus-visible:ring-2 focus-visible:ring-ring [&::-webkit-details-marker]:hidden",
|
|
465
1062
|
triggerClassName
|
|
466
1063
|
),
|
|
467
1064
|
children: [
|
|
468
|
-
streaming ? /* @__PURE__ */ jsx(Loader2, { className: "size-4 shrink-0 animate-spin", "aria-hidden": "true" }) : /* @__PURE__ */ jsx(
|
|
1065
|
+
streaming ? /* @__PURE__ */ jsx(Loader2, { className: "size-4 shrink-0 animate-spin", "aria-hidden": "true" }) : /* @__PURE__ */ jsx(Icon2, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": "true" }),
|
|
469
1066
|
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: title }),
|
|
470
1067
|
/* @__PURE__ */ jsx(
|
|
471
1068
|
ChevronDown,
|
|
@@ -480,7 +1077,7 @@ function ActivityDetails({
|
|
|
480
1077
|
/* @__PURE__ */ jsx(
|
|
481
1078
|
"div",
|
|
482
1079
|
{
|
|
483
|
-
className:
|
|
1080
|
+
className: cn2(
|
|
484
1081
|
"border-t border-border px-3 py-3 text-sm",
|
|
485
1082
|
contentClassName
|
|
486
1083
|
),
|
|
@@ -565,7 +1162,7 @@ function AgentWorkbenchActivity({
|
|
|
565
1162
|
return /* @__PURE__ */ jsxs(
|
|
566
1163
|
"section",
|
|
567
1164
|
{
|
|
568
|
-
className:
|
|
1165
|
+
className: cn2("space-y-3", classNames?.root, className),
|
|
569
1166
|
"aria-label": messages.label,
|
|
570
1167
|
"data-agent-workbench-mode": activity.mode,
|
|
571
1168
|
"data-agent-workbench-status": activity.status,
|
|
@@ -637,7 +1234,7 @@ function AgentWorkbenchActivity({
|
|
|
637
1234
|
return /* @__PURE__ */ jsx(
|
|
638
1235
|
"article",
|
|
639
1236
|
{
|
|
640
|
-
className:
|
|
1237
|
+
className: cn2(
|
|
641
1238
|
"rounded-lg border border-border bg-card p-3 text-card-foreground",
|
|
642
1239
|
classNames?.approval
|
|
643
1240
|
),
|
|
@@ -686,7 +1283,7 @@ function AgentWorkbenchActivity({
|
|
|
686
1283
|
return /* @__PURE__ */ jsxs(
|
|
687
1284
|
"article",
|
|
688
1285
|
{
|
|
689
|
-
className:
|
|
1286
|
+
className: cn2(
|
|
690
1287
|
"flex items-center gap-3 rounded-lg border border-border bg-card p-3 text-card-foreground",
|
|
691
1288
|
classNames?.artifact
|
|
692
1289
|
),
|
|
@@ -725,9 +1322,9 @@ function AgentWorkbenchActivity({
|
|
|
725
1322
|
usage && contextWindow !== void 0 ? /* @__PURE__ */ jsx(
|
|
726
1323
|
"div",
|
|
727
1324
|
{
|
|
728
|
-
className:
|
|
1325
|
+
className: cn2("flex justify-end", classNames?.usage),
|
|
729
1326
|
"aria-label": messages.usage.label,
|
|
730
|
-
children: /* @__PURE__ */ jsx("span", { className: "rounded-full border border-border bg-muted px-2.5 py-1 text-xs text-
|
|
1327
|
+
children: /* @__PURE__ */ jsx("span", { className: "rounded-full border border-border bg-muted px-2.5 py-1 text-xs text-foreground", children: messages.usage.context({
|
|
731
1328
|
used: usage.contextTokens ?? usage.totalTokens ?? 0,
|
|
732
1329
|
total: contextWindow
|
|
733
1330
|
}) })
|
|
@@ -844,12 +1441,12 @@ function formatDate(value, locale) {
|
|
|
844
1441
|
}).format(date);
|
|
845
1442
|
}
|
|
846
1443
|
function Count({ value }) {
|
|
847
|
-
return /* @__PURE__ */ jsx("span", { className: "rounded-full bg-muted px-1.5 py-0.5 text-[10px] font-semibold text-
|
|
1444
|
+
return /* @__PURE__ */ jsx("span", { className: "rounded-full bg-muted px-1.5 py-0.5 text-[10px] font-semibold text-foreground", children: value });
|
|
848
1445
|
}
|
|
849
1446
|
function DetailsSection({
|
|
850
1447
|
title,
|
|
851
1448
|
count,
|
|
852
|
-
icon:
|
|
1449
|
+
icon: Icon2,
|
|
853
1450
|
className,
|
|
854
1451
|
children
|
|
855
1452
|
}) {
|
|
@@ -857,14 +1454,14 @@ function DetailsSection({
|
|
|
857
1454
|
return /* @__PURE__ */ jsxs(
|
|
858
1455
|
"details",
|
|
859
1456
|
{
|
|
860
|
-
className:
|
|
1457
|
+
className: cn2(
|
|
861
1458
|
"group rounded-lg border border-border bg-card text-card-foreground",
|
|
862
1459
|
className
|
|
863
1460
|
),
|
|
864
1461
|
open: true,
|
|
865
1462
|
children: [
|
|
866
1463
|
/* @__PURE__ */ jsxs("summary", { className: "flex cursor-pointer list-none items-center gap-2 px-3 py-2.5 text-sm font-medium outline-none focus-visible:ring-2 focus-visible:ring-ring [&::-webkit-details-marker]:hidden", children: [
|
|
867
|
-
/* @__PURE__ */ jsx(
|
|
1464
|
+
/* @__PURE__ */ jsx(Icon2, { className: "size-4 text-muted-foreground", "aria-hidden": "true" }),
|
|
868
1465
|
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: title }),
|
|
869
1466
|
/* @__PURE__ */ jsx(Count, { value: count }),
|
|
870
1467
|
/* @__PURE__ */ jsx(
|
|
@@ -1031,7 +1628,7 @@ function WorkspacePanel({
|
|
|
1031
1628
|
/* @__PURE__ */ jsx("span", { className: "truncate font-medium", children: event.payload.path }),
|
|
1032
1629
|
/* @__PURE__ */ jsx("span", { className: "shrink-0 text-muted-foreground", children: messages.diffStatus[event.payload.status] })
|
|
1033
1630
|
] }),
|
|
1034
|
-
event.payload.patch ? /* @__PURE__ */ jsx("pre", { className:
|
|
1631
|
+
event.payload.patch ? /* @__PURE__ */ jsx("pre", { className: cn2("mt-2 max-h-72 overflow-auto whitespace-pre-wrap rounded-md bg-muted p-3 font-mono text-xs", codeClassName), children: event.payload.patch }) : null
|
|
1035
1632
|
] }, event.payload.path)) })
|
|
1036
1633
|
}
|
|
1037
1634
|
),
|
|
@@ -1061,7 +1658,7 @@ function WorkspacePanel({
|
|
|
1061
1658
|
/* @__PURE__ */ jsx("span", { children: terminal.terminalId }),
|
|
1062
1659
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: terminal.exitCode === void 0 ? terminal.status : messages.exitCode({ code: terminal.exitCode }) })
|
|
1063
1660
|
] }),
|
|
1064
|
-
/* @__PURE__ */ jsx("pre", { className:
|
|
1661
|
+
/* @__PURE__ */ jsx("pre", { className: cn2("mt-2 max-h-72 overflow-auto whitespace-pre-wrap rounded-md bg-muted p-3 font-mono text-xs", codeClassName), children: [terminal.stdin, terminal.stdout, terminal.stderr].filter(Boolean).join("\n") })
|
|
1065
1662
|
] }, terminal.terminalId)) })
|
|
1066
1663
|
}
|
|
1067
1664
|
),
|
|
@@ -1078,7 +1675,7 @@ function WorkspacePanel({
|
|
|
1078
1675
|
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: event.payload.name }),
|
|
1079
1676
|
event.payload.durationMs === void 0 ? null : /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: formatDuration2(event.payload.durationMs) })
|
|
1080
1677
|
] }),
|
|
1081
|
-
event.payload.output ? /* @__PURE__ */ jsx("pre", { className:
|
|
1678
|
+
event.payload.output ? /* @__PURE__ */ jsx("pre", { className: cn2("mt-2 max-h-48 overflow-auto whitespace-pre-wrap rounded-md bg-muted p-3 font-mono text-xs", codeClassName), children: event.payload.output }) : null
|
|
1082
1679
|
] }, event.payload.testId)) })
|
|
1083
1680
|
}
|
|
1084
1681
|
),
|
|
@@ -1109,10 +1706,10 @@ function AgentWorkbenchTaskDetails({
|
|
|
1109
1706
|
}) {
|
|
1110
1707
|
const messages = useMonkeysLocaleMessages().agentWorkbench.details;
|
|
1111
1708
|
if (state !== "ready") {
|
|
1112
|
-
return /* @__PURE__ */ jsx("aside", { className:
|
|
1709
|
+
return /* @__PURE__ */ jsx("aside", { className: cn2("flex h-full min-h-0 flex-col border-l border-border bg-background", classNames?.root, className), children: /* @__PURE__ */ jsx(StateContent, { state }) });
|
|
1113
1710
|
}
|
|
1114
1711
|
if (!viewModel) {
|
|
1115
|
-
return /* @__PURE__ */ jsx("aside", { className:
|
|
1712
|
+
return /* @__PURE__ */ jsx("aside", { className: cn2("flex h-full min-h-0 flex-col border-l border-border bg-background", classNames?.root, className), children: /* @__PURE__ */ jsx(StateContent, { state: "empty" }) });
|
|
1116
1713
|
}
|
|
1117
1714
|
const model = createAgentWorkbenchDetailsModel(viewModel);
|
|
1118
1715
|
const workspaceCount = Object.values(model.workspace).reduce(
|
|
@@ -1138,14 +1735,14 @@ function AgentWorkbenchTaskDetails({
|
|
|
1138
1735
|
return /* @__PURE__ */ jsxs(
|
|
1139
1736
|
"aside",
|
|
1140
1737
|
{
|
|
1141
|
-
className:
|
|
1738
|
+
className: cn2(
|
|
1142
1739
|
"flex h-full min-h-0 min-w-0 flex-col border-l border-border bg-background text-foreground",
|
|
1143
1740
|
classNames?.root,
|
|
1144
1741
|
className
|
|
1145
1742
|
),
|
|
1146
1743
|
"data-agent-workbench-mode": model.mode,
|
|
1147
1744
|
children: [
|
|
1148
|
-
/* @__PURE__ */ jsxs("header", { className:
|
|
1745
|
+
/* @__PURE__ */ jsxs("header", { className: cn2("flex shrink-0 items-center gap-2 border-b border-border px-4 py-3", classNames?.header), children: [
|
|
1149
1746
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
1150
1747
|
/* @__PURE__ */ jsx("h2", { className: "truncate text-sm font-semibold", children: messages.title }),
|
|
1151
1748
|
/* @__PURE__ */ jsx("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: messages.description })
|
|
@@ -1161,7 +1758,7 @@ function AgentWorkbenchTaskDetails({
|
|
|
1161
1758
|
}
|
|
1162
1759
|
) : null
|
|
1163
1760
|
] }),
|
|
1164
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
1761
|
+
/* @__PURE__ */ jsx("div", { className: cn2("flex shrink-0 gap-1 border-b border-border px-3 py-2", classNames?.tabs), role: "tablist", "aria-label": messages.tabs.label, children: tabs.map((tab, index) => /* @__PURE__ */ jsxs(
|
|
1165
1762
|
"button",
|
|
1166
1763
|
{
|
|
1167
1764
|
id: tabId(tab.id),
|
|
@@ -1170,7 +1767,7 @@ function AgentWorkbenchTaskDetails({
|
|
|
1170
1767
|
"aria-selected": resolvedTab === tab.id,
|
|
1171
1768
|
"aria-controls": `${tabId(tab.id)}-panel`,
|
|
1172
1769
|
tabIndex: resolvedTab === tab.id ? 0 : -1,
|
|
1173
|
-
className:
|
|
1770
|
+
className: cn2(
|
|
1174
1771
|
"inline-flex min-w-0 flex-1 items-center justify-center gap-1 rounded-md px-2 py-1.5 text-xs font-medium outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
1175
1772
|
resolvedTab === tab.id ? "bg-primary/10 text-primary" : "text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
1176
1773
|
),
|
|
@@ -1190,7 +1787,7 @@ function AgentWorkbenchTaskDetails({
|
|
|
1190
1787
|
role: "tabpanel",
|
|
1191
1788
|
"aria-labelledby": tabId(resolvedTab),
|
|
1192
1789
|
tabIndex: 0,
|
|
1193
|
-
className:
|
|
1790
|
+
className: cn2("min-h-0 flex-1 overflow-y-auto p-3 outline-none", classNames?.body),
|
|
1194
1791
|
children: resolvedTab === "summary" ? /* @__PURE__ */ jsx(SummaryPanel, { model, onIntent }) : /* @__PURE__ */ jsx(
|
|
1195
1792
|
WorkspacePanel,
|
|
1196
1793
|
{
|
|
@@ -1206,6 +1803,6 @@ function AgentWorkbenchTaskDetails({
|
|
|
1206
1803
|
);
|
|
1207
1804
|
}
|
|
1208
1805
|
|
|
1209
|
-
export { AgentWorkbenchActivity, AgentWorkbenchTaskDetails, AgentWorkbenchTool, createAgentWorkbenchActivityModel, createAgentWorkbenchDetailsModel };
|
|
1806
|
+
export { AgentWorkbenchActivity, AgentWorkbenchSidebar, AgentWorkbenchTaskDetails, AgentWorkbenchTool, createAgentWorkbenchActivityModel, createAgentWorkbenchDetailsModel };
|
|
1210
1807
|
//# sourceMappingURL=index.mjs.map
|
|
1211
1808
|
//# sourceMappingURL=index.mjs.map
|