@inf-monkeys-tech/monkeys-design 1.0.33 → 1.0.34
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 +50 -1
- package/dist/components/agent-workbench/index.d.ts +50 -1
- package/dist/components/agent-workbench/index.js +142 -1
- package/dist/components/agent-workbench/index.js.map +1 -1
- package/dist/components/agent-workbench/index.mjs +143 -3
- package/dist/components/agent-workbench/index.mjs.map +1 -1
- package/dist/components/base/index.js +5 -0
- package/dist/components/base/index.js.map +1 -1
- package/dist/components/base/index.mjs +5 -0
- package/dist/components/base/index.mjs.map +1 -1
- package/dist/components/data-explorer/index.js +5 -0
- package/dist/components/data-explorer/index.js.map +1 -1
- package/dist/components/data-explorer/index.mjs +5 -0
- package/dist/components/data-explorer/index.mjs.map +1 -1
- package/dist/components/layout/index.js +5 -0
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/layout/index.mjs +5 -0
- package/dist/components/layout/index.mjs.map +1 -1
- package/dist/components/runtime/index.js +5 -0
- package/dist/components/runtime/index.js.map +1 -1
- package/dist/components/runtime/index.mjs +5 -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 +5 -0
- package/dist/components/toast/index.js.map +1 -1
- package/dist/components/toast/index.mjs +5 -0
- package/dist/components/toast/index.mjs.map +1 -1
- package/dist/components/toolbar/index.js +5 -0
- package/dist/components/toolbar/index.js.map +1 -1
- package/dist/components/toolbar/index.mjs +5 -0
- package/dist/components/toolbar/index.mjs.map +1 -1
- package/dist/components/workbench/index.js +5 -0
- package/dist/components/workbench/index.js.map +1 -1
- package/dist/components/workbench/index.mjs +5 -0
- package/dist/components/workbench/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -2
- package/dist/index.mjs.map +1 -1
- package/dist/locale/index.d.mts +12 -2
- package/dist/locale/index.d.ts +12 -2
- package/dist/locale/index.js +14 -0
- package/dist/locale/index.js.map +1 -1
- package/dist/locale/index.mjs +14 -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 +14 -0
- package/dist/provider/index.js.map +1 -1
- package/dist/provider/index.mjs +14 -0
- package/dist/provider/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/{types-055c43c39002.d.mts → types-b8d18b1454c2.d.mts} +6 -0
- package/dist/{types-055c43c39002.d.ts → types-b8d18b1454c2.d.ts} +6 -0
- package/package.json +1 -1
|
@@ -62,6 +62,55 @@ interface AgentWorkbenchComposerProps {
|
|
|
62
62
|
onIntent?: (intent: AgentWorkbenchComposerIntent) => void;
|
|
63
63
|
}
|
|
64
64
|
declare function AgentWorkbenchComposer({ viewModel, modeSelectionEnabled, modeFilteringEnabled, className, classNames, onIntent, }: AgentWorkbenchComposerProps): react_jsx_runtime.JSX.Element;
|
|
65
|
+
type AgentWorkbenchQuickStartIcon = 'code' | 'file-text' | 'palette' | 'search' | 'shopping-bag' | 'sparkles';
|
|
66
|
+
interface AgentWorkbenchQuickStartTemplate {
|
|
67
|
+
id: string;
|
|
68
|
+
title: string;
|
|
69
|
+
description?: string;
|
|
70
|
+
prompt: string;
|
|
71
|
+
action?: 'prompt' | 'upload';
|
|
72
|
+
icon?: AgentWorkbenchQuickStartIcon;
|
|
73
|
+
coverImageUrl?: string;
|
|
74
|
+
accept?: string;
|
|
75
|
+
multiple?: boolean;
|
|
76
|
+
modes?: Array<'chat' | 'work'>;
|
|
77
|
+
}
|
|
78
|
+
interface AgentWorkbenchQuickStartSection {
|
|
79
|
+
id: string;
|
|
80
|
+
label: string;
|
|
81
|
+
templates: AgentWorkbenchQuickStartTemplate[];
|
|
82
|
+
}
|
|
83
|
+
interface AgentWorkbenchQuickStartCategory {
|
|
84
|
+
id: string;
|
|
85
|
+
label: string;
|
|
86
|
+
icon?: AgentWorkbenchQuickStartIcon;
|
|
87
|
+
sections: AgentWorkbenchQuickStartSection[];
|
|
88
|
+
}
|
|
89
|
+
interface AgentWorkbenchQuickStartViewModel {
|
|
90
|
+
contract: 'AgentWorkbenchQuickStartViewModel';
|
|
91
|
+
mode: 'chat' | 'work';
|
|
92
|
+
categories: AgentWorkbenchQuickStartCategory[];
|
|
93
|
+
disabled?: boolean;
|
|
94
|
+
}
|
|
95
|
+
type AgentWorkbenchQuickStartIntent = {
|
|
96
|
+
type: 'change-category';
|
|
97
|
+
categoryId?: string;
|
|
98
|
+
} | {
|
|
99
|
+
type: 'change-section';
|
|
100
|
+
categoryId: string;
|
|
101
|
+
sectionId: string;
|
|
102
|
+
} | {
|
|
103
|
+
type: 'select-template';
|
|
104
|
+
templateId: string;
|
|
105
|
+
prompt: string;
|
|
106
|
+
files?: File[];
|
|
107
|
+
};
|
|
108
|
+
interface AgentWorkbenchQuickStartProps {
|
|
109
|
+
viewModel: AgentWorkbenchQuickStartViewModel;
|
|
110
|
+
className?: string;
|
|
111
|
+
onIntent?: (intent: AgentWorkbenchQuickStartIntent) => void;
|
|
112
|
+
}
|
|
113
|
+
declare function AgentWorkbenchQuickStart({ viewModel, className, onIntent }: AgentWorkbenchQuickStartProps): null | react_jsx_runtime.JSX.Element;
|
|
65
114
|
type MessageEvent = Extract<AgentSessionEvent, {
|
|
66
115
|
eventType: 'message';
|
|
67
116
|
}>;
|
|
@@ -186,4 +235,4 @@ interface AgentWorkbenchArtifactWorkspaceProps {
|
|
|
186
235
|
onIntent?: (intent: AgentWorkbenchArtifactWorkspaceIntent) => void;
|
|
187
236
|
}
|
|
188
237
|
declare function AgentWorkbenchArtifactWorkspace({ artifacts, activeArtifactId, className, renderArtifact, onIntent, }: AgentWorkbenchArtifactWorkspaceProps): null | react_jsx_runtime.JSX.Element;
|
|
189
|
-
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, AgentWorkbenchThread, type AgentWorkbenchThreadClassNames, type AgentWorkbenchThreadMessage, type AgentWorkbenchThreadProps };
|
|
238
|
+
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 AgentWorkbenchQuickStartCategory, type AgentWorkbenchQuickStartIcon, type AgentWorkbenchQuickStartIntent, type AgentWorkbenchQuickStartProps, type AgentWorkbenchQuickStartSection, type AgentWorkbenchQuickStartTemplate, type AgentWorkbenchQuickStartViewModel, AgentWorkbenchThread, type AgentWorkbenchThreadClassNames, type AgentWorkbenchThreadMessage, type AgentWorkbenchThreadProps };
|
|
@@ -62,6 +62,55 @@ interface AgentWorkbenchComposerProps {
|
|
|
62
62
|
onIntent?: (intent: AgentWorkbenchComposerIntent) => void;
|
|
63
63
|
}
|
|
64
64
|
declare function AgentWorkbenchComposer({ viewModel, modeSelectionEnabled, modeFilteringEnabled, className, classNames, onIntent, }: AgentWorkbenchComposerProps): react_jsx_runtime.JSX.Element;
|
|
65
|
+
type AgentWorkbenchQuickStartIcon = 'code' | 'file-text' | 'palette' | 'search' | 'shopping-bag' | 'sparkles';
|
|
66
|
+
interface AgentWorkbenchQuickStartTemplate {
|
|
67
|
+
id: string;
|
|
68
|
+
title: string;
|
|
69
|
+
description?: string;
|
|
70
|
+
prompt: string;
|
|
71
|
+
action?: 'prompt' | 'upload';
|
|
72
|
+
icon?: AgentWorkbenchQuickStartIcon;
|
|
73
|
+
coverImageUrl?: string;
|
|
74
|
+
accept?: string;
|
|
75
|
+
multiple?: boolean;
|
|
76
|
+
modes?: Array<'chat' | 'work'>;
|
|
77
|
+
}
|
|
78
|
+
interface AgentWorkbenchQuickStartSection {
|
|
79
|
+
id: string;
|
|
80
|
+
label: string;
|
|
81
|
+
templates: AgentWorkbenchQuickStartTemplate[];
|
|
82
|
+
}
|
|
83
|
+
interface AgentWorkbenchQuickStartCategory {
|
|
84
|
+
id: string;
|
|
85
|
+
label: string;
|
|
86
|
+
icon?: AgentWorkbenchQuickStartIcon;
|
|
87
|
+
sections: AgentWorkbenchQuickStartSection[];
|
|
88
|
+
}
|
|
89
|
+
interface AgentWorkbenchQuickStartViewModel {
|
|
90
|
+
contract: 'AgentWorkbenchQuickStartViewModel';
|
|
91
|
+
mode: 'chat' | 'work';
|
|
92
|
+
categories: AgentWorkbenchQuickStartCategory[];
|
|
93
|
+
disabled?: boolean;
|
|
94
|
+
}
|
|
95
|
+
type AgentWorkbenchQuickStartIntent = {
|
|
96
|
+
type: 'change-category';
|
|
97
|
+
categoryId?: string;
|
|
98
|
+
} | {
|
|
99
|
+
type: 'change-section';
|
|
100
|
+
categoryId: string;
|
|
101
|
+
sectionId: string;
|
|
102
|
+
} | {
|
|
103
|
+
type: 'select-template';
|
|
104
|
+
templateId: string;
|
|
105
|
+
prompt: string;
|
|
106
|
+
files?: File[];
|
|
107
|
+
};
|
|
108
|
+
interface AgentWorkbenchQuickStartProps {
|
|
109
|
+
viewModel: AgentWorkbenchQuickStartViewModel;
|
|
110
|
+
className?: string;
|
|
111
|
+
onIntent?: (intent: AgentWorkbenchQuickStartIntent) => void;
|
|
112
|
+
}
|
|
113
|
+
declare function AgentWorkbenchQuickStart({ viewModel, className, onIntent }: AgentWorkbenchQuickStartProps): null | react_jsx_runtime.JSX.Element;
|
|
65
114
|
type MessageEvent = Extract<AgentSessionEvent, {
|
|
66
115
|
eventType: 'message';
|
|
67
116
|
}>;
|
|
@@ -186,4 +235,4 @@ interface AgentWorkbenchArtifactWorkspaceProps {
|
|
|
186
235
|
onIntent?: (intent: AgentWorkbenchArtifactWorkspaceIntent) => void;
|
|
187
236
|
}
|
|
188
237
|
declare function AgentWorkbenchArtifactWorkspace({ artifacts, activeArtifactId, className, renderArtifact, onIntent, }: AgentWorkbenchArtifactWorkspaceProps): null | react_jsx_runtime.JSX.Element;
|
|
189
|
-
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, AgentWorkbenchThread, type AgentWorkbenchThreadClassNames, type AgentWorkbenchThreadMessage, type AgentWorkbenchThreadProps };
|
|
238
|
+
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 AgentWorkbenchQuickStartCategory, type AgentWorkbenchQuickStartIcon, type AgentWorkbenchQuickStartIntent, type AgentWorkbenchQuickStartProps, type AgentWorkbenchQuickStartSection, type AgentWorkbenchQuickStartTemplate, type AgentWorkbenchQuickStartViewModel, AgentWorkbenchThread, type AgentWorkbenchThreadClassNames, type AgentWorkbenchThreadMessage, type AgentWorkbenchThreadProps };
|
|
@@ -176,6 +176,11 @@ var enUS = {
|
|
|
176
176
|
reasoningOptions: { low: "Low", medium: "Medium", high: "High", xhigh: "Extra high" },
|
|
177
177
|
permissionOptions: { "approval-required": "Approval required", "auto-approve": "Auto approve", "full-access": "Full access" }
|
|
178
178
|
},
|
|
179
|
+
quickStart: {
|
|
180
|
+
label: "Quick start",
|
|
181
|
+
back: "Back",
|
|
182
|
+
addFile: "Add file"
|
|
183
|
+
},
|
|
179
184
|
tool: {
|
|
180
185
|
input: "Input",
|
|
181
186
|
output: "Output",
|
|
@@ -961,6 +966,141 @@ function AgentWorkbenchComposer({
|
|
|
961
966
|
}
|
|
962
967
|
);
|
|
963
968
|
}
|
|
969
|
+
var ICONS = {
|
|
970
|
+
sparkles: lucideReact.Sparkles,
|
|
971
|
+
palette: lucideReact.Palette,
|
|
972
|
+
search: lucideReact.Search,
|
|
973
|
+
"file-text": lucideReact.FileText,
|
|
974
|
+
code: lucideReact.Code2,
|
|
975
|
+
"shopping-bag": lucideReact.ShoppingBag
|
|
976
|
+
};
|
|
977
|
+
function TemplateVisual({ template }) {
|
|
978
|
+
const Icon2 = ICONS[template.icon || "sparkles"];
|
|
979
|
+
if (template.coverImageUrl) {
|
|
980
|
+
return /* @__PURE__ */ jsxRuntime.jsx("img", { src: template.coverImageUrl, alt: "", className: "size-full object-cover transition-transform duration-200 group-hover:scale-105" });
|
|
981
|
+
}
|
|
982
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-full items-center justify-center bg-gradient-to-br from-primary/5 via-muted/50 to-primary/15", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-14 items-center justify-center rounded-2xl border border-primary/10 bg-background/85 text-primary shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "size-7", "aria-hidden": "true" }) }) });
|
|
983
|
+
}
|
|
984
|
+
function AgentWorkbenchQuickStart({ viewModel, className, onIntent }) {
|
|
985
|
+
const messages = useMonkeysLocaleMessages().agentWorkbench.quickStart;
|
|
986
|
+
const fileInputRef = React2.useRef(null);
|
|
987
|
+
const [activeCategoryId, setActiveCategoryId] = React2.useState();
|
|
988
|
+
const [activeSectionId, setActiveSectionId] = React2.useState();
|
|
989
|
+
const [pendingTemplate, setPendingTemplate] = React2.useState();
|
|
990
|
+
const categories = React2.useMemo(
|
|
991
|
+
() => viewModel.categories.map((category) => ({
|
|
992
|
+
...category,
|
|
993
|
+
sections: category.sections.map((section) => ({
|
|
994
|
+
...section,
|
|
995
|
+
templates: section.templates.filter((template) => !template.modes || template.modes.includes(viewModel.mode))
|
|
996
|
+
})).filter((section) => section.templates.length > 0)
|
|
997
|
+
})).filter((category) => category.sections.length > 0),
|
|
998
|
+
[viewModel.categories, viewModel.mode]
|
|
999
|
+
);
|
|
1000
|
+
const activeCategory = categories.find((category) => category.id === activeCategoryId);
|
|
1001
|
+
const activeSection = activeCategory?.sections.find((section) => section.id === activeSectionId) || activeCategory?.sections[0];
|
|
1002
|
+
React2.useEffect(() => {
|
|
1003
|
+
if (activeCategoryId && !categories.some((category) => category.id === activeCategoryId)) {
|
|
1004
|
+
setActiveCategoryId(void 0);
|
|
1005
|
+
setActiveSectionId(void 0);
|
|
1006
|
+
}
|
|
1007
|
+
}, [activeCategoryId, categories]);
|
|
1008
|
+
if (categories.length === 0) return null;
|
|
1009
|
+
const selectCategory = (category) => {
|
|
1010
|
+
setActiveCategoryId(category.id);
|
|
1011
|
+
setActiveSectionId(category.sections[0]?.id);
|
|
1012
|
+
onIntent?.({ type: "change-category", categoryId: category.id });
|
|
1013
|
+
};
|
|
1014
|
+
const selectSection = (sectionId) => {
|
|
1015
|
+
if (!activeCategory) return;
|
|
1016
|
+
setActiveSectionId(sectionId);
|
|
1017
|
+
onIntent?.({
|
|
1018
|
+
type: "change-section",
|
|
1019
|
+
categoryId: activeCategory.id,
|
|
1020
|
+
sectionId
|
|
1021
|
+
});
|
|
1022
|
+
};
|
|
1023
|
+
const selectTemplate = (template) => {
|
|
1024
|
+
if (viewModel.disabled) return;
|
|
1025
|
+
if (template.action !== "upload") {
|
|
1026
|
+
onIntent?.({
|
|
1027
|
+
type: "select-template",
|
|
1028
|
+
templateId: template.id,
|
|
1029
|
+
prompt: template.prompt
|
|
1030
|
+
});
|
|
1031
|
+
return;
|
|
1032
|
+
}
|
|
1033
|
+
const input = fileInputRef.current;
|
|
1034
|
+
if (!input) return;
|
|
1035
|
+
input.accept = template.accept || "*/*";
|
|
1036
|
+
input.multiple = template.multiple === true;
|
|
1037
|
+
setPendingTemplate(template);
|
|
1038
|
+
input.click();
|
|
1039
|
+
};
|
|
1040
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: cn2("agent-workbench-quick-start min-w-0 max-w-full", className), "aria-label": messages.label, children: [
|
|
1041
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1042
|
+
"input",
|
|
1043
|
+
{
|
|
1044
|
+
ref: fileInputRef,
|
|
1045
|
+
type: "file",
|
|
1046
|
+
className: "hidden",
|
|
1047
|
+
onChange: (event) => {
|
|
1048
|
+
const files = Array.from(event.target.files || []);
|
|
1049
|
+
if (pendingTemplate && files.length > 0) {
|
|
1050
|
+
onIntent?.({
|
|
1051
|
+
type: "select-template",
|
|
1052
|
+
templateId: pendingTemplate.id,
|
|
1053
|
+
prompt: pendingTemplate.prompt,
|
|
1054
|
+
files: pendingTemplate.multiple ? files : files.slice(0, 1)
|
|
1055
|
+
});
|
|
1056
|
+
}
|
|
1057
|
+
setPendingTemplate(void 0);
|
|
1058
|
+
event.target.value = "";
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
),
|
|
1062
|
+
!activeCategory ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex max-w-full items-center justify-center gap-2 overflow-x-auto px-1 pb-1", children: categories.map((category) => {
|
|
1063
|
+
const Icon2 = ICONS[category.icon || "sparkles"];
|
|
1064
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "inline-flex h-10 shrink-0 items-center gap-2 rounded-full border border-border bg-background px-4 text-sm font-medium text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", onClick: () => selectCategory(category), children: [
|
|
1065
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "size-4 text-muted-foreground", "aria-hidden": "true" }),
|
|
1066
|
+
category.label
|
|
1067
|
+
] }, category.id);
|
|
1068
|
+
}) }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
1069
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 max-w-full items-center gap-1 overflow-x-auto pb-1", children: [
|
|
1070
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1071
|
+
"button",
|
|
1072
|
+
{
|
|
1073
|
+
type: "button",
|
|
1074
|
+
className: "inline-flex h-9 shrink-0 items-center gap-1.5 rounded-full px-3 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
1075
|
+
onClick: () => {
|
|
1076
|
+
setActiveCategoryId(void 0);
|
|
1077
|
+
setActiveSectionId(void 0);
|
|
1078
|
+
onIntent?.({ type: "change-category" });
|
|
1079
|
+
},
|
|
1080
|
+
children: [
|
|
1081
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowLeft, { className: "size-4", "aria-hidden": "true" }),
|
|
1082
|
+
messages.back
|
|
1083
|
+
]
|
|
1084
|
+
}
|
|
1085
|
+
),
|
|
1086
|
+
activeCategory.sections.map((section) => /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", "aria-pressed": activeSection?.id === section.id, className: cn2("h-9 shrink-0 rounded-full px-4 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", activeSection?.id === section.id ? "bg-muted text-foreground" : "text-muted-foreground hover:bg-muted/70 hover:text-foreground"), onClick: () => selectSection(section.id), children: section.label }, section.id))
|
|
1087
|
+
] }),
|
|
1088
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-[repeat(auto-fit,minmax(min(100%,14rem),1fr))] gap-3", children: activeSection?.templates.map((template) => /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", disabled: viewModel.disabled, "data-quick-start-template-id": template.id, className: "group min-w-0 overflow-hidden rounded-xl border border-border bg-background text-left transition-colors hover:border-primary/30 hover:bg-muted/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", onClick: () => selectTemplate(template), children: [
|
|
1089
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "block px-4 pb-3 pt-4", children: [
|
|
1090
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2 text-sm font-semibold text-foreground", children: [
|
|
1091
|
+
template.title,
|
|
1092
|
+
template.action === "upload" ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ml-auto inline-flex items-center gap-1 text-[11px] font-medium text-muted-foreground", children: [
|
|
1093
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Upload, { className: "size-3", "aria-hidden": "true" }),
|
|
1094
|
+
messages.addFile
|
|
1095
|
+
] }) : null
|
|
1096
|
+
] }),
|
|
1097
|
+
template.description ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1 line-clamp-2 block min-h-8 text-xs leading-4 text-muted-foreground", children: template.description }) : null
|
|
1098
|
+
] }),
|
|
1099
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "block h-28 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(TemplateVisual, { template }) })
|
|
1100
|
+
] }, template.id)) })
|
|
1101
|
+
] })
|
|
1102
|
+
] });
|
|
1103
|
+
}
|
|
964
1104
|
function ItemAvatar({ item }) {
|
|
965
1105
|
const [failed, setFailed] = React2.useState(false);
|
|
966
1106
|
if (item.iconUrl && !failed) {
|
|
@@ -1256,7 +1396,7 @@ function AgentWorkbenchSidebar({
|
|
|
1256
1396
|
!sessionsOnly ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 px-3 text-xs font-medium text-muted-foreground", children: messages.recentSessions }) : null,
|
|
1257
1397
|
/* @__PURE__ */ jsxRuntime.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" }) }),
|
|
1258
1398
|
sessionsOnly && sessions.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2", children: [
|
|
1259
|
-
{ id: "chatbot", label: messages.chats, icon: lucideReact.
|
|
1399
|
+
{ id: "chatbot", label: messages.chats, icon: lucideReact.MessageSquare, items: chatbotSessions },
|
|
1260
1400
|
{ id: "agent", label: messages.agents, icon: lucideReact.Bot, items: agentSessions }
|
|
1261
1401
|
].map(({ id, label, icon: Icon2, items }) => /* @__PURE__ */ jsxRuntime.jsxs("details", { open: true, "aria-label": label, children: [
|
|
1262
1402
|
/* @__PURE__ */ jsxRuntime.jsxs("summary", { className: "flex h-9 cursor-pointer list-none items-center gap-2 rounded-md px-3 text-sm font-semibold hover:bg-muted", children: [
|
|
@@ -2926,6 +3066,7 @@ exports.AgentWorkbenchArtifactSummary = AgentWorkbenchArtifactSummary;
|
|
|
2926
3066
|
exports.AgentWorkbenchArtifactWorkspace = AgentWorkbenchArtifactWorkspace;
|
|
2927
3067
|
exports.AgentWorkbenchComposer = AgentWorkbenchComposer;
|
|
2928
3068
|
exports.AgentWorkbenchProcess = AgentWorkbenchProcess;
|
|
3069
|
+
exports.AgentWorkbenchQuickStart = AgentWorkbenchQuickStart;
|
|
2929
3070
|
exports.AgentWorkbenchSidebar = AgentWorkbenchSidebar;
|
|
2930
3071
|
exports.AgentWorkbenchTaskDetails = AgentWorkbenchTaskDetails;
|
|
2931
3072
|
exports.AgentWorkbenchThread = AgentWorkbenchThread;
|