@inf-monkeys-tech/monkeys-design 1.0.69 → 1.0.72-canary.220.1.0b8b5e3
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 +33 -2
- package/dist/components/agent-workbench/index.d.ts +33 -2
- package/dist/components/agent-workbench/index.js +156 -7
- package/dist/components/agent-workbench/index.js.map +1 -1
- package/dist/components/agent-workbench/index.mjs +153 -9
- package/dist/components/agent-workbench/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,8 @@ import { AgentWorkbenchComposerViewModel, AgentSessionPermissionProfile, AgentWo
|
|
|
3
3
|
export { AgentWorkbenchQuickStartCategory, AgentWorkbenchQuickStartIcon, AgentWorkbenchQuickStartSection, AgentWorkbenchQuickStartTemplate, AgentWorkbenchQuickStartViewModel } from '@inf-monkeys-tech/monkeys';
|
|
4
4
|
import { d as AgentWorkbenchApprovalIntent, e as AgentWorkbenchArtifactIntent } from '../../details-model-49d05d8a4e6d.mjs';
|
|
5
5
|
export { A as AgentWorkbenchActivity, a as AgentWorkbenchActivityClassNames, b as AgentWorkbenchActivityModel, c as AgentWorkbenchActivityProps, E as AgentWorkbenchApproval, F as AgentWorkbenchApprovalData, G as AgentWorkbenchApprovalProps, f as AgentWorkbenchDetailsIntent, g as AgentWorkbenchDetailsModel, h as AgentWorkbenchDetailsState, i as AgentWorkbenchDetailsTab, j as AgentWorkbenchEventOf, H as AgentWorkbenchExploreCardMedia, I as AgentWorkbenchExploreCardMediaProps, k as AgentWorkbenchExploreGroup, l as AgentWorkbenchExploreItem, J as AgentWorkbenchExploreMediaTreatment, K as AgentWorkbenchExploreMediaVariant, m as AgentWorkbenchExploreSidebar, n as AgentWorkbenchExploreSidebarIntent, o as AgentWorkbenchExploreSidebarLabels, p as AgentWorkbenchExploreSidebarProps, q as AgentWorkbenchSidebar, r as AgentWorkbenchSidebarClassNames, s as AgentWorkbenchSidebarIntent, t as AgentWorkbenchSidebarProps, u as AgentWorkbenchTaskDetails, v as AgentWorkbenchTaskDetailsClassNames, w as AgentWorkbenchTaskDetailsProps, x as AgentWorkbenchTerminalModel, y as AgentWorkbenchTool, z as AgentWorkbenchToolClassNames, B as AgentWorkbenchToolProps, C as createAgentWorkbenchActivityModel, D as createAgentWorkbenchDetailsModel } from '../../details-model-49d05d8a4e6d.mjs';
|
|
6
|
-
import
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { ReactNode, HTMLAttributes, ButtonHTMLAttributes, ComponentType } from 'react';
|
|
7
8
|
type AgentWorkbenchComposerIntent = {
|
|
8
9
|
type: 'change-mode';
|
|
9
10
|
mode: 'chat' | 'work';
|
|
@@ -119,6 +120,36 @@ interface AgentWorkbenchThreadProps {
|
|
|
119
120
|
onArtifactOpen?: (intent: AgentWorkbenchArtifactIntent) => void;
|
|
120
121
|
}
|
|
121
122
|
declare function AgentWorkbenchThread({ viewModel, loading, emptyTitle, emptyDescription, autoScroll, className, classNames, renderMessageContent, onApprovalDecision, onArtifactOpen, }: AgentWorkbenchThreadProps): react_jsx_runtime.JSX.Element;
|
|
123
|
+
type AgentWorkbenchMessageRole = 'assistant' | 'system' | 'user';
|
|
124
|
+
interface AgentWorkbenchMessageProps extends HTMLAttributes<HTMLDivElement> {
|
|
125
|
+
role: AgentWorkbenchMessageRole;
|
|
126
|
+
}
|
|
127
|
+
interface AgentWorkbenchMessageContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
128
|
+
}
|
|
129
|
+
interface AgentWorkbenchMessageActionsProps extends HTMLAttributes<HTMLDivElement> {
|
|
130
|
+
}
|
|
131
|
+
interface AgentWorkbenchMessageActionProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
132
|
+
label: string;
|
|
133
|
+
tooltip?: ReactNode;
|
|
134
|
+
}
|
|
135
|
+
declare const AgentWorkbenchMessage: React.ForwardRefExoticComponent<AgentWorkbenchMessageProps & React.RefAttributes<HTMLDivElement>>;
|
|
136
|
+
declare const AgentWorkbenchMessageContent: React.ForwardRefExoticComponent<AgentWorkbenchMessageContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
137
|
+
declare const AgentWorkbenchMessageActions: React.ForwardRefExoticComponent<AgentWorkbenchMessageActionsProps & React.RefAttributes<HTMLDivElement>>;
|
|
138
|
+
declare const AgentWorkbenchMessageAction: React.ForwardRefExoticComponent<AgentWorkbenchMessageActionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
139
|
+
interface AgentWorkbenchThreadShellClassNames {
|
|
140
|
+
root?: string;
|
|
141
|
+
header?: string;
|
|
142
|
+
title?: string;
|
|
143
|
+
headerActions?: string;
|
|
144
|
+
body?: string;
|
|
145
|
+
}
|
|
146
|
+
interface AgentWorkbenchThreadShellProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
147
|
+
title?: ReactNode;
|
|
148
|
+
headerActions?: ReactNode;
|
|
149
|
+
showHeader?: boolean;
|
|
150
|
+
classNames?: AgentWorkbenchThreadShellClassNames;
|
|
151
|
+
}
|
|
152
|
+
declare const AgentWorkbenchThreadShell: React.ForwardRefExoticComponent<AgentWorkbenchThreadShellProps & React.RefAttributes<HTMLDivElement>>;
|
|
122
153
|
type AgentWorkbenchProcessStatus = 'completed' | 'failed' | 'queued' | 'running' | 'stopped' | 'waiting_approval';
|
|
123
154
|
interface AgentWorkbenchProcessProps {
|
|
124
155
|
status: AgentWorkbenchProcessStatus;
|
|
@@ -212,4 +243,4 @@ interface AgentWorkbenchArtifactWorkspaceProps {
|
|
|
212
243
|
onIntent?: (intent: AgentWorkbenchArtifactWorkspaceIntent) => void;
|
|
213
244
|
}
|
|
214
245
|
declare function AgentWorkbenchArtifactWorkspace({ artifacts, activeArtifactId, className, renderArtifact, onIntent, }: AgentWorkbenchArtifactWorkspaceProps): null | react_jsx_runtime.JSX.Element;
|
|
215
|
-
export { AgentWorkbenchAction, type AgentWorkbenchActionKind, type AgentWorkbenchActionProps, type AgentWorkbenchActionStatus, AgentWorkbenchApprovalIntent, AgentWorkbenchArtifactIntent, type AgentWorkbenchArtifactItem, type AgentWorkbenchArtifactKind, type AgentWorkbenchArtifactOrigin, type AgentWorkbenchArtifactStatus, AgentWorkbenchArtifactSummary, type AgentWorkbenchArtifactSummaryProps, AgentWorkbenchArtifactWorkspace, type AgentWorkbenchArtifactWorkspaceIntent, type AgentWorkbenchArtifactWorkspaceProps, AgentWorkbenchComposer, type AgentWorkbenchComposerClassNames, type AgentWorkbenchComposerIntent, type AgentWorkbenchComposerProps, AgentWorkbenchProcess, type AgentWorkbenchProcessProps, type AgentWorkbenchProcessStatus, AgentWorkbenchQuickStart, type AgentWorkbenchQuickStartIntent, type AgentWorkbenchQuickStartProps, AgentWorkbenchThread, type AgentWorkbenchThreadClassNames, type AgentWorkbenchThreadMessage, type AgentWorkbenchThreadProps };
|
|
246
|
+
export { AgentWorkbenchAction, type AgentWorkbenchActionKind, type AgentWorkbenchActionProps, type AgentWorkbenchActionStatus, AgentWorkbenchApprovalIntent, AgentWorkbenchArtifactIntent, type AgentWorkbenchArtifactItem, type AgentWorkbenchArtifactKind, type AgentWorkbenchArtifactOrigin, type AgentWorkbenchArtifactStatus, AgentWorkbenchArtifactSummary, type AgentWorkbenchArtifactSummaryProps, AgentWorkbenchArtifactWorkspace, type AgentWorkbenchArtifactWorkspaceIntent, type AgentWorkbenchArtifactWorkspaceProps, AgentWorkbenchComposer, type AgentWorkbenchComposerClassNames, type AgentWorkbenchComposerIntent, type AgentWorkbenchComposerProps, AgentWorkbenchMessage, AgentWorkbenchMessageAction, type AgentWorkbenchMessageActionProps, AgentWorkbenchMessageActions, type AgentWorkbenchMessageActionsProps, AgentWorkbenchMessageContent, type AgentWorkbenchMessageContentProps, type AgentWorkbenchMessageProps, type AgentWorkbenchMessageRole, AgentWorkbenchProcess, type AgentWorkbenchProcessProps, type AgentWorkbenchProcessStatus, AgentWorkbenchQuickStart, type AgentWorkbenchQuickStartIntent, type AgentWorkbenchQuickStartProps, AgentWorkbenchThread, type AgentWorkbenchThreadClassNames, type AgentWorkbenchThreadMessage, type AgentWorkbenchThreadProps, AgentWorkbenchThreadShell, type AgentWorkbenchThreadShellClassNames, type AgentWorkbenchThreadShellProps };
|
|
@@ -3,7 +3,8 @@ import { AgentWorkbenchComposerViewModel, AgentSessionPermissionProfile, AgentWo
|
|
|
3
3
|
export { AgentWorkbenchQuickStartCategory, AgentWorkbenchQuickStartIcon, AgentWorkbenchQuickStartSection, AgentWorkbenchQuickStartTemplate, AgentWorkbenchQuickStartViewModel } from '@inf-monkeys-tech/monkeys';
|
|
4
4
|
import { d as AgentWorkbenchApprovalIntent, e as AgentWorkbenchArtifactIntent } from '../../details-model-49d05d8a4e6d.js';
|
|
5
5
|
export { A as AgentWorkbenchActivity, a as AgentWorkbenchActivityClassNames, b as AgentWorkbenchActivityModel, c as AgentWorkbenchActivityProps, E as AgentWorkbenchApproval, F as AgentWorkbenchApprovalData, G as AgentWorkbenchApprovalProps, f as AgentWorkbenchDetailsIntent, g as AgentWorkbenchDetailsModel, h as AgentWorkbenchDetailsState, i as AgentWorkbenchDetailsTab, j as AgentWorkbenchEventOf, H as AgentWorkbenchExploreCardMedia, I as AgentWorkbenchExploreCardMediaProps, k as AgentWorkbenchExploreGroup, l as AgentWorkbenchExploreItem, J as AgentWorkbenchExploreMediaTreatment, K as AgentWorkbenchExploreMediaVariant, m as AgentWorkbenchExploreSidebar, n as AgentWorkbenchExploreSidebarIntent, o as AgentWorkbenchExploreSidebarLabels, p as AgentWorkbenchExploreSidebarProps, q as AgentWorkbenchSidebar, r as AgentWorkbenchSidebarClassNames, s as AgentWorkbenchSidebarIntent, t as AgentWorkbenchSidebarProps, u as AgentWorkbenchTaskDetails, v as AgentWorkbenchTaskDetailsClassNames, w as AgentWorkbenchTaskDetailsProps, x as AgentWorkbenchTerminalModel, y as AgentWorkbenchTool, z as AgentWorkbenchToolClassNames, B as AgentWorkbenchToolProps, C as createAgentWorkbenchActivityModel, D as createAgentWorkbenchDetailsModel } from '../../details-model-49d05d8a4e6d.js';
|
|
6
|
-
import
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { ReactNode, HTMLAttributes, ButtonHTMLAttributes, ComponentType } from 'react';
|
|
7
8
|
type AgentWorkbenchComposerIntent = {
|
|
8
9
|
type: 'change-mode';
|
|
9
10
|
mode: 'chat' | 'work';
|
|
@@ -119,6 +120,36 @@ interface AgentWorkbenchThreadProps {
|
|
|
119
120
|
onArtifactOpen?: (intent: AgentWorkbenchArtifactIntent) => void;
|
|
120
121
|
}
|
|
121
122
|
declare function AgentWorkbenchThread({ viewModel, loading, emptyTitle, emptyDescription, autoScroll, className, classNames, renderMessageContent, onApprovalDecision, onArtifactOpen, }: AgentWorkbenchThreadProps): react_jsx_runtime.JSX.Element;
|
|
123
|
+
type AgentWorkbenchMessageRole = 'assistant' | 'system' | 'user';
|
|
124
|
+
interface AgentWorkbenchMessageProps extends HTMLAttributes<HTMLDivElement> {
|
|
125
|
+
role: AgentWorkbenchMessageRole;
|
|
126
|
+
}
|
|
127
|
+
interface AgentWorkbenchMessageContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
128
|
+
}
|
|
129
|
+
interface AgentWorkbenchMessageActionsProps extends HTMLAttributes<HTMLDivElement> {
|
|
130
|
+
}
|
|
131
|
+
interface AgentWorkbenchMessageActionProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
132
|
+
label: string;
|
|
133
|
+
tooltip?: ReactNode;
|
|
134
|
+
}
|
|
135
|
+
declare const AgentWorkbenchMessage: React.ForwardRefExoticComponent<AgentWorkbenchMessageProps & React.RefAttributes<HTMLDivElement>>;
|
|
136
|
+
declare const AgentWorkbenchMessageContent: React.ForwardRefExoticComponent<AgentWorkbenchMessageContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
137
|
+
declare const AgentWorkbenchMessageActions: React.ForwardRefExoticComponent<AgentWorkbenchMessageActionsProps & React.RefAttributes<HTMLDivElement>>;
|
|
138
|
+
declare const AgentWorkbenchMessageAction: React.ForwardRefExoticComponent<AgentWorkbenchMessageActionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
139
|
+
interface AgentWorkbenchThreadShellClassNames {
|
|
140
|
+
root?: string;
|
|
141
|
+
header?: string;
|
|
142
|
+
title?: string;
|
|
143
|
+
headerActions?: string;
|
|
144
|
+
body?: string;
|
|
145
|
+
}
|
|
146
|
+
interface AgentWorkbenchThreadShellProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
147
|
+
title?: ReactNode;
|
|
148
|
+
headerActions?: ReactNode;
|
|
149
|
+
showHeader?: boolean;
|
|
150
|
+
classNames?: AgentWorkbenchThreadShellClassNames;
|
|
151
|
+
}
|
|
152
|
+
declare const AgentWorkbenchThreadShell: React.ForwardRefExoticComponent<AgentWorkbenchThreadShellProps & React.RefAttributes<HTMLDivElement>>;
|
|
122
153
|
type AgentWorkbenchProcessStatus = 'completed' | 'failed' | 'queued' | 'running' | 'stopped' | 'waiting_approval';
|
|
123
154
|
interface AgentWorkbenchProcessProps {
|
|
124
155
|
status: AgentWorkbenchProcessStatus;
|
|
@@ -212,4 +243,4 @@ interface AgentWorkbenchArtifactWorkspaceProps {
|
|
|
212
243
|
onIntent?: (intent: AgentWorkbenchArtifactWorkspaceIntent) => void;
|
|
213
244
|
}
|
|
214
245
|
declare function AgentWorkbenchArtifactWorkspace({ artifacts, activeArtifactId, className, renderArtifact, onIntent, }: AgentWorkbenchArtifactWorkspaceProps): null | react_jsx_runtime.JSX.Element;
|
|
215
|
-
export { AgentWorkbenchAction, type AgentWorkbenchActionKind, type AgentWorkbenchActionProps, type AgentWorkbenchActionStatus, AgentWorkbenchApprovalIntent, AgentWorkbenchArtifactIntent, type AgentWorkbenchArtifactItem, type AgentWorkbenchArtifactKind, type AgentWorkbenchArtifactOrigin, type AgentWorkbenchArtifactStatus, AgentWorkbenchArtifactSummary, type AgentWorkbenchArtifactSummaryProps, AgentWorkbenchArtifactWorkspace, type AgentWorkbenchArtifactWorkspaceIntent, type AgentWorkbenchArtifactWorkspaceProps, AgentWorkbenchComposer, type AgentWorkbenchComposerClassNames, type AgentWorkbenchComposerIntent, type AgentWorkbenchComposerProps, AgentWorkbenchProcess, type AgentWorkbenchProcessProps, type AgentWorkbenchProcessStatus, AgentWorkbenchQuickStart, type AgentWorkbenchQuickStartIntent, type AgentWorkbenchQuickStartProps, AgentWorkbenchThread, type AgentWorkbenchThreadClassNames, type AgentWorkbenchThreadMessage, type AgentWorkbenchThreadProps };
|
|
246
|
+
export { AgentWorkbenchAction, type AgentWorkbenchActionKind, type AgentWorkbenchActionProps, type AgentWorkbenchActionStatus, AgentWorkbenchApprovalIntent, AgentWorkbenchArtifactIntent, type AgentWorkbenchArtifactItem, type AgentWorkbenchArtifactKind, type AgentWorkbenchArtifactOrigin, type AgentWorkbenchArtifactStatus, AgentWorkbenchArtifactSummary, type AgentWorkbenchArtifactSummaryProps, AgentWorkbenchArtifactWorkspace, type AgentWorkbenchArtifactWorkspaceIntent, type AgentWorkbenchArtifactWorkspaceProps, AgentWorkbenchComposer, type AgentWorkbenchComposerClassNames, type AgentWorkbenchComposerIntent, type AgentWorkbenchComposerProps, AgentWorkbenchMessage, AgentWorkbenchMessageAction, type AgentWorkbenchMessageActionProps, AgentWorkbenchMessageActions, type AgentWorkbenchMessageActionsProps, AgentWorkbenchMessageContent, type AgentWorkbenchMessageContentProps, type AgentWorkbenchMessageProps, type AgentWorkbenchMessageRole, AgentWorkbenchProcess, type AgentWorkbenchProcessProps, type AgentWorkbenchProcessStatus, AgentWorkbenchQuickStart, type AgentWorkbenchQuickStartIntent, type AgentWorkbenchQuickStartProps, AgentWorkbenchThread, type AgentWorkbenchThreadClassNames, type AgentWorkbenchThreadMessage, type AgentWorkbenchThreadProps, AgentWorkbenchThreadShell, type AgentWorkbenchThreadShellClassNames, type AgentWorkbenchThreadShellProps };
|
|
@@ -3067,6 +3067,80 @@ function AgentWorkbenchTaskDetails({
|
|
|
3067
3067
|
}
|
|
3068
3068
|
);
|
|
3069
3069
|
}
|
|
3070
|
+
var AgentWorkbenchMessage = React5.forwardRef(
|
|
3071
|
+
function AgentWorkbenchMessage2({ role, className, ...messageProps }, ref) {
|
|
3072
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3073
|
+
"div",
|
|
3074
|
+
{
|
|
3075
|
+
...messageProps,
|
|
3076
|
+
ref,
|
|
3077
|
+
"data-agent-message-role": role,
|
|
3078
|
+
className: cn2(
|
|
3079
|
+
"group flex w-full max-w-[95%] min-w-0 flex-col gap-2",
|
|
3080
|
+
role === "user" ? "is-user ml-auto justify-end" : "is-assistant",
|
|
3081
|
+
role === "system" && "mx-auto items-center text-center",
|
|
3082
|
+
className
|
|
3083
|
+
)
|
|
3084
|
+
}
|
|
3085
|
+
);
|
|
3086
|
+
}
|
|
3087
|
+
);
|
|
3088
|
+
var AgentWorkbenchMessageContent = React5.forwardRef(function AgentWorkbenchMessageContent2({ children, className, ...contentProps }, ref) {
|
|
3089
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3090
|
+
"div",
|
|
3091
|
+
{
|
|
3092
|
+
...contentProps,
|
|
3093
|
+
ref,
|
|
3094
|
+
className: cn2(
|
|
3095
|
+
"flex w-fit min-w-0 max-w-full flex-col gap-2 overflow-hidden break-words text-sm [overflow-wrap:anywhere]",
|
|
3096
|
+
"group-[.is-user]:ml-auto group-[.is-user]:rounded-lg group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground",
|
|
3097
|
+
"group-[.is-assistant]:text-foreground",
|
|
3098
|
+
className
|
|
3099
|
+
),
|
|
3100
|
+
children
|
|
3101
|
+
}
|
|
3102
|
+
);
|
|
3103
|
+
});
|
|
3104
|
+
var AgentWorkbenchMessageActions = React5.forwardRef(function AgentWorkbenchMessageActions2({ children, className, ...actionsProps }, ref) {
|
|
3105
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...actionsProps, ref, className: cn2("flex min-w-0 items-center gap-1", className), children });
|
|
3106
|
+
});
|
|
3107
|
+
var AgentWorkbenchMessageAction = React5.forwardRef(function AgentWorkbenchMessageAction2({ children, label, tooltip, className, disabled = false, type = "button", ...buttonProps }, ref) {
|
|
3108
|
+
const tooltipId = React5.useId();
|
|
3109
|
+
const button = /* @__PURE__ */ jsxRuntime.jsx(
|
|
3110
|
+
"button",
|
|
3111
|
+
{
|
|
3112
|
+
...buttonProps,
|
|
3113
|
+
ref,
|
|
3114
|
+
type,
|
|
3115
|
+
"aria-label": label,
|
|
3116
|
+
"aria-describedby": tooltip ? tooltipId : void 0,
|
|
3117
|
+
disabled,
|
|
3118
|
+
className: cn2(
|
|
3119
|
+
"inline-flex size-8 shrink-0 items-center justify-center rounded-md border-0 bg-transparent text-muted-foreground shadow-none transition-colors",
|
|
3120
|
+
"hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
3121
|
+
"disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0",
|
|
3122
|
+
className
|
|
3123
|
+
),
|
|
3124
|
+
children
|
|
3125
|
+
}
|
|
3126
|
+
);
|
|
3127
|
+
if (!tooltip) return button;
|
|
3128
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "group/message-action relative inline-flex", children: [
|
|
3129
|
+
button,
|
|
3130
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3131
|
+
"span",
|
|
3132
|
+
{
|
|
3133
|
+
id: tooltipId,
|
|
3134
|
+
role: "tooltip",
|
|
3135
|
+
className: cn2(
|
|
3136
|
+
"pointer-events-none absolute bottom-full left-1/2 z-50 mb-2 -translate-x-1/2 whitespace-nowrap rounded-md border border-border bg-popover px-2 py-1 text-xs text-popover-foreground shadow-md",
|
|
3137
|
+
"invisible opacity-0 transition-opacity group-hover/message-action:visible group-hover/message-action:opacity-100 group-focus-within/message-action:visible group-focus-within/message-action:opacity-100"
|
|
3138
|
+
),
|
|
3139
|
+
children: tooltip
|
|
3140
|
+
}
|
|
3141
|
+
)
|
|
3142
|
+
] });
|
|
3143
|
+
});
|
|
3070
3144
|
function materializeMessages(events) {
|
|
3071
3145
|
const messages = /* @__PURE__ */ new Map();
|
|
3072
3146
|
for (const event of events) {
|
|
@@ -3212,17 +3286,28 @@ function AgentWorkbenchThread({
|
|
|
3212
3286
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn2("text-center text-xs text-muted-foreground", classNames?.message), children: renderMessageContent?.(message) ?? /* @__PURE__ */ jsxRuntime.jsx(DefaultMessageContent, { message }) }, message.id);
|
|
3213
3287
|
}
|
|
3214
3288
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3215
|
-
|
|
3289
|
+
AgentWorkbenchMessage,
|
|
3216
3290
|
{
|
|
3217
|
-
|
|
3291
|
+
role: message.role,
|
|
3292
|
+
className: cn2(
|
|
3293
|
+
"flex-row items-start gap-3",
|
|
3294
|
+
isUser && "flex-row-reverse",
|
|
3295
|
+
classNames?.message
|
|
3296
|
+
),
|
|
3218
3297
|
"data-message-role": message.role,
|
|
3219
3298
|
children: [
|
|
3220
3299
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn2("flex size-8 shrink-0 items-center justify-center rounded-full", isUser ? "bg-primary text-primary-foreground" : "bg-muted text-foreground"), "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "size-2 rounded-full bg-current" }) }),
|
|
3221
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3300
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3301
|
+
AgentWorkbenchMessageContent,
|
|
3302
|
+
{
|
|
3303
|
+
className: cn2(
|
|
3304
|
+
"max-w-[85%] rounded-2xl px-4 py-2.5 text-sm leading-6",
|
|
3305
|
+
!isUser && "bg-card text-card-foreground",
|
|
3306
|
+
classNames?.messageContent
|
|
3307
|
+
),
|
|
3308
|
+
children: renderMessageContent?.(message) ?? /* @__PURE__ */ jsxRuntime.jsx(DefaultMessageContent, { message })
|
|
3309
|
+
}
|
|
3310
|
+
)
|
|
3226
3311
|
]
|
|
3227
3312
|
},
|
|
3228
3313
|
message.id
|
|
@@ -3231,6 +3316,65 @@ function AgentWorkbenchThread({
|
|
|
3231
3316
|
}
|
|
3232
3317
|
);
|
|
3233
3318
|
}
|
|
3319
|
+
var AgentWorkbenchThreadShell = React5.forwardRef(
|
|
3320
|
+
function AgentWorkbenchThreadShell2({
|
|
3321
|
+
children,
|
|
3322
|
+
title,
|
|
3323
|
+
headerActions,
|
|
3324
|
+
showHeader = Boolean(title || headerActions),
|
|
3325
|
+
className,
|
|
3326
|
+
classNames,
|
|
3327
|
+
...shellProps
|
|
3328
|
+
}, ref) {
|
|
3329
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3330
|
+
"section",
|
|
3331
|
+
{
|
|
3332
|
+
...shellProps,
|
|
3333
|
+
ref,
|
|
3334
|
+
"data-agent-thread-shell": "true",
|
|
3335
|
+
className: cn2(
|
|
3336
|
+
"flex h-full min-h-0 min-w-0 flex-col bg-background",
|
|
3337
|
+
classNames?.root,
|
|
3338
|
+
className
|
|
3339
|
+
),
|
|
3340
|
+
children: [
|
|
3341
|
+
showHeader ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3342
|
+
"header",
|
|
3343
|
+
{
|
|
3344
|
+
className: cn2(
|
|
3345
|
+
"flex min-h-11 min-w-0 items-center justify-between gap-3 border-b border-border px-4 py-2",
|
|
3346
|
+
classNames?.header
|
|
3347
|
+
),
|
|
3348
|
+
children: [
|
|
3349
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3350
|
+
"h1",
|
|
3351
|
+
{
|
|
3352
|
+
className: cn2(
|
|
3353
|
+
"min-w-0 flex-1 truncate text-lg font-normal leading-6 text-foreground",
|
|
3354
|
+
classNames?.title
|
|
3355
|
+
),
|
|
3356
|
+
children: title
|
|
3357
|
+
}
|
|
3358
|
+
),
|
|
3359
|
+
headerActions ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3360
|
+
"div",
|
|
3361
|
+
{
|
|
3362
|
+
className: cn2(
|
|
3363
|
+
"flex min-w-0 shrink-0 items-center gap-0.5",
|
|
3364
|
+
classNames?.headerActions
|
|
3365
|
+
),
|
|
3366
|
+
children: headerActions
|
|
3367
|
+
}
|
|
3368
|
+
) : null
|
|
3369
|
+
]
|
|
3370
|
+
}
|
|
3371
|
+
) : null,
|
|
3372
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn2("flex min-h-0 min-w-0 flex-1 flex-col", classNames?.body), children })
|
|
3373
|
+
]
|
|
3374
|
+
}
|
|
3375
|
+
);
|
|
3376
|
+
}
|
|
3377
|
+
);
|
|
3234
3378
|
function formatDuration3(durationMs) {
|
|
3235
3379
|
const totalSeconds = Math.max(0, Math.floor(durationMs / 1e3));
|
|
3236
3380
|
const hours = Math.floor(totalSeconds / 3600);
|
|
@@ -3704,11 +3848,16 @@ exports.AgentWorkbenchArtifactWorkspace = AgentWorkbenchArtifactWorkspace;
|
|
|
3704
3848
|
exports.AgentWorkbenchComposer = AgentWorkbenchComposer;
|
|
3705
3849
|
exports.AgentWorkbenchExploreCardMedia = AgentWorkbenchExploreCardMedia;
|
|
3706
3850
|
exports.AgentWorkbenchExploreSidebar = AgentWorkbenchExploreSidebar;
|
|
3851
|
+
exports.AgentWorkbenchMessage = AgentWorkbenchMessage;
|
|
3852
|
+
exports.AgentWorkbenchMessageAction = AgentWorkbenchMessageAction;
|
|
3853
|
+
exports.AgentWorkbenchMessageActions = AgentWorkbenchMessageActions;
|
|
3854
|
+
exports.AgentWorkbenchMessageContent = AgentWorkbenchMessageContent;
|
|
3707
3855
|
exports.AgentWorkbenchProcess = AgentWorkbenchProcess;
|
|
3708
3856
|
exports.AgentWorkbenchQuickStart = AgentWorkbenchQuickStart;
|
|
3709
3857
|
exports.AgentWorkbenchSidebar = AgentWorkbenchSidebar;
|
|
3710
3858
|
exports.AgentWorkbenchTaskDetails = AgentWorkbenchTaskDetails;
|
|
3711
3859
|
exports.AgentWorkbenchThread = AgentWorkbenchThread;
|
|
3860
|
+
exports.AgentWorkbenchThreadShell = AgentWorkbenchThreadShell;
|
|
3712
3861
|
exports.AgentWorkbenchTool = AgentWorkbenchTool;
|
|
3713
3862
|
exports.createAgentWorkbenchActivityModel = createAgentWorkbenchActivityModel;
|
|
3714
3863
|
exports.createAgentWorkbenchDetailsModel = createAgentWorkbenchDetailsModel;
|