@inf-monkeys-tech/monkeys-design 1.0.14 → 1.0.15
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 +41 -168
- package/dist/components/agent-workbench/index.d.ts +41 -168
- package/dist/components/agent-workbench/index.js +335 -4
- package/dist/components/agent-workbench/index.js.map +1 -1
- package/dist/components/agent-workbench/index.mjs +336 -6
- package/dist/components/agent-workbench/index.mjs.map +1 -1
- package/dist/components/base/index.js +32 -1
- package/dist/components/base/index.js.map +1 -1
- package/dist/components/base/index.mjs +32 -1
- package/dist/components/base/index.mjs.map +1 -1
- package/dist/components/data-explorer/index.js +32 -1
- package/dist/components/data-explorer/index.js.map +1 -1
- package/dist/components/data-explorer/index.mjs +32 -1
- package/dist/components/data-explorer/index.mjs.map +1 -1
- package/dist/components/layout/index.js +32 -1
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/layout/index.mjs +32 -1
- package/dist/components/layout/index.mjs.map +1 -1
- package/dist/components/runtime/index.js +32 -1
- package/dist/components/runtime/index.js.map +1 -1
- package/dist/components/runtime/index.mjs +32 -1
- 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 -1
- package/dist/components/toast/index.js.map +1 -1
- package/dist/components/toast/index.mjs +32 -1
- package/dist/components/toast/index.mjs.map +1 -1
- package/dist/components/toolbar/index.js +32 -1
- package/dist/components/toolbar/index.js.map +1 -1
- package/dist/components/toolbar/index.mjs +32 -1
- package/dist/components/toolbar/index.mjs.map +1 -1
- package/dist/components/workbench/index.js +32 -1
- package/dist/components/workbench/index.js.map +1 -1
- package/dist/components/workbench/index.mjs +32 -1
- package/dist/components/workbench/index.mjs.map +1 -1
- package/dist/details-model-f2034b78b458.d.mts +199 -0
- package/dist/details-model-f2034b78b458.d.ts +199 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +142 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +142 -5
- package/dist/index.mjs.map +1 -1
- package/dist/locale/index.d.mts +88 -2
- package/dist/locale/index.d.ts +88 -2
- package/dist/locale/index.js +72 -2
- package/dist/locale/index.js.map +1 -1
- package/dist/locale/index.mjs +72 -2
- 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 +72 -2
- package/dist/provider/index.js.map +1 -1
- package/dist/provider/index.mjs +72 -2
- package/dist/provider/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/{types-37967a434f7c.d.mts → types-a81dc2d284e3.d.mts} +37 -0
- package/dist/{types-37967a434f7c.d.ts → types-a81dc2d284e3.d.ts} +37 -0
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,6 @@ import { resolveThemeTokens, buildApplicationHandoffUrl } from '@inf-monkeys-tec
|
|
|
3
3
|
import * as React2 from 'react';
|
|
4
4
|
import React2__default, { forwardRef, useId, useState, useRef, useEffect, createElement, createContext, useCallback, useMemo, useContext, Children, isValidElement, Fragment as Fragment$1, useLayoutEffect } from 'react';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
|
-
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';
|
|
7
6
|
import * as DropdownMenu2 from '@radix-ui/react-dropdown-menu';
|
|
8
7
|
import { twMerge } from 'tailwind-merge';
|
|
9
8
|
import * as ContextMenu from '@radix-ui/react-context-menu';
|
|
@@ -18,6 +17,7 @@ import { Slot } from '@radix-ui/react-slot';
|
|
|
18
17
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
19
18
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
20
19
|
import { cva } from 'class-variance-authority';
|
|
20
|
+
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, GitFork, PencilLine, Copy, RotateCcw, FileCode2, Files, TestTube2 } from 'lucide-react';
|
|
21
21
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
22
22
|
import { useSensors, useSensor, PointerSensor, DndContext, DragOverlay, useDroppable, useDraggable } from '@dnd-kit/core';
|
|
23
23
|
import { toast as toast$1, Toaster } from 'sonner';
|
|
@@ -3053,6 +3053,30 @@ var enUS = {
|
|
|
3053
3053
|
reasoning: "Reasoning",
|
|
3054
3054
|
plan: "Plan",
|
|
3055
3055
|
taskNoDetail: "No additional details",
|
|
3056
|
+
modes: { chatbot: "Chatbot", agent: "Agent" },
|
|
3057
|
+
composer: {
|
|
3058
|
+
send: "Send message",
|
|
3059
|
+
stop: "Stop generating",
|
|
3060
|
+
queue: "Queue message",
|
|
3061
|
+
attach: "Add photos or files",
|
|
3062
|
+
voice: "Start voice input",
|
|
3063
|
+
webSearch: "Web search",
|
|
3064
|
+
model: "Model",
|
|
3065
|
+
reasoning: "Reasoning effort",
|
|
3066
|
+
permissions: "Permissions",
|
|
3067
|
+
removeAttachment: "Remove attachment",
|
|
3068
|
+
editQueued: "Edit queued message",
|
|
3069
|
+
deleteQueued: "Delete queued message",
|
|
3070
|
+
moveUp: "Move message up",
|
|
3071
|
+
moveDown: "Move message down",
|
|
3072
|
+
queued: "Queued messages",
|
|
3073
|
+
uploading: "Uploading",
|
|
3074
|
+
noModels: "No models available",
|
|
3075
|
+
message: "Message",
|
|
3076
|
+
attachmentOnly: "Attachment",
|
|
3077
|
+
reasoningOptions: { low: "Low", medium: "Medium", high: "High", xhigh: "Extra high" },
|
|
3078
|
+
permissionOptions: { "approval-required": "Approval required", "auto-approve": "Auto approve", "full-access": "Full access" }
|
|
3079
|
+
},
|
|
3056
3080
|
tool: {
|
|
3057
3081
|
input: "Input",
|
|
3058
3082
|
output: "Output",
|
|
@@ -3121,6 +3145,10 @@ var enUS = {
|
|
|
3121
3145
|
description: "Summary and workspace activity",
|
|
3122
3146
|
duration: "Duration",
|
|
3123
3147
|
updated: "Updated",
|
|
3148
|
+
model: "Model",
|
|
3149
|
+
mode: "Mode",
|
|
3150
|
+
permissions: "Permissions",
|
|
3151
|
+
tokenUsage: "Token usage",
|
|
3124
3152
|
summary: "Summary",
|
|
3125
3153
|
summaryEmpty: "No summary is available yet.",
|
|
3126
3154
|
summaryFailed: "The summary could not be generated.",
|
|
@@ -3150,7 +3178,10 @@ var enUS = {
|
|
|
3150
3178
|
copySummary: "Copy summary",
|
|
3151
3179
|
retry: "Retry",
|
|
3152
3180
|
retrySummary: "Retry summary",
|
|
3153
|
-
resume: "Resume"
|
|
3181
|
+
resume: "Resume",
|
|
3182
|
+
continueInNewTask: "Continue in new task",
|
|
3183
|
+
editAndRerun: "Edit and rerun",
|
|
3184
|
+
export: "Export"
|
|
3154
3185
|
},
|
|
3155
3186
|
workspace: {
|
|
3156
3187
|
diffs: "Code changes",
|
|
@@ -3266,6 +3297,30 @@ var zhCN = {
|
|
|
3266
3297
|
reasoning: "\u601D\u8003\u8FC7\u7A0B",
|
|
3267
3298
|
plan: "\u6267\u884C\u8BA1\u5212",
|
|
3268
3299
|
taskNoDetail: "\u6682\u65E0\u66F4\u591A\u8BE6\u60C5",
|
|
3300
|
+
modes: { chatbot: "\u5BF9\u8BDD", agent: "\u667A\u80FD\u4F53" },
|
|
3301
|
+
composer: {
|
|
3302
|
+
send: "\u53D1\u9001\u6D88\u606F",
|
|
3303
|
+
stop: "\u505C\u6B62\u751F\u6210",
|
|
3304
|
+
queue: "\u6392\u961F\u53D1\u9001",
|
|
3305
|
+
attach: "\u6DFB\u52A0\u7167\u7247\u6216\u6587\u4EF6",
|
|
3306
|
+
voice: "\u5F00\u59CB\u8BED\u97F3\u8F93\u5165",
|
|
3307
|
+
webSearch: "\u8054\u7F51\u641C\u7D22",
|
|
3308
|
+
model: "\u6A21\u578B",
|
|
3309
|
+
reasoning: "\u601D\u8003\u5F3A\u5EA6",
|
|
3310
|
+
permissions: "\u6743\u9650",
|
|
3311
|
+
removeAttachment: "\u79FB\u9664\u9644\u4EF6",
|
|
3312
|
+
editQueued: "\u7F16\u8F91\u6392\u961F\u6D88\u606F",
|
|
3313
|
+
deleteQueued: "\u5220\u9664\u6392\u961F\u6D88\u606F",
|
|
3314
|
+
moveUp: "\u4E0A\u79FB\u6D88\u606F",
|
|
3315
|
+
moveDown: "\u4E0B\u79FB\u6D88\u606F",
|
|
3316
|
+
queued: "\u6392\u961F\u6D88\u606F",
|
|
3317
|
+
uploading: "\u4E0A\u4F20\u4E2D",
|
|
3318
|
+
noModels: "\u6682\u65E0\u53EF\u7528\u6A21\u578B",
|
|
3319
|
+
message: "\u6D88\u606F",
|
|
3320
|
+
attachmentOnly: "\u9644\u4EF6",
|
|
3321
|
+
reasoningOptions: { low: "\u4F4E", medium: "\u4E2D", high: "\u9AD8", xhigh: "\u6700\u9AD8" },
|
|
3322
|
+
permissionOptions: { "approval-required": "\u9700\u8981\u6279\u51C6", "auto-approve": "\u81EA\u52A8\u6279\u51C6", "full-access": "\u5B8C\u5168\u8BBF\u95EE" }
|
|
3323
|
+
},
|
|
3269
3324
|
tool: {
|
|
3270
3325
|
input: "\u8F93\u5165",
|
|
3271
3326
|
output: "\u8F93\u51FA",
|
|
@@ -3334,6 +3389,10 @@ var zhCN = {
|
|
|
3334
3389
|
description: "\u6458\u8981\u4E0E\u5DE5\u4F5C\u533A\u6D3B\u52A8",
|
|
3335
3390
|
duration: "\u8017\u65F6",
|
|
3336
3391
|
updated: "\u66F4\u65B0\u65F6\u95F4",
|
|
3392
|
+
model: "\u6A21\u578B",
|
|
3393
|
+
mode: "\u6A21\u5F0F",
|
|
3394
|
+
permissions: "\u6743\u9650",
|
|
3395
|
+
tokenUsage: "Token \u7528\u91CF",
|
|
3337
3396
|
summary: "\u6458\u8981",
|
|
3338
3397
|
summaryEmpty: "\u6682\u65F6\u6CA1\u6709\u53EF\u7528\u6458\u8981\u3002",
|
|
3339
3398
|
summaryFailed: "\u6458\u8981\u751F\u6210\u5931\u8D25\u3002",
|
|
@@ -3363,7 +3422,10 @@ var zhCN = {
|
|
|
3363
3422
|
copySummary: "\u590D\u5236\u6458\u8981",
|
|
3364
3423
|
retry: "\u91CD\u8BD5",
|
|
3365
3424
|
retrySummary: "\u91CD\u65B0\u751F\u6210\u6458\u8981",
|
|
3366
|
-
resume: "\u7EE7\u7EED\u8FD0\u884C"
|
|
3425
|
+
resume: "\u7EE7\u7EED\u8FD0\u884C",
|
|
3426
|
+
continueInNewTask: "\u5728\u65B0\u4EFB\u52A1\u4E2D\u7EE7\u7EED",
|
|
3427
|
+
editAndRerun: "\u7F16\u8F91\u5E76\u91CD\u65B0\u8FD0\u884C",
|
|
3428
|
+
export: "\u5BFC\u51FA"
|
|
3367
3429
|
},
|
|
3368
3430
|
workspace: {
|
|
3369
3431
|
diffs: "\u4EE3\u7801\u53D8\u66F4",
|
|
@@ -3491,6 +3553,14 @@ function mergeMonkeysLocaleMessages(base, override) {
|
|
|
3491
3553
|
agentWorkbench: {
|
|
3492
3554
|
...base.agentWorkbench,
|
|
3493
3555
|
...override.agentWorkbench,
|
|
3556
|
+
modes: {
|
|
3557
|
+
...base.agentWorkbench.modes,
|
|
3558
|
+
...override.agentWorkbench?.modes
|
|
3559
|
+
},
|
|
3560
|
+
composer: {
|
|
3561
|
+
...base.agentWorkbench.composer,
|
|
3562
|
+
...override.agentWorkbench?.composer
|
|
3563
|
+
},
|
|
3494
3564
|
tool: {
|
|
3495
3565
|
...base.agentWorkbench.tool,
|
|
3496
3566
|
...override.agentWorkbench?.tool,
|
|
@@ -18124,14 +18194,20 @@ function createAgentWorkbenchDetailsModel(viewModel) {
|
|
|
18124
18194
|
);
|
|
18125
18195
|
return {
|
|
18126
18196
|
mode: viewModel.snapshot.mode,
|
|
18197
|
+
modelId: viewModel.snapshot.modelId,
|
|
18198
|
+
permissionProfile: viewModel.snapshot.permissionProfile,
|
|
18127
18199
|
status: viewModel.status,
|
|
18128
18200
|
sessionId: viewModel.sessionId,
|
|
18201
|
+
capabilities,
|
|
18129
18202
|
resumable: capabilities.resume === true && viewModel.resumable,
|
|
18130
18203
|
summary,
|
|
18131
18204
|
error: [...viewModel.events].reverse().find(
|
|
18132
18205
|
(event) => event.eventType === "error"
|
|
18133
18206
|
),
|
|
18134
18207
|
run,
|
|
18208
|
+
usage: capabilities.usage ? [...viewModel.events].reverse().find(
|
|
18209
|
+
(event) => event.eventType === "usage"
|
|
18210
|
+
) : void 0,
|
|
18135
18211
|
workspace: {
|
|
18136
18212
|
diffs: latestBy2(workspaceEvents, "diff", (event) => event.payload.path),
|
|
18137
18213
|
files: latestBy2(
|
|
@@ -18242,13 +18318,17 @@ function SummaryPanel({
|
|
|
18242
18318
|
model,
|
|
18243
18319
|
onIntent
|
|
18244
18320
|
}) {
|
|
18245
|
-
const
|
|
18321
|
+
const workbenchMessages = useMonkeysLocaleMessages().agentWorkbench;
|
|
18322
|
+
const messages = workbenchMessages.details;
|
|
18246
18323
|
const locale = useMonkeysLocale().locale;
|
|
18247
18324
|
const summary = model.summary;
|
|
18248
18325
|
const run = model.run?.payload;
|
|
18249
18326
|
const error = model.error;
|
|
18250
18327
|
const retryable = model.status === "failed" && error?.payload.retryable;
|
|
18251
18328
|
const canResume = model.resumable && ["stopped", "completed", "failed"].includes(model.status);
|
|
18329
|
+
const canContinueInNewTask = model.capabilities.threadForking;
|
|
18330
|
+
const canEditAndRerun = model.capabilities.editAndRerun;
|
|
18331
|
+
const tokenUsage = model.usage?.payload.totalTokens ?? (model.usage?.payload.inputTokens !== void 0 || model.usage?.payload.outputTokens !== void 0 ? (model.usage.payload.inputTokens ?? 0) + (model.usage.payload.outputTokens ?? 0) : void 0);
|
|
18252
18332
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
18253
18333
|
/* @__PURE__ */ jsxs("section", { className: "rounded-lg border border-border bg-muted/40 p-3", children: [
|
|
18254
18334
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -18266,7 +18346,23 @@ function SummaryPanel({
|
|
|
18266
18346
|
run?.stoppedAt ?? run?.completedAt ?? run?.failedAt,
|
|
18267
18347
|
locale
|
|
18268
18348
|
) })
|
|
18269
|
-
] })
|
|
18349
|
+
] }),
|
|
18350
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
18351
|
+
/* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: messages.model }),
|
|
18352
|
+
/* @__PURE__ */ jsx("dd", { className: "mt-0.5 truncate font-medium", children: model.modelId })
|
|
18353
|
+
] }),
|
|
18354
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
18355
|
+
/* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: messages.mode }),
|
|
18356
|
+
/* @__PURE__ */ jsx("dd", { className: "mt-0.5 font-medium", children: workbenchMessages.modes[model.mode] })
|
|
18357
|
+
] }),
|
|
18358
|
+
model.permissionProfile ? /* @__PURE__ */ jsxs("div", { children: [
|
|
18359
|
+
/* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: messages.permissions }),
|
|
18360
|
+
/* @__PURE__ */ jsx("dd", { className: "mt-0.5 font-medium", children: workbenchMessages.composer.permissionOptions[model.permissionProfile] })
|
|
18361
|
+
] }) : null,
|
|
18362
|
+
tokenUsage !== void 0 ? /* @__PURE__ */ jsxs("div", { children: [
|
|
18363
|
+
/* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: messages.tokenUsage }),
|
|
18364
|
+
/* @__PURE__ */ jsx("dd", { className: "mt-0.5 font-medium", children: new Intl.NumberFormat(locale).format(tokenUsage) })
|
|
18365
|
+
] }) : null
|
|
18270
18366
|
] }),
|
|
18271
18367
|
error ? /* @__PURE__ */ jsx("div", { className: "mt-3 rounded-md border border-destructive/30 bg-destructive/5 p-2.5 text-sm text-destructive-text", role: "alert", children: error.payload.message }) : null,
|
|
18272
18368
|
retryable || canResume ? /* @__PURE__ */ jsxs("div", { className: "mt-3 flex flex-wrap gap-2", children: [
|
|
@@ -18292,6 +18388,47 @@ function SummaryPanel({
|
|
|
18292
18388
|
) : null
|
|
18293
18389
|
] }) : null
|
|
18294
18390
|
] }),
|
|
18391
|
+
/* @__PURE__ */ jsxs("section", { className: "flex flex-wrap gap-2 rounded-lg border border-border bg-card p-3 text-card-foreground", children: [
|
|
18392
|
+
canContinueInNewTask ? /* @__PURE__ */ jsxs(
|
|
18393
|
+
"button",
|
|
18394
|
+
{
|
|
18395
|
+
type: "button",
|
|
18396
|
+
className: "inline-flex items-center gap-1.5 rounded-md border border-border bg-background px-2.5 py-1.5 text-xs font-medium outline-none hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring",
|
|
18397
|
+
disabled: !onIntent,
|
|
18398
|
+
onClick: () => onIntent?.({ type: "continue-in-new-task", sessionId: model.sessionId }),
|
|
18399
|
+
children: [
|
|
18400
|
+
/* @__PURE__ */ jsx(GitFork, { className: "size-3.5", "aria-hidden": "true" }),
|
|
18401
|
+
messages.actions.continueInNewTask
|
|
18402
|
+
]
|
|
18403
|
+
}
|
|
18404
|
+
) : null,
|
|
18405
|
+
canEditAndRerun ? /* @__PURE__ */ jsxs(
|
|
18406
|
+
"button",
|
|
18407
|
+
{
|
|
18408
|
+
type: "button",
|
|
18409
|
+
className: "inline-flex items-center gap-1.5 rounded-md border border-border bg-background px-2.5 py-1.5 text-xs font-medium outline-none hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring",
|
|
18410
|
+
disabled: !onIntent,
|
|
18411
|
+
onClick: () => onIntent?.({ type: "edit-and-rerun", sessionId: model.sessionId }),
|
|
18412
|
+
children: [
|
|
18413
|
+
/* @__PURE__ */ jsx(PencilLine, { className: "size-3.5", "aria-hidden": "true" }),
|
|
18414
|
+
messages.actions.editAndRerun
|
|
18415
|
+
]
|
|
18416
|
+
}
|
|
18417
|
+
) : null,
|
|
18418
|
+
/* @__PURE__ */ jsxs(
|
|
18419
|
+
"button",
|
|
18420
|
+
{
|
|
18421
|
+
type: "button",
|
|
18422
|
+
className: "inline-flex items-center gap-1.5 rounded-md border border-border bg-background px-2.5 py-1.5 text-xs font-medium outline-none hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring",
|
|
18423
|
+
disabled: !onIntent,
|
|
18424
|
+
onClick: () => onIntent?.({ type: "export", sessionId: model.sessionId }),
|
|
18425
|
+
children: [
|
|
18426
|
+
/* @__PURE__ */ jsx(Download, { className: "size-3.5", "aria-hidden": "true" }),
|
|
18427
|
+
messages.actions.export
|
|
18428
|
+
]
|
|
18429
|
+
}
|
|
18430
|
+
)
|
|
18431
|
+
] }),
|
|
18295
18432
|
/* @__PURE__ */ jsxs("section", { className: "rounded-lg border border-border bg-card p-3 text-card-foreground", children: [
|
|
18296
18433
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
18297
18434
|
/* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold", children: messages.summary }),
|