@tutti-os/agent-gui 0.0.28 → 0.0.29
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/{AgentMentionSearchController-2Vjvmzh3.d.ts → AgentMentionSearchController-D5ks45fN.d.ts} +1 -0
- package/dist/agent-conversation/index.js +5 -5
- package/dist/agent-message-center/index.js +4 -4
- package/dist/app/renderer/agentactivity.css +40 -9
- package/dist/{chunk-IBQO76IY.js → chunk-DY2EAW7B.js} +2 -2
- package/dist/{chunk-XAQQN6MP.js → chunk-FG66NW5M.js} +2 -2
- package/dist/{chunk-LHN26OIP.js → chunk-KAJRFXJK.js} +4 -4
- package/dist/{chunk-ILBFIZCI.js → chunk-O57DGCOA.js} +30 -39
- package/dist/chunk-O57DGCOA.js.map +1 -0
- package/dist/{chunk-GLDKFIWM.js → chunk-RQ3HEF42.js} +7 -7
- package/dist/chunk-RQ3HEF42.js.map +1 -0
- package/dist/{chunk-LKT3EFGR.js → chunk-UC73DDC5.js} +126 -45
- package/dist/chunk-UC73DDC5.js.map +1 -0
- package/dist/{chunk-F7XLV7M3.js → chunk-WPWZKKKV.js} +2 -2
- package/dist/{chunk-B7DTDZVT.js → chunk-XBRKN4EC.js} +5 -8
- package/dist/chunk-XBRKN4EC.js.map +1 -0
- package/dist/chunk-Y35GDLP2.js +88 -0
- package/dist/chunk-Y35GDLP2.js.map +1 -0
- package/dist/context-mention-palette/index.d.ts +4 -3
- package/dist/context-mention-palette/index.js +6 -6
- package/dist/i18n/index.d.ts +6 -6
- package/dist/i18n/index.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +172 -66
- package/dist/index.js.map +1 -1
- package/dist/workspace-agent-generated-files.js +3 -3
- package/package.json +12 -12
- package/dist/chunk-B7DTDZVT.js.map +0 -1
- package/dist/chunk-GLDKFIWM.js.map +0 -1
- package/dist/chunk-ILBFIZCI.js.map +0 -1
- package/dist/chunk-LKT3EFGR.js.map +0 -1
- package/dist/chunk-XJ34OIEQ.js +0 -18
- package/dist/chunk-XJ34OIEQ.js.map +0 -1
- /package/dist/{chunk-IBQO76IY.js.map → chunk-DY2EAW7B.js.map} +0 -0
- /package/dist/{chunk-XAQQN6MP.js.map → chunk-FG66NW5M.js.map} +0 -0
- /package/dist/{chunk-LHN26OIP.js.map → chunk-KAJRFXJK.js.map} +0 -0
- /package/dist/{chunk-F7XLV7M3.js.map → chunk-WPWZKKKV.js.map} +0 -0
|
@@ -10,17 +10,20 @@ import {
|
|
|
10
10
|
resolveWorkspaceFileLinkAction,
|
|
11
11
|
resolveWorkspaceFilePathCandidate,
|
|
12
12
|
resolveWorkspaceLinkAction
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-DY2EAW7B.js";
|
|
14
14
|
import {
|
|
15
15
|
attrsToMentionItem,
|
|
16
16
|
createAgentFileMentionExtension,
|
|
17
17
|
formatAgentMentionMarkdown,
|
|
18
18
|
mentionItemToAttrs,
|
|
19
19
|
parseAgentMentionMarkdown
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-FG66NW5M.js";
|
|
21
21
|
import {
|
|
22
|
+
fileChangeCountFromChanges,
|
|
23
|
+
fileChangeEntriesFromChanges,
|
|
24
|
+
fileChangeTypeValue,
|
|
22
25
|
isWorkspaceAgentSyntheticControlMessage
|
|
23
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-Y35GDLP2.js";
|
|
24
27
|
import {
|
|
25
28
|
getOptionalAgentActivityRuntime,
|
|
26
29
|
useOptionalAgentHostApi
|
|
@@ -30,7 +33,7 @@ import {
|
|
|
30
33
|
} from "./chunk-TYGL25EL.js";
|
|
31
34
|
import {
|
|
32
35
|
translate
|
|
33
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-RQ3HEF42.js";
|
|
34
37
|
|
|
35
38
|
// shared/imageGenerationTool.ts
|
|
36
39
|
var KNOWN_IMAGE_GENERATION_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
@@ -895,7 +898,12 @@ function toolCallDetail(item, toolName) {
|
|
|
895
898
|
summarizeToolInput(payloadInput)
|
|
896
899
|
);
|
|
897
900
|
const normalizedToolName = normalizeToolNameToken3(toolName);
|
|
898
|
-
const multiFileSummary = summarizeFileChangeCount(
|
|
901
|
+
const multiFileSummary = summarizeFileChangeCount(
|
|
902
|
+
payloadOutput,
|
|
903
|
+
payloadInput,
|
|
904
|
+
item.payload,
|
|
905
|
+
metadataInput
|
|
906
|
+
);
|
|
899
907
|
const todoSummary = summarizeTodoProgress(payloadInput);
|
|
900
908
|
const webDomainSummary = summarizeWebDomain(webTarget);
|
|
901
909
|
const imageGeneration = extractImageGenerationPreview({
|
|
@@ -1155,17 +1163,23 @@ function summarizeToolInput(value) {
|
|
|
1155
1163
|
}
|
|
1156
1164
|
return "";
|
|
1157
1165
|
}
|
|
1158
|
-
function summarizeFileChangeCount(
|
|
1159
|
-
const
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1166
|
+
function summarizeFileChangeCount(...values) {
|
|
1167
|
+
for (const value of values) {
|
|
1168
|
+
const structuredPatch = arrayRecordValue(value, "structuredPatch");
|
|
1169
|
+
if (structuredPatch.length > 1) {
|
|
1170
|
+
return `${structuredPatch.length} files`;
|
|
1171
|
+
}
|
|
1172
|
+
const fileChanges = arrayRecordValue(
|
|
1173
|
+
recordValue3(value, "fileChanges"),
|
|
1174
|
+
"files"
|
|
1175
|
+
);
|
|
1176
|
+
if (fileChanges.length > 1) {
|
|
1177
|
+
return `${fileChanges.length} files`;
|
|
1178
|
+
}
|
|
1179
|
+
const changesCount = fileChangeCountFromChanges(value?.changes);
|
|
1180
|
+
if (changesCount > 1) {
|
|
1181
|
+
return `${changesCount} files`;
|
|
1182
|
+
}
|
|
1169
1183
|
}
|
|
1170
1184
|
return null;
|
|
1171
1185
|
}
|
|
@@ -3378,7 +3392,7 @@ function projectAgentTurnSummaryRows(detail) {
|
|
|
3378
3392
|
}
|
|
3379
3393
|
function normalizedActivityFilePath(value, options) {
|
|
3380
3394
|
const path = value?.trim() ?? "";
|
|
3381
|
-
return path && !isStructuredPayloadPath(path) && resolveWorkspaceFilePathCandidate({
|
|
3395
|
+
return path && !isStructuredPayloadPath(path) && !isIgnoredFilePath(path) && resolveWorkspaceFilePathCandidate({
|
|
3382
3396
|
path,
|
|
3383
3397
|
workspaceRoot: options.workspaceRoot
|
|
3384
3398
|
}) ? path : null;
|
|
@@ -3497,7 +3511,12 @@ function extractFileChanges(input) {
|
|
|
3497
3511
|
if (isFailedToolStatus(input.statusKind)) {
|
|
3498
3512
|
return [];
|
|
3499
3513
|
}
|
|
3500
|
-
const changes =
|
|
3514
|
+
const changes = firstFileChangeValue(
|
|
3515
|
+
input.output?.changes,
|
|
3516
|
+
payload?.changes,
|
|
3517
|
+
input.input?.changes,
|
|
3518
|
+
rawInput?.changes
|
|
3519
|
+
);
|
|
3501
3520
|
const filesFromMetadata = collectMetadataFiles(
|
|
3502
3521
|
input.id,
|
|
3503
3522
|
input.toolName ?? null,
|
|
@@ -3686,16 +3705,13 @@ function collectMetadataFiles(messageId, toolName, occurredAtUnixMs, files, patc
|
|
|
3686
3705
|
});
|
|
3687
3706
|
}
|
|
3688
3707
|
function collectChangeMapFiles(messageId, toolName, occurredAtUnixMs, changes, options) {
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
const change = objectValue5(rawChange);
|
|
3694
|
-
const normalizedPath = normalizedFilePath(path, options);
|
|
3695
|
-
if (!change || !normalizedPath) {
|
|
3708
|
+
return fileChangeEntriesFromChanges(changes).flatMap((entry) => {
|
|
3709
|
+
const change = entry.change;
|
|
3710
|
+
const normalizedPath = normalizedFilePath(entry.path, options);
|
|
3711
|
+
if (!normalizedPath) {
|
|
3696
3712
|
return [];
|
|
3697
3713
|
}
|
|
3698
|
-
const normalizedType = normalizeChangeType(
|
|
3714
|
+
const normalizedType = normalizeChangeType(fileChangeTypeValue(change));
|
|
3699
3715
|
const unifiedDiff = firstNonEmptyString(
|
|
3700
3716
|
stringValue6(change.unified_diff),
|
|
3701
3717
|
stringValue6(change.unifiedDiff),
|
|
@@ -3731,7 +3747,7 @@ function collectChangeMapFiles(messageId, toolName, occurredAtUnixMs, changes, o
|
|
|
3731
3747
|
}
|
|
3732
3748
|
return [
|
|
3733
3749
|
buildFileChange({
|
|
3734
|
-
id: `${messageId}:change:${index + 1}`,
|
|
3750
|
+
id: `${messageId}:change:${entry.index + 1}`,
|
|
3735
3751
|
toolName,
|
|
3736
3752
|
path: normalizedPath,
|
|
3737
3753
|
changeType: normalizedType ?? inferAgentPatchChangeType(unifiedDiff),
|
|
@@ -3748,6 +3764,12 @@ function collectContentDiffFiles(messageId, toolName, occurredAtUnixMs, contentI
|
|
|
3748
3764
|
if (!contentItems) {
|
|
3749
3765
|
return [];
|
|
3750
3766
|
}
|
|
3767
|
+
const changesByPath = new Map(
|
|
3768
|
+
fileChangeEntriesFromChanges(changes).map((entry) => [
|
|
3769
|
+
entry.path,
|
|
3770
|
+
entry.change
|
|
3771
|
+
])
|
|
3772
|
+
);
|
|
3751
3773
|
return contentItems.flatMap((value, index) => {
|
|
3752
3774
|
const item = objectValue5(value);
|
|
3753
3775
|
if (!item) {
|
|
@@ -3761,9 +3783,9 @@ function collectContentDiffFiles(messageId, toolName, occurredAtUnixMs, contentI
|
|
|
3761
3783
|
if (!path) {
|
|
3762
3784
|
return [];
|
|
3763
3785
|
}
|
|
3764
|
-
const relatedChange =
|
|
3786
|
+
const relatedChange = changesByPath.get(path) ?? null;
|
|
3765
3787
|
const normalizedType = normalizeChangeType(
|
|
3766
|
-
|
|
3788
|
+
relatedChange ? fileChangeTypeValue(relatedChange) : null
|
|
3767
3789
|
);
|
|
3768
3790
|
const unifiedDiff = firstNonEmptyString(
|
|
3769
3791
|
stringValue6(item.diff),
|
|
@@ -3855,7 +3877,8 @@ function normalizedFilePath(value, options = {}) {
|
|
|
3855
3877
|
}) ? path : null;
|
|
3856
3878
|
}
|
|
3857
3879
|
function isIgnoredFilePath(path) {
|
|
3858
|
-
|
|
3880
|
+
const normalizedPath = path.replace(/\\/g, "/").replace(/\/+$/, "");
|
|
3881
|
+
return normalizedPath === "/dev/null" || normalizedPath === "NUL" || normalizedPath === "/private/tmp" || normalizedPath.startsWith("/private/tmp/");
|
|
3859
3882
|
}
|
|
3860
3883
|
function isStructuredPayloadPath(path) {
|
|
3861
3884
|
if (/[\r\n]/.test(path)) {
|
|
@@ -4019,6 +4042,14 @@ function isFailedToolStatus(value) {
|
|
|
4019
4042
|
function objectValue5(value) {
|
|
4020
4043
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
4021
4044
|
}
|
|
4045
|
+
function firstFileChangeValue(...values) {
|
|
4046
|
+
for (const value of values) {
|
|
4047
|
+
if (fileChangeEntriesFromChanges(value).length > 0) {
|
|
4048
|
+
return value;
|
|
4049
|
+
}
|
|
4050
|
+
}
|
|
4051
|
+
return null;
|
|
4052
|
+
}
|
|
4022
4053
|
function arrayValue5(value) {
|
|
4023
4054
|
return Array.isArray(value) ? value : null;
|
|
4024
4055
|
}
|
|
@@ -4094,8 +4125,10 @@ function projectAgentConversationVM(detail, options = {}) {
|
|
|
4094
4125
|
rows.push(processing);
|
|
4095
4126
|
}
|
|
4096
4127
|
const normalizedRows = projectMessageCopyText(
|
|
4097
|
-
|
|
4098
|
-
|
|
4128
|
+
dropRedundantErrorWarningNotices(
|
|
4129
|
+
mergeAdjacentAssistantMessageRows(
|
|
4130
|
+
mergeAdjacentTransportRetryNoticeRows(rows)
|
|
4131
|
+
)
|
|
4099
4132
|
),
|
|
4100
4133
|
{
|
|
4101
4134
|
assistantCopyEligibleTurnIds: buildAssistantCopyEligibleTurnIds(detail)
|
|
@@ -4222,6 +4255,53 @@ function mergeAdjacentAssistantMessageRows(rows) {
|
|
|
4222
4255
|
}
|
|
4223
4256
|
return merged;
|
|
4224
4257
|
}
|
|
4258
|
+
function dropRedundantErrorWarningNotices(rows) {
|
|
4259
|
+
const turnsWithVisibleError = /* @__PURE__ */ new Set();
|
|
4260
|
+
for (const row of rows) {
|
|
4261
|
+
if (row.kind !== "message" || row.speaker !== "assistant") {
|
|
4262
|
+
continue;
|
|
4263
|
+
}
|
|
4264
|
+
for (const message of row.messages) {
|
|
4265
|
+
if (message.visibleError) {
|
|
4266
|
+
turnsWithVisibleError.add(row.turnId);
|
|
4267
|
+
}
|
|
4268
|
+
}
|
|
4269
|
+
}
|
|
4270
|
+
if (turnsWithVisibleError.size === 0) {
|
|
4271
|
+
return [...rows];
|
|
4272
|
+
}
|
|
4273
|
+
const filteredRows = [];
|
|
4274
|
+
for (const row of rows) {
|
|
4275
|
+
if (row.kind !== "message" || row.speaker !== "assistant") {
|
|
4276
|
+
filteredRows.push(row);
|
|
4277
|
+
continue;
|
|
4278
|
+
}
|
|
4279
|
+
if (!turnsWithVisibleError.has(row.turnId)) {
|
|
4280
|
+
filteredRows.push(row);
|
|
4281
|
+
continue;
|
|
4282
|
+
}
|
|
4283
|
+
const messages = row.messages.filter(
|
|
4284
|
+
(message) => !isRedundantErrorWarningNotice(message)
|
|
4285
|
+
);
|
|
4286
|
+
if (messages.length === 0) {
|
|
4287
|
+
continue;
|
|
4288
|
+
}
|
|
4289
|
+
if (messages.length === row.messages.length) {
|
|
4290
|
+
filteredRows.push(row);
|
|
4291
|
+
continue;
|
|
4292
|
+
}
|
|
4293
|
+
filteredRows.push({ ...row, messages });
|
|
4294
|
+
}
|
|
4295
|
+
return filteredRows;
|
|
4296
|
+
}
|
|
4297
|
+
function isRedundantErrorWarningNotice(message) {
|
|
4298
|
+
const notice = message.systemNotice;
|
|
4299
|
+
if (!notice || notice.noticeKind !== "warning") {
|
|
4300
|
+
return false;
|
|
4301
|
+
}
|
|
4302
|
+
const title = notice.title?.trim() ?? "";
|
|
4303
|
+
return title === "Codex reported an error.";
|
|
4304
|
+
}
|
|
4225
4305
|
function mergeAdjacentTransportRetryNoticeRows(rows) {
|
|
4226
4306
|
const merged = [];
|
|
4227
4307
|
for (const row of rows) {
|
|
@@ -7726,14 +7806,10 @@ function fileChangesFiles(value) {
|
|
|
7726
7806
|
});
|
|
7727
7807
|
}
|
|
7728
7808
|
function changeMapFiles(value) {
|
|
7729
|
-
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
return Object.entries(record).flatMap(([path, rawChange]) => {
|
|
7734
|
-
const change = recordValue4(rawChange);
|
|
7735
|
-
const normalizedPath = path.trim();
|
|
7736
|
-
if (!normalizedPath || !change) {
|
|
7809
|
+
return fileChangeEntriesFromChanges(value).flatMap((entry) => {
|
|
7810
|
+
const change = entry.change;
|
|
7811
|
+
const normalizedPath = entry.path.trim();
|
|
7812
|
+
if (!normalizedPath) {
|
|
7737
7813
|
return [];
|
|
7738
7814
|
}
|
|
7739
7815
|
const unifiedDiff = firstString3(
|
|
@@ -7743,7 +7819,7 @@ function changeMapFiles(value) {
|
|
|
7743
7819
|
stringValue7(change.patch)
|
|
7744
7820
|
);
|
|
7745
7821
|
const explicitContent = stringValue7(change.content);
|
|
7746
|
-
const normalizedType = normalizeChangeType2(
|
|
7822
|
+
const normalizedType = normalizeChangeType2(fileChangeTypeValue(change));
|
|
7747
7823
|
let oldString = firstString3(
|
|
7748
7824
|
stringValue7(change.old_string),
|
|
7749
7825
|
stringValue7(change.oldString)
|
|
@@ -7802,7 +7878,12 @@ function contentDiffFiles(value, changesValue, toolName) {
|
|
|
7802
7878
|
if (!items) {
|
|
7803
7879
|
return [];
|
|
7804
7880
|
}
|
|
7805
|
-
const
|
|
7881
|
+
const changesByPath = new Map(
|
|
7882
|
+
fileChangeEntriesFromChanges(changesValue).map((entry) => [
|
|
7883
|
+
entry.path,
|
|
7884
|
+
entry.change
|
|
7885
|
+
])
|
|
7886
|
+
);
|
|
7806
7887
|
return items.flatMap((item) => {
|
|
7807
7888
|
const record = recordValue4(item);
|
|
7808
7889
|
if (!record) {
|
|
@@ -7816,7 +7897,7 @@ function contentDiffFiles(value, changesValue, toolName) {
|
|
|
7816
7897
|
if (!path) {
|
|
7817
7898
|
return [];
|
|
7818
7899
|
}
|
|
7819
|
-
const relatedChange =
|
|
7900
|
+
const relatedChange = changesByPath.get(path) ?? null;
|
|
7820
7901
|
const unifiedDiff = firstString3(
|
|
7821
7902
|
stringValue7(record.diff),
|
|
7822
7903
|
stringValue7(record.patch),
|
|
@@ -7824,7 +7905,7 @@ function contentDiffFiles(value, changesValue, toolName) {
|
|
|
7824
7905
|
stringValue7(relatedChange?.unifiedDiff)
|
|
7825
7906
|
);
|
|
7826
7907
|
const normalizedType = normalizeChangeType2(
|
|
7827
|
-
|
|
7908
|
+
relatedChange ? fileChangeTypeValue(relatedChange) : null
|
|
7828
7909
|
);
|
|
7829
7910
|
let oldString = firstString3(
|
|
7830
7911
|
stringValue7(record.oldText),
|
|
@@ -12386,4 +12467,4 @@ export {
|
|
|
12386
12467
|
AgentConversationFlow,
|
|
12387
12468
|
useProjectedAgentConversation
|
|
12388
12469
|
};
|
|
12389
|
-
//# sourceMappingURL=chunk-
|
|
12470
|
+
//# sourceMappingURL=chunk-UC73DDC5.js.map
|