@tutti-os/agent-gui 0.0.47 → 0.0.49
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/agent-conversation/index.d.ts +4 -4
- package/dist/agent-conversation/index.js +6 -6
- package/dist/agent-message-center/index.d.ts +2 -2
- package/dist/agent-message-center/index.js +35 -13
- package/dist/agent-message-center/index.js.map +1 -1
- package/dist/{agentConversationVM-BTMtRteS.d.ts → agentConversationVM-DSXrFL9v.d.ts} +5 -1
- package/dist/{agentGuiNodeTypes-B5Y6yDKy.d.ts → agentGuiNodeTypes-Bp1G8pOj.d.ts} +4 -4
- package/dist/app/renderer/agentactivity.css +102 -93
- package/dist/{chunk-7NCWSH7U.js → chunk-5HJWT6YN.js} +5 -5
- package/dist/{chunk-2FOBSURO.js → chunk-6KQHNUR5.js} +2 -2
- package/dist/{chunk-5QTC2L52.js → chunk-77UR4G7P.js} +2 -2
- package/dist/{chunk-HCS3HUUX.js → chunk-A2EN24OI.js} +37 -7
- package/dist/chunk-A2EN24OI.js.map +1 -0
- package/dist/{chunk-2RYZ4EBF.js → chunk-AKK7UOAS.js} +2 -2
- package/dist/{chunk-Q4X6Q4E6.js → chunk-AYEYXKLF.js} +2 -2
- package/dist/{chunk-J3SJZMI5.js → chunk-FSRS2JFR.js} +2 -2
- package/dist/{chunk-KACBTC7Y.js → chunk-K6SRLYC3.js} +17 -3
- package/dist/chunk-K6SRLYC3.js.map +1 -0
- package/dist/{chunk-MCH35MAX.js → chunk-Q3MOU4CD.js} +10 -6
- package/dist/chunk-Q3MOU4CD.js.map +1 -0
- package/dist/{chunk-R6GOICRO.js → chunk-QGBIGRZA.js} +56 -9
- package/dist/chunk-QGBIGRZA.js.map +1 -0
- package/dist/{chunk-XJXSR5XI.js → chunk-RJR2OZ6T.js} +125 -34
- package/dist/chunk-RJR2OZ6T.js.map +1 -0
- package/dist/{chunk-SD56WDSC.js → chunk-TG3ZXLPM.js} +42 -1
- package/dist/chunk-TG3ZXLPM.js.map +1 -0
- package/dist/{chunk-KUCWRSXU.js → chunk-TTDBLIQ3.js} +2 -2
- package/dist/{chunk-VE6JY2TH.js → chunk-U6JWW45G.js} +1 -1
- package/dist/chunk-U6JWW45G.js.map +1 -0
- package/dist/{chunk-ZAF4IVUT.js → chunk-XRJZCEOX.js} +462 -366
- package/dist/chunk-XRJZCEOX.js.map +1 -0
- package/dist/context-mention-palette/index.js +7 -7
- package/dist/i18n/index.d.ts +16 -2
- package/dist/i18n/index.js +2 -2
- package/dist/index.d.ts +290 -8
- package/dist/index.js +578 -830
- package/dist/index.js.map +1 -1
- package/dist/plan-decision-ops.d.ts +2 -2
- package/dist/queued-prompt-runtime.d.ts +4 -3
- package/dist/queued-prompt-runtime.js +1 -1
- package/dist/workbench/contribution.js +2 -2
- package/dist/workbench/index.js +5 -5
- package/dist/workbench/launch.d.ts +22 -1
- package/dist/workbench/launch.js +13 -3
- package/dist/workbench/sessionTitle.js +3 -3
- package/dist/workspace-agent-generated-files.d.ts +1 -1
- package/dist/workspace-agent-generated-files.js +3 -3
- package/dist/{workspaceAgentActivityListViewModel-DLnMBMoh.d.ts → workspaceAgentActivityListViewModel-B5viw5Da.d.ts} +1 -1
- package/package.json +12 -12
- package/dist/chunk-HCS3HUUX.js.map +0 -1
- package/dist/chunk-KACBTC7Y.js.map +0 -1
- package/dist/chunk-MCH35MAX.js.map +0 -1
- package/dist/chunk-R6GOICRO.js.map +0 -1
- package/dist/chunk-SD56WDSC.js.map +0 -1
- package/dist/chunk-VE6JY2TH.js.map +0 -1
- package/dist/chunk-XJXSR5XI.js.map +0 -1
- package/dist/chunk-ZAF4IVUT.js.map +0 -1
- /package/dist/{chunk-7NCWSH7U.js.map → chunk-5HJWT6YN.js.map} +0 -0
- /package/dist/{chunk-2FOBSURO.js.map → chunk-6KQHNUR5.js.map} +0 -0
- /package/dist/{chunk-5QTC2L52.js.map → chunk-77UR4G7P.js.map} +0 -0
- /package/dist/{chunk-2RYZ4EBF.js.map → chunk-AKK7UOAS.js.map} +0 -0
- /package/dist/{chunk-Q4X6Q4E6.js.map → chunk-AYEYXKLF.js.map} +0 -0
- /package/dist/{chunk-J3SJZMI5.js.map → chunk-FSRS2JFR.js.map} +0 -0
- /package/dist/{chunk-KUCWRSXU.js.map → chunk-TTDBLIQ3.js.map} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getOptionalAgentHostApi,
|
|
3
3
|
useOptionalAgentHostApi
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-U6JWW45G.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveAgentWorkspaceFileVisualKind
|
|
7
7
|
} from "./chunk-PJP5BUU6.js";
|
|
8
8
|
import {
|
|
9
9
|
translate,
|
|
10
10
|
useTranslation
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-77UR4G7P.js";
|
|
12
12
|
|
|
13
13
|
// shared/agentMcpToolTarget.ts
|
|
14
14
|
function extractAgentMcpToolTarget({
|
|
@@ -144,28 +144,86 @@ function objectValue(value) {
|
|
|
144
144
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
+
// shared/agentConversation/exitPlanOptions.ts
|
|
148
|
+
var EXIT_PLAN_KEEP_PLANNING_OPTION_ID = "plan";
|
|
149
|
+
function isExitPlanSwitchModeInput(input) {
|
|
150
|
+
const record = recordValue(input);
|
|
151
|
+
const toolCall = recordValue(record.toolCall);
|
|
152
|
+
if (normalizeToken(stringValue2(toolCall.kind)) !== "switchmode") {
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
return collectRawOptions(record).some(
|
|
156
|
+
(option) => normalizeToken(rawOptionId(option)) === EXIT_PLAN_KEEP_PLANNING_OPTION_ID
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
function extractExitPlanModeOptions(input, payload) {
|
|
160
|
+
const sources = payload === void 0 ? [recordValue(input)] : [recordValue(input), recordValue(payload)];
|
|
161
|
+
return sources.flatMap(collectRawOptions).flatMap((option) => {
|
|
162
|
+
const id = rawOptionId(option);
|
|
163
|
+
if (!id || normalizeToken(id) === EXIT_PLAN_KEEP_PLANNING_OPTION_ID) {
|
|
164
|
+
return [];
|
|
165
|
+
}
|
|
166
|
+
return [
|
|
167
|
+
{
|
|
168
|
+
id,
|
|
169
|
+
label: stringValue2(option.name) ?? stringValue2(option.label) ?? stringValue2(option.title) ?? stringValue2(option.kind) ?? id,
|
|
170
|
+
kind: stringValue2(option.kind) ?? id,
|
|
171
|
+
...stringValue2(option.description) ? { description: stringValue2(option.description) } : {}
|
|
172
|
+
}
|
|
173
|
+
];
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
function extractExitPlanKeepPlanningOptionId(input, payload) {
|
|
177
|
+
const sources = payload === void 0 ? [recordValue(input)] : [recordValue(input), recordValue(payload)];
|
|
178
|
+
for (const option of sources.flatMap(collectRawOptions)) {
|
|
179
|
+
const id = rawOptionId(option);
|
|
180
|
+
if (id && normalizeToken(id) === EXIT_PLAN_KEEP_PLANNING_OPTION_ID) {
|
|
181
|
+
return id;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return null;
|
|
185
|
+
}
|
|
186
|
+
function collectRawOptions(record) {
|
|
187
|
+
return arrayValue(record.options).map(recordValue);
|
|
188
|
+
}
|
|
189
|
+
function rawOptionId(option) {
|
|
190
|
+
return stringValue2(option.optionId) ?? stringValue2(option.id) ?? stringValue2(option.kind) ?? "";
|
|
191
|
+
}
|
|
192
|
+
function normalizeToken(value) {
|
|
193
|
+
return (value ?? "").replace(/[_\s-]+/g, "").trim().toLowerCase();
|
|
194
|
+
}
|
|
195
|
+
function stringValue2(value) {
|
|
196
|
+
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
197
|
+
}
|
|
198
|
+
function recordValue(value) {
|
|
199
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
200
|
+
}
|
|
201
|
+
function arrayValue(value) {
|
|
202
|
+
return Array.isArray(value) ? value : [];
|
|
203
|
+
}
|
|
204
|
+
|
|
147
205
|
// shared/agentConversation/askUserQuestions.ts
|
|
148
206
|
function normalizeAskUserQuestions(rawQuestions) {
|
|
149
|
-
return
|
|
207
|
+
return arrayValue2(rawQuestions).flatMap((value, index) => {
|
|
150
208
|
const question = objectValue2(value);
|
|
151
209
|
if (!question) {
|
|
152
210
|
return [];
|
|
153
211
|
}
|
|
154
212
|
return [
|
|
155
213
|
{
|
|
156
|
-
id:
|
|
157
|
-
header:
|
|
158
|
-
question:
|
|
159
|
-
options:
|
|
214
|
+
id: stringValue3(question.id) ?? `question-${index + 1}`,
|
|
215
|
+
header: stringValue3(question.header) ?? `Question ${index + 1}`,
|
|
216
|
+
question: stringValue3(question.question) ?? stringValue3(question.header) ?? `Question ${index + 1}`,
|
|
217
|
+
options: arrayValue2(question.options).flatMap((optionValue) => {
|
|
160
218
|
const option = objectValue2(optionValue);
|
|
161
|
-
const label =
|
|
219
|
+
const label = stringValue3(option?.label);
|
|
162
220
|
if (!label) {
|
|
163
221
|
return [];
|
|
164
222
|
}
|
|
165
223
|
return [
|
|
166
224
|
{
|
|
167
225
|
label,
|
|
168
|
-
description:
|
|
226
|
+
description: stringValue3(option?.description) ?? ""
|
|
169
227
|
}
|
|
170
228
|
];
|
|
171
229
|
}),
|
|
@@ -174,13 +232,13 @@ function normalizeAskUserQuestions(rawQuestions) {
|
|
|
174
232
|
];
|
|
175
233
|
});
|
|
176
234
|
}
|
|
177
|
-
function
|
|
235
|
+
function stringValue3(value) {
|
|
178
236
|
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
179
237
|
}
|
|
180
238
|
function objectValue2(value) {
|
|
181
239
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
182
240
|
}
|
|
183
|
-
function
|
|
241
|
+
function arrayValue2(value) {
|
|
184
242
|
return Array.isArray(value) ? value : [];
|
|
185
243
|
}
|
|
186
244
|
|
|
@@ -375,6 +433,7 @@ function ZoomableImage({
|
|
|
375
433
|
const [copyStatus, setCopyStatus] = useState2(null);
|
|
376
434
|
const [imagePreviewZoom, setImagePreviewZoom] = useState2(1);
|
|
377
435
|
const [isWheelZooming, setIsWheelZooming] = useState2(false);
|
|
436
|
+
const [isImagePreviewOpen, setIsImagePreviewOpen] = useState2(false);
|
|
378
437
|
const imagePreviewZoomPercent = Math.round(imagePreviewZoom * 100);
|
|
379
438
|
const canZoomOut = imagePreviewZoom > IMAGE_PREVIEW_ZOOM_MIN;
|
|
380
439
|
const canZoomIn = imagePreviewZoom < IMAGE_PREVIEW_ZOOM_MAX;
|
|
@@ -566,6 +625,19 @@ function ZoomableImage({
|
|
|
566
625
|
)
|
|
567
626
|
}
|
|
568
627
|
) : null,
|
|
628
|
+
copyStatus ? /* @__PURE__ */ jsx2(
|
|
629
|
+
ImageCopyStatusToast,
|
|
630
|
+
{
|
|
631
|
+
busy: copyStatus.busy,
|
|
632
|
+
message: copyStatus.message,
|
|
633
|
+
variant: copyStatus.variant,
|
|
634
|
+
onOpenChange: (open) => {
|
|
635
|
+
if (!open) {
|
|
636
|
+
setCopyStatus(null);
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
) : null,
|
|
569
641
|
/* @__PURE__ */ jsx2(
|
|
570
642
|
Button,
|
|
571
643
|
{
|
|
@@ -598,6 +670,13 @@ function ZoomableImage({
|
|
|
598
670
|
wrapElement,
|
|
599
671
|
zoomMargin: 24,
|
|
600
672
|
ZoomContent: renderZoomContent,
|
|
673
|
+
onZoomChange: (zoomed) => {
|
|
674
|
+
setIsImagePreviewOpen(zoomed);
|
|
675
|
+
if (!zoomed) {
|
|
676
|
+
setIsWheelZooming(false);
|
|
677
|
+
setImagePreviewZoom(1);
|
|
678
|
+
}
|
|
679
|
+
},
|
|
601
680
|
children: /* @__PURE__ */ jsx2(
|
|
602
681
|
"img",
|
|
603
682
|
{
|
|
@@ -610,29 +689,32 @@ function ZoomableImage({
|
|
|
610
689
|
)
|
|
611
690
|
}
|
|
612
691
|
),
|
|
613
|
-
contextMenuPosition && !contextMenuPosition.inZoomDialog && actionButtons ?
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
692
|
+
contextMenuPosition && !contextMenuPosition.inZoomDialog && actionButtons ? createPortal(
|
|
693
|
+
/* @__PURE__ */ jsx2(
|
|
694
|
+
"div",
|
|
695
|
+
{
|
|
696
|
+
className: "tsh-image-context-menu nodrag tsh-desktop-no-drag",
|
|
697
|
+
style: {
|
|
698
|
+
left: contextMenuPosition.x,
|
|
699
|
+
top: contextMenuPosition.y
|
|
700
|
+
},
|
|
701
|
+
role: "menu",
|
|
702
|
+
onClick: (event) => event.stopPropagation(),
|
|
703
|
+
children: /* @__PURE__ */ jsx2(
|
|
704
|
+
ImageActionButtons,
|
|
705
|
+
{
|
|
706
|
+
copyLabel: t("common.copyImage"),
|
|
707
|
+
downloadLabel: t("common.downloadImage"),
|
|
708
|
+
itemRole: "menuitem",
|
|
709
|
+
onCopy: handleCopyImageAction,
|
|
710
|
+
onDownload: handleDownloadImage
|
|
711
|
+
}
|
|
712
|
+
)
|
|
713
|
+
}
|
|
714
|
+
),
|
|
715
|
+
document.body
|
|
634
716
|
) : null,
|
|
635
|
-
copyStatus ? createPortal(
|
|
717
|
+
copyStatus && !isImagePreviewOpen ? createPortal(
|
|
636
718
|
/* @__PURE__ */ jsx2(
|
|
637
719
|
ImageCopyStatusToast,
|
|
638
720
|
{
|
|
@@ -664,6 +746,8 @@ function ImageCopyStatusToast({
|
|
|
664
746
|
anchor: "viewport",
|
|
665
747
|
busy,
|
|
666
748
|
variant,
|
|
749
|
+
"data-tsh-image-copy-status": "true",
|
|
750
|
+
style: { zIndex: 100303 },
|
|
667
751
|
onOpenChange,
|
|
668
752
|
children: /* @__PURE__ */ jsx2(ToastTitle, { children: message })
|
|
669
753
|
}
|
|
@@ -763,6 +847,7 @@ function ImageActionButtons({
|
|
|
763
847
|
className: "tsh-zoom-dialog__icon-button",
|
|
764
848
|
size: "icon",
|
|
765
849
|
title: copyLabel,
|
|
850
|
+
onPointerDown: (event) => event.stopPropagation(),
|
|
766
851
|
variant: "chrome",
|
|
767
852
|
onClick: (event) => {
|
|
768
853
|
event.preventDefault();
|
|
@@ -779,6 +864,7 @@ function ImageActionButtons({
|
|
|
779
864
|
className: "tsh-zoom-dialog__icon-button",
|
|
780
865
|
size: "icon",
|
|
781
866
|
title: downloadLabel,
|
|
867
|
+
onPointerDown: (event) => event.stopPropagation(),
|
|
782
868
|
variant: "chrome",
|
|
783
869
|
onClick: (event) => {
|
|
784
870
|
event.preventDefault();
|
|
@@ -797,6 +883,7 @@ function ImageActionButtons({
|
|
|
797
883
|
type: "button",
|
|
798
884
|
role: itemRole,
|
|
799
885
|
title: copyLabel,
|
|
886
|
+
onPointerDown: (event) => event.stopPropagation(),
|
|
800
887
|
onClick: (event) => {
|
|
801
888
|
event.preventDefault();
|
|
802
889
|
event.stopPropagation();
|
|
@@ -814,6 +901,7 @@ function ImageActionButtons({
|
|
|
814
901
|
type: "button",
|
|
815
902
|
role: itemRole,
|
|
816
903
|
title: downloadLabel,
|
|
904
|
+
onPointerDown: (event) => event.stopPropagation(),
|
|
817
905
|
onClick: (event) => {
|
|
818
906
|
event.preventDefault();
|
|
819
907
|
event.stopPropagation();
|
|
@@ -3474,6 +3562,9 @@ function clamp(value, min, max) {
|
|
|
3474
3562
|
export {
|
|
3475
3563
|
cn,
|
|
3476
3564
|
extractAgentMcpToolTarget,
|
|
3565
|
+
isExitPlanSwitchModeInput,
|
|
3566
|
+
extractExitPlanModeOptions,
|
|
3567
|
+
extractExitPlanKeepPlanningOptionId,
|
|
3477
3568
|
normalizeAskUserQuestions,
|
|
3478
3569
|
resolveWorkspaceFilePathCandidate,
|
|
3479
3570
|
resolveWorkspaceFileLinkAction,
|
|
@@ -3484,4 +3575,4 @@ export {
|
|
|
3484
3575
|
CustomScrollArea,
|
|
3485
3576
|
MessageSquareMoreIcon
|
|
3486
3577
|
};
|
|
3487
|
-
//# sourceMappingURL=chunk-
|
|
3578
|
+
//# sourceMappingURL=chunk-RJR2OZ6T.js.map
|