@tutti-os/agent-gui 0.0.11 → 0.0.12
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.js +3 -3
- package/dist/agent-message-center/index.js +5 -3
- package/dist/agent-message-center/index.js.map +1 -1
- package/dist/agent-rich-text-at-provider.d.ts +1 -15
- package/dist/agent-rich-text-at-provider.js +1 -1
- package/dist/app/renderer/agentactivity.css +25 -0
- package/dist/{chunk-ZEFETOTS.js → chunk-72YSPOHX.js} +84 -87
- package/dist/chunk-72YSPOHX.js.map +1 -0
- package/dist/{chunk-77HBKGHF.js → chunk-KCC3GNPB.js} +1 -1
- package/dist/chunk-KCC3GNPB.js.map +1 -0
- package/dist/{chunk-ITMKZRCT.js → chunk-PKCJR6GC.js} +3 -3
- package/dist/chunk-PKCJR6GC.js.map +1 -0
- package/dist/{chunk-QTZALZIV.js → chunk-PONEQEJ5.js} +5 -29
- package/dist/{chunk-QTZALZIV.js.map → chunk-PONEQEJ5.js.map} +1 -1
- package/dist/{chunk-B7K776UD.js → chunk-Y3AQGWJA.js} +9 -1
- package/dist/chunk-Y3AQGWJA.js.map +1 -0
- package/dist/{chunk-CGBRAWTD.js → chunk-Y5O7BVGU.js} +3 -3
- package/dist/i18n/index.d.ts +8 -0
- package/dist/i18n/index.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1141 -923
- package/dist/index.js.map +1 -1
- package/dist/workspace-agent-generated-files.js +2 -2
- package/package.json +10 -10
- package/dist/chunk-77HBKGHF.js.map +0 -1
- package/dist/chunk-B7K776UD.js.map +0 -1
- package/dist/chunk-ITMKZRCT.js.map +0 -1
- package/dist/chunk-ZEFETOTS.js.map +0 -1
- /package/dist/{chunk-CGBRAWTD.js.map → chunk-Y5O7BVGU.js.map} +0 -0
|
@@ -12,7 +12,6 @@ interface AgentRichTextAtProviderContext {
|
|
|
12
12
|
interface AgentRichTextAtQueryInput {
|
|
13
13
|
keyword: string;
|
|
14
14
|
maxResults?: number;
|
|
15
|
-
cursor?: string;
|
|
16
15
|
abortSignal?: AbortSignal;
|
|
17
16
|
context: AgentRichTextAtProviderContext;
|
|
18
17
|
}
|
|
@@ -37,18 +36,6 @@ interface AgentRichTextTextInsertResult {
|
|
|
37
36
|
text: string;
|
|
38
37
|
}
|
|
39
38
|
type AgentRichTextAtInsertResult = AgentRichTextMentionInsertResult | AgentRichTextMarkdownLinkInsertResult | AgentRichTextTextInsertResult;
|
|
40
|
-
interface AgentRichTextAtReferenceItem {
|
|
41
|
-
key?: string;
|
|
42
|
-
label: string;
|
|
43
|
-
subtitle?: string | null;
|
|
44
|
-
thumbnailUrl?: string | null;
|
|
45
|
-
insertResult: AgentRichTextAtInsertResult;
|
|
46
|
-
}
|
|
47
|
-
interface AgentRichTextAtReferenceItemsResult {
|
|
48
|
-
items: readonly AgentRichTextAtReferenceItem[];
|
|
49
|
-
nextCursor?: string | null;
|
|
50
|
-
}
|
|
51
|
-
type AgentRichTextAtReferenceItemsResponse = readonly AgentRichTextAtReferenceItem[] | AgentRichTextAtReferenceItemsResult;
|
|
52
39
|
interface AgentRichTextAtProvider<TItem = any> {
|
|
53
40
|
id: string;
|
|
54
41
|
query: (input: AgentRichTextAtQueryInput) => Promise<readonly TItem[]> | readonly TItem[];
|
|
@@ -56,8 +43,7 @@ interface AgentRichTextAtProvider<TItem = any> {
|
|
|
56
43
|
getItemLabel: (item: TItem) => string;
|
|
57
44
|
getItemSubtitle?: (item: TItem) => string | null | undefined;
|
|
58
45
|
getItemThumbnailUrl?: (item: TItem) => string | null | undefined | Promise<string | null | undefined>;
|
|
59
|
-
getItemReferenceItems?: (item: TItem, input: AgentRichTextAtQueryInput) => Promise<AgentRichTextAtReferenceItemsResponse> | AgentRichTextAtReferenceItemsResponse;
|
|
60
46
|
toInsertResult: (item: TItem) => AgentRichTextAtInsertResult;
|
|
61
47
|
}
|
|
62
48
|
|
|
63
|
-
export { AGENT_GUI_MENTION_PROVIDER_IDS, type AgentGUIMentionProviderId, type AgentRichTextAtInsertResult, type AgentRichTextAtProvider, type AgentRichTextAtProviderContext, type AgentRichTextAtQueryInput, type
|
|
49
|
+
export { AGENT_GUI_MENTION_PROVIDER_IDS, type AgentGUIMentionProviderId, type AgentRichTextAtInsertResult, type AgentRichTextAtProvider, type AgentRichTextAtProviderContext, type AgentRichTextAtQueryInput, type AgentRichTextMarkdownLinkInsertResult, type AgentRichTextMentionInsert, type AgentRichTextMentionInsertResult, type AgentRichTextTextInsertResult };
|
|
@@ -6241,6 +6241,7 @@ html[data-theme="light"] [data-message-center-item-id].agent-gui-edge-glow {
|
|
|
6241
6241
|
min-width: 0;
|
|
6242
6242
|
min-height: 46px;
|
|
6243
6243
|
max-height: 72px;
|
|
6244
|
+
overflow-y: auto;
|
|
6244
6245
|
border: 0;
|
|
6245
6246
|
background: transparent;
|
|
6246
6247
|
color: var(--agent-gui-text-primary);
|
|
@@ -6250,6 +6251,30 @@ html[data-theme="light"] [data-message-center-item-id].agent-gui-edge-glow {
|
|
|
6250
6251
|
outline: 0;
|
|
6251
6252
|
padding: 0;
|
|
6252
6253
|
resize: none;
|
|
6254
|
+
scrollbar-width: thin;
|
|
6255
|
+
scrollbar-color: var(--transparency-hover) transparent;
|
|
6256
|
+
scrollbar-gutter: stable;
|
|
6257
|
+
-ms-overflow-style: auto;
|
|
6258
|
+
}
|
|
6259
|
+
|
|
6260
|
+
.agent-gui-node__composer textarea::-webkit-scrollbar,
|
|
6261
|
+
.agent-gui-node__composer-textarea::-webkit-scrollbar {
|
|
6262
|
+
display: block;
|
|
6263
|
+
width: 4px;
|
|
6264
|
+
height: 4px;
|
|
6265
|
+
}
|
|
6266
|
+
|
|
6267
|
+
.agent-gui-node__composer textarea::-webkit-scrollbar-track,
|
|
6268
|
+
.agent-gui-node__composer textarea::-webkit-scrollbar-corner,
|
|
6269
|
+
.agent-gui-node__composer-textarea::-webkit-scrollbar-track,
|
|
6270
|
+
.agent-gui-node__composer-textarea::-webkit-scrollbar-corner {
|
|
6271
|
+
background: transparent;
|
|
6272
|
+
}
|
|
6273
|
+
|
|
6274
|
+
.agent-gui-node__composer textarea::-webkit-scrollbar-thumb,
|
|
6275
|
+
.agent-gui-node__composer-textarea::-webkit-scrollbar-thumb {
|
|
6276
|
+
border-radius: 999px;
|
|
6277
|
+
background: var(--transparency-hover);
|
|
6253
6278
|
}
|
|
6254
6279
|
|
|
6255
6280
|
.agent-gui-node__composer-input-shell[data-input-disabled="true"],
|
|
@@ -13,14 +13,14 @@ import {
|
|
|
13
13
|
normalizeAskUserQuestions,
|
|
14
14
|
resolveWebsiteNavigationUrl,
|
|
15
15
|
useOptionalAgentHostApi
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-PONEQEJ5.js";
|
|
17
17
|
import {
|
|
18
18
|
workspaceAgentProviderLabel
|
|
19
19
|
} from "./chunk-TYGL25EL.js";
|
|
20
20
|
import {
|
|
21
21
|
translate,
|
|
22
22
|
useTranslation
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-Y3AQGWJA.js";
|
|
24
24
|
import {
|
|
25
25
|
resolveAgentMentionFileThumbnailUrl,
|
|
26
26
|
resolveAgentMentionFileVisualKind
|
|
@@ -3191,7 +3191,7 @@ function resolveWorkspaceFilePathCandidate({
|
|
|
3191
3191
|
const normalizedPath = normalizeWorkspaceFilePath(rawPath);
|
|
3192
3192
|
const base = normalizeWorkspaceFilePath(basePath?.trim() || root);
|
|
3193
3193
|
const resolvedPath = isAbsoluteLocalPath(normalizedPath) ? normalizedPath : normalizeWorkspaceFilePath(`${base}/${normalizedPath}`);
|
|
3194
|
-
if (!isInsideOrEqual(resolvedPath, root) && !isDirectAgentGeneratedImagePath(resolvedPath)
|
|
3194
|
+
if (!isInsideOrEqual(resolvedPath, root) && !isDirectAgentGeneratedImagePath(resolvedPath)) {
|
|
3195
3195
|
return null;
|
|
3196
3196
|
}
|
|
3197
3197
|
return {
|
|
@@ -3250,13 +3250,12 @@ function resolveWorkspaceMentionLinkAction({
|
|
|
3250
3250
|
} catch {
|
|
3251
3251
|
return null;
|
|
3252
3252
|
}
|
|
3253
|
-
const resource = url.hostname.trim().toLowerCase();
|
|
3254
3253
|
const workspaceId = url.searchParams.get("workspaceId")?.trim() || "";
|
|
3255
3254
|
const targetId = url.searchParams.get("id")?.trim() || "";
|
|
3256
3255
|
if (!workspaceId || !targetId) {
|
|
3257
3256
|
return null;
|
|
3258
3257
|
}
|
|
3259
|
-
if (
|
|
3258
|
+
if (url.hostname === "agent-session") {
|
|
3260
3259
|
const provider = url.searchParams.get("provider")?.trim() || null;
|
|
3261
3260
|
return {
|
|
3262
3261
|
type: "open-agent-session",
|
|
@@ -3266,7 +3265,7 @@ function resolveWorkspaceMentionLinkAction({
|
|
|
3266
3265
|
source
|
|
3267
3266
|
};
|
|
3268
3267
|
}
|
|
3269
|
-
if (
|
|
3268
|
+
if (url.hostname === "workspace-issue") {
|
|
3270
3269
|
const parsedIssueMention = parseWorkspaceIssueMentionHref(rawHref);
|
|
3271
3270
|
if (!parsedIssueMention) {
|
|
3272
3271
|
return null;
|
|
@@ -3378,29 +3377,6 @@ function isDirectAgentGeneratedImagePath(path) {
|
|
|
3378
3377
|
}
|
|
3379
3378
|
return /\.(?:png|jpe?g|gif|webp|bmp)$/i.test(path);
|
|
3380
3379
|
}
|
|
3381
|
-
function isDirectWorkspaceAppFilePath(path) {
|
|
3382
|
-
if (!isAbsoluteLocalPath(path)) {
|
|
3383
|
-
return false;
|
|
3384
|
-
}
|
|
3385
|
-
const segments = path.split("/").filter(Boolean);
|
|
3386
|
-
const stateRootIndex = segments.findIndex(
|
|
3387
|
-
(segment) => segment === ".tutti" || segment === ".tutti-dev"
|
|
3388
|
-
);
|
|
3389
|
-
if (stateRootIndex < 0) {
|
|
3390
|
-
return false;
|
|
3391
|
-
}
|
|
3392
|
-
const statePath = segments.slice(stateRootIndex);
|
|
3393
|
-
if (statePath[1] !== "apps") {
|
|
3394
|
-
return false;
|
|
3395
|
-
}
|
|
3396
|
-
if (statePath[2] === "workspaces") {
|
|
3397
|
-
return statePath.length > 6 && statePath[5] === "data";
|
|
3398
|
-
}
|
|
3399
|
-
if (statePath[2] === "packages") {
|
|
3400
|
-
return statePath.length > 5;
|
|
3401
|
-
}
|
|
3402
|
-
return false;
|
|
3403
|
-
}
|
|
3404
3380
|
|
|
3405
3381
|
// shared/agentConversation/rules/agentPatchMetadata.ts
|
|
3406
3382
|
function normalizeAgentPatchText(text) {
|
|
@@ -4573,12 +4549,20 @@ function userPromptContentBlocks(message, fallbackWorkspaceId) {
|
|
|
4573
4549
|
if (!content) {
|
|
4574
4550
|
return [];
|
|
4575
4551
|
}
|
|
4576
|
-
|
|
4552
|
+
const displayPrompt = firstString2(
|
|
4553
|
+
message.sourceTimelineItems?.map(
|
|
4554
|
+
(candidate) => typeof candidate.payload?.displayPrompt === "string" ? candidate.payload.displayPrompt : ""
|
|
4555
|
+
) ?? []
|
|
4556
|
+
);
|
|
4557
|
+
const blocks = content.flatMap((raw) => {
|
|
4577
4558
|
const block = raw && typeof raw === "object" && !Array.isArray(raw) ? raw : null;
|
|
4578
4559
|
if (!block) {
|
|
4579
4560
|
return [];
|
|
4580
4561
|
}
|
|
4581
4562
|
if (block.type === "text" && typeof block.text === "string") {
|
|
4563
|
+
if (displayPrompt) {
|
|
4564
|
+
return [];
|
|
4565
|
+
}
|
|
4582
4566
|
return [{ type: "text", text: block.text }];
|
|
4583
4567
|
}
|
|
4584
4568
|
if (block.type !== "image") {
|
|
@@ -4600,6 +4584,19 @@ function userPromptContentBlocks(message, fallbackWorkspaceId) {
|
|
|
4600
4584
|
}
|
|
4601
4585
|
];
|
|
4602
4586
|
});
|
|
4587
|
+
if (!displayPrompt) {
|
|
4588
|
+
return blocks;
|
|
4589
|
+
}
|
|
4590
|
+
return [{ type: "text", text: displayPrompt }, ...blocks];
|
|
4591
|
+
}
|
|
4592
|
+
function firstString2(values) {
|
|
4593
|
+
for (const value of values) {
|
|
4594
|
+
const trimmed = value.trim();
|
|
4595
|
+
if (trimmed) {
|
|
4596
|
+
return trimmed;
|
|
4597
|
+
}
|
|
4598
|
+
}
|
|
4599
|
+
return "";
|
|
4603
4600
|
}
|
|
4604
4601
|
function projectTurnAgentRows(turn, options) {
|
|
4605
4602
|
const sequence = buildAgentTurnSequenceItems(turn);
|
|
@@ -8537,7 +8534,7 @@ function getFileChangeRenderData(call) {
|
|
|
8537
8534
|
if (fromContentDiff.length > 0) {
|
|
8538
8535
|
return fromContentDiff;
|
|
8539
8536
|
}
|
|
8540
|
-
const inputPath =
|
|
8537
|
+
const inputPath = firstString3(
|
|
8541
8538
|
stringValue7(call.input?.file_path),
|
|
8542
8539
|
stringValue7(call.input?.filePath),
|
|
8543
8540
|
stringValue7(call.input?.path),
|
|
@@ -8546,31 +8543,31 @@ function getFileChangeRenderData(call) {
|
|
|
8546
8543
|
stringValue7(payloadInput?.path),
|
|
8547
8544
|
firstLocationPath2(inputLocations)
|
|
8548
8545
|
);
|
|
8549
|
-
const unifiedDiff =
|
|
8546
|
+
const unifiedDiff = firstString3(
|
|
8550
8547
|
stringValue7(call.output?.patch),
|
|
8551
8548
|
stringValue7(payloadOutput?.patch),
|
|
8552
8549
|
stringValue7(call.output?.diff),
|
|
8553
8550
|
stringValue7(payloadOutput?.diff)
|
|
8554
8551
|
);
|
|
8555
|
-
const path =
|
|
8552
|
+
const path = firstString3(
|
|
8556
8553
|
inputPath,
|
|
8557
8554
|
unifiedDiff ? extractAgentPatchPath(unifiedDiff) : null
|
|
8558
8555
|
);
|
|
8559
8556
|
if (!path) {
|
|
8560
8557
|
return [];
|
|
8561
8558
|
}
|
|
8562
|
-
const content =
|
|
8559
|
+
const content = firstString3(
|
|
8563
8560
|
stringValue7(call.input?.content),
|
|
8564
8561
|
stringValue7(payloadInput?.content),
|
|
8565
8562
|
stringValue7(rawInput?.content)
|
|
8566
8563
|
);
|
|
8567
|
-
const oldString =
|
|
8564
|
+
const oldString = firstString3(
|
|
8568
8565
|
stringValue7(call.input?.old_string),
|
|
8569
8566
|
stringValue7(payloadInput?.old_string),
|
|
8570
8567
|
stringValue7(call.output?.oldString),
|
|
8571
8568
|
stringValue7(payloadOutput?.oldString)
|
|
8572
8569
|
);
|
|
8573
|
-
const newString =
|
|
8570
|
+
const newString = firstString3(
|
|
8574
8571
|
stringValue7(call.input?.new_string),
|
|
8575
8572
|
stringValue7(payloadInput?.new_string),
|
|
8576
8573
|
stringValue7(call.output?.newString),
|
|
@@ -8612,26 +8609,26 @@ function structuredPatchFiles(value) {
|
|
|
8612
8609
|
}
|
|
8613
8610
|
return patches.flatMap((item) => {
|
|
8614
8611
|
const patch = recordValue4(item);
|
|
8615
|
-
const path =
|
|
8612
|
+
const path = firstString3(
|
|
8616
8613
|
stringValue7(patch?.filePath),
|
|
8617
8614
|
stringValue7(patch?.path)
|
|
8618
8615
|
);
|
|
8619
|
-
const diff =
|
|
8616
|
+
const diff = firstString3(
|
|
8620
8617
|
stringValue7(patch?.diff),
|
|
8621
8618
|
stringValue7(patch?.patch)
|
|
8622
8619
|
);
|
|
8623
8620
|
if (!path) {
|
|
8624
8621
|
return [];
|
|
8625
8622
|
}
|
|
8626
|
-
const oldString =
|
|
8623
|
+
const oldString = firstString3(
|
|
8627
8624
|
stringValue7(patch?.oldString),
|
|
8628
8625
|
stringValue7(patch?.old_string)
|
|
8629
8626
|
);
|
|
8630
|
-
const newString =
|
|
8627
|
+
const newString = firstString3(
|
|
8631
8628
|
stringValue7(patch?.newString),
|
|
8632
8629
|
stringValue7(patch?.new_string)
|
|
8633
8630
|
);
|
|
8634
|
-
const content =
|
|
8631
|
+
const content = firstString3(stringValue7(patch?.content), newString);
|
|
8635
8632
|
if (!diff && !oldString && !newString && !content) {
|
|
8636
8633
|
return [];
|
|
8637
8634
|
}
|
|
@@ -8699,16 +8696,16 @@ function fileChangesFiles(value) {
|
|
|
8699
8696
|
if (!path) {
|
|
8700
8697
|
return [];
|
|
8701
8698
|
}
|
|
8702
|
-
const diff =
|
|
8703
|
-
const oldString =
|
|
8699
|
+
const diff = firstString3(stringValue7(file?.diff), stringValue7(file?.patch));
|
|
8700
|
+
const oldString = firstString3(
|
|
8704
8701
|
stringValue7(file?.oldString),
|
|
8705
8702
|
stringValue7(file?.old_string)
|
|
8706
8703
|
);
|
|
8707
|
-
const newString =
|
|
8704
|
+
const newString = firstString3(
|
|
8708
8705
|
stringValue7(file?.newString),
|
|
8709
8706
|
stringValue7(file?.new_string)
|
|
8710
8707
|
);
|
|
8711
|
-
const content =
|
|
8708
|
+
const content = firstString3(stringValue7(file?.content), newString);
|
|
8712
8709
|
const changeType = firstKnownChangeType(
|
|
8713
8710
|
normalizeChangeType2(stringValue7(file?.change)),
|
|
8714
8711
|
normalizeChangeType2(stringValue7(file?.kind)),
|
|
@@ -8747,7 +8744,7 @@ function changeMapFiles(value) {
|
|
|
8747
8744
|
if (!normalizedPath || !change) {
|
|
8748
8745
|
return [];
|
|
8749
8746
|
}
|
|
8750
|
-
const unifiedDiff =
|
|
8747
|
+
const unifiedDiff = firstString3(
|
|
8751
8748
|
stringValue7(change.unified_diff),
|
|
8752
8749
|
stringValue7(change.unifiedDiff),
|
|
8753
8750
|
stringValue7(change.diff),
|
|
@@ -8755,11 +8752,11 @@ function changeMapFiles(value) {
|
|
|
8755
8752
|
);
|
|
8756
8753
|
const explicitContent = stringValue7(change.content);
|
|
8757
8754
|
const normalizedType = normalizeChangeType2(stringValue7(change.type));
|
|
8758
|
-
let oldString =
|
|
8755
|
+
let oldString = firstString3(
|
|
8759
8756
|
stringValue7(change.old_string),
|
|
8760
8757
|
stringValue7(change.oldString)
|
|
8761
8758
|
);
|
|
8762
|
-
let newString =
|
|
8759
|
+
let newString = firstString3(
|
|
8763
8760
|
stringValue7(change.new_string),
|
|
8764
8761
|
stringValue7(change.newString),
|
|
8765
8762
|
explicitContent
|
|
@@ -8774,7 +8771,7 @@ function changeMapFiles(value) {
|
|
|
8774
8771
|
if (normalizedType === "deleted" && newString === null && oldString !== null) {
|
|
8775
8772
|
newString = "";
|
|
8776
8773
|
}
|
|
8777
|
-
const content =
|
|
8774
|
+
const content = firstString3(
|
|
8778
8775
|
normalizedType === "deleted" ? null : explicitContent,
|
|
8779
8776
|
normalizedType === "created" ? newString : null
|
|
8780
8777
|
);
|
|
@@ -8828,7 +8825,7 @@ function contentDiffFiles(value, changesValue, toolName) {
|
|
|
8828
8825
|
return [];
|
|
8829
8826
|
}
|
|
8830
8827
|
const relatedChange = recordValue4(changes?.[path]);
|
|
8831
|
-
const unifiedDiff =
|
|
8828
|
+
const unifiedDiff = firstString3(
|
|
8832
8829
|
stringValue7(record.diff),
|
|
8833
8830
|
stringValue7(record.patch),
|
|
8834
8831
|
stringValue7(relatedChange?.unified_diff),
|
|
@@ -8837,13 +8834,13 @@ function contentDiffFiles(value, changesValue, toolName) {
|
|
|
8837
8834
|
const normalizedType = normalizeChangeType2(
|
|
8838
8835
|
stringValue7(relatedChange?.type)
|
|
8839
8836
|
);
|
|
8840
|
-
let oldString =
|
|
8837
|
+
let oldString = firstString3(
|
|
8841
8838
|
stringValue7(record.oldText),
|
|
8842
8839
|
stringValue7(record.oldString),
|
|
8843
8840
|
stringValue7(relatedChange?.old_string),
|
|
8844
8841
|
stringValue7(relatedChange?.oldString)
|
|
8845
8842
|
);
|
|
8846
|
-
let newString =
|
|
8843
|
+
let newString = firstString3(
|
|
8847
8844
|
stringValue7(record.newText),
|
|
8848
8845
|
stringValue7(record.newString),
|
|
8849
8846
|
stringValue7(relatedChange?.new_string),
|
|
@@ -8860,7 +8857,7 @@ function contentDiffFiles(value, changesValue, toolName) {
|
|
|
8860
8857
|
if (normalizedType === "deleted" && newString === null && oldString !== null) {
|
|
8861
8858
|
newString = "";
|
|
8862
8859
|
}
|
|
8863
|
-
const explicitContent =
|
|
8860
|
+
const explicitContent = firstString3(
|
|
8864
8861
|
stringValue7(record.content),
|
|
8865
8862
|
stringValue7(relatedChange?.content)
|
|
8866
8863
|
);
|
|
@@ -8877,7 +8874,7 @@ function contentDiffFiles(value, changesValue, toolName) {
|
|
|
8877
8874
|
if (changeType === "created" && oldString === null && newString !== null) {
|
|
8878
8875
|
oldString = "";
|
|
8879
8876
|
}
|
|
8880
|
-
const content =
|
|
8877
|
+
const content = firstString3(
|
|
8881
8878
|
changeType === "deleted" ? null : explicitContent,
|
|
8882
8879
|
changeType === "created" ? newString : null
|
|
8883
8880
|
);
|
|
@@ -9057,7 +9054,7 @@ function languageForPath(path) {
|
|
|
9057
9054
|
function normalizeToolName6(value) {
|
|
9058
9055
|
return (value ?? "").trim().replace(/[_\s-]+/g, "").toLowerCase();
|
|
9059
9056
|
}
|
|
9060
|
-
function
|
|
9057
|
+
function firstString3(...values) {
|
|
9061
9058
|
for (const value of values) {
|
|
9062
9059
|
if (typeof value === "string" && value.trim()) {
|
|
9063
9060
|
return value.trim();
|
|
@@ -9096,7 +9093,7 @@ function getCommandRenderData(call) {
|
|
|
9096
9093
|
const outputRawOutput = recordValue5(call.output?.rawOutput);
|
|
9097
9094
|
const errorRawOutput = recordValue5(call.error?.rawOutput);
|
|
9098
9095
|
return {
|
|
9099
|
-
command:
|
|
9096
|
+
command: firstString4(
|
|
9100
9097
|
stringValue8(call.input?.command),
|
|
9101
9098
|
stringValue8(call.input?.cmd),
|
|
9102
9099
|
commandArrayToString(call.input?.command),
|
|
@@ -9107,7 +9104,7 @@ function getCommandRenderData(call) {
|
|
|
9107
9104
|
stringValue8(payloadInputRawInput?.command),
|
|
9108
9105
|
stringValue8(payloadInputRawInput?.cmd)
|
|
9109
9106
|
),
|
|
9110
|
-
cwd:
|
|
9107
|
+
cwd: firstString4(
|
|
9111
9108
|
stringValue8(call.input?.cwd),
|
|
9112
9109
|
stringValue8(inputRawInput?.cwd),
|
|
9113
9110
|
stringValue8(payloadInput?.cwd),
|
|
@@ -9146,7 +9143,7 @@ function getCommandRenderData(call) {
|
|
|
9146
9143
|
function getSearchRenderData(call) {
|
|
9147
9144
|
const canonicalContent = contentText(call.content);
|
|
9148
9145
|
const canonicalFiles = locationPaths(call.locations);
|
|
9149
|
-
const output =
|
|
9146
|
+
const output = firstString4(
|
|
9150
9147
|
canonicalContent,
|
|
9151
9148
|
contentText(call.output?.content),
|
|
9152
9149
|
stringValue8(call.output?.content),
|
|
@@ -9161,14 +9158,14 @@ function getSearchRenderData(call) {
|
|
|
9161
9158
|
const mode = canonicalFiles.length > 0 && !output ? "list_files" : searchMode(call.output, output);
|
|
9162
9159
|
const filenames = canonicalFiles.length > 0 ? canonicalFiles : stringArray(call.output?.filenames);
|
|
9163
9160
|
return {
|
|
9164
|
-
query:
|
|
9161
|
+
query: firstString4(
|
|
9165
9162
|
stringValue8(call.input?.pattern),
|
|
9166
9163
|
stringValue8(call.input?.query),
|
|
9167
9164
|
stringValue8(call.input?.search_query),
|
|
9168
9165
|
stringValue8(call.input?.searchQuery),
|
|
9169
9166
|
stringValue8(call.input?.glob)
|
|
9170
9167
|
),
|
|
9171
|
-
scope:
|
|
9168
|
+
scope: firstString4(
|
|
9172
9169
|
stringValue8(call.input?.path),
|
|
9173
9170
|
stringValue8(call.input?.file_path),
|
|
9174
9171
|
stringValue8(call.input?.glob)
|
|
@@ -9177,7 +9174,7 @@ function getSearchRenderData(call) {
|
|
|
9177
9174
|
files: filenames.length > 0 ? filenames : mode === "list_files" ? outputLines : [],
|
|
9178
9175
|
lines: outputLines,
|
|
9179
9176
|
output,
|
|
9180
|
-
error:
|
|
9177
|
+
error: firstString4(
|
|
9181
9178
|
stringValue8(call.error?.aggregated_output),
|
|
9182
9179
|
stringValue8(call.error?.stdout),
|
|
9183
9180
|
stringValue8(call.error?.formatted_output),
|
|
@@ -9194,23 +9191,23 @@ function getWebSearchRenderData(call) {
|
|
|
9194
9191
|
recordValue5(call.input?.action)?.searchQuery
|
|
9195
9192
|
);
|
|
9196
9193
|
return {
|
|
9197
|
-
query:
|
|
9194
|
+
query: firstString4(
|
|
9198
9195
|
stringValue8(call.input?.query),
|
|
9199
9196
|
stringValue8(recordValue5(call.input?.action)?.query),
|
|
9200
9197
|
queries[0] ?? null
|
|
9201
9198
|
),
|
|
9202
9199
|
queries,
|
|
9203
|
-
url:
|
|
9200
|
+
url: firstString4(
|
|
9204
9201
|
stringValue8(call.input?.url),
|
|
9205
9202
|
stringValue8(recordValue5(call.input?.action)?.url)
|
|
9206
9203
|
),
|
|
9207
|
-
output:
|
|
9204
|
+
output: firstString4(
|
|
9208
9205
|
stringValue8(call.output?.stdout),
|
|
9209
9206
|
stringValue8(call.output?.output),
|
|
9210
9207
|
stringValue8(call.output?.content),
|
|
9211
9208
|
""
|
|
9212
9209
|
),
|
|
9213
|
-
error:
|
|
9210
|
+
error: firstString4(
|
|
9214
9211
|
stringValue8(call.error?.message),
|
|
9215
9212
|
stringValue8(call.error?.stdout),
|
|
9216
9213
|
""
|
|
@@ -9218,11 +9215,11 @@ function getWebSearchRenderData(call) {
|
|
|
9218
9215
|
};
|
|
9219
9216
|
}
|
|
9220
9217
|
function getWebFetchRenderData(call, maxContentLength = 3e3) {
|
|
9221
|
-
const url =
|
|
9218
|
+
const url = firstString4(
|
|
9222
9219
|
stringValue8(call.input?.url),
|
|
9223
9220
|
stringValue8(recordValue5(call.input?.action)?.url)
|
|
9224
9221
|
);
|
|
9225
|
-
const content =
|
|
9222
|
+
const content = firstString4(
|
|
9226
9223
|
contentText(call.content),
|
|
9227
9224
|
contentText(call.output?.content),
|
|
9228
9225
|
stringValue8(call.output?.output),
|
|
@@ -9245,7 +9242,7 @@ function getTodoRenderData(call) {
|
|
|
9245
9242
|
}
|
|
9246
9243
|
return todos.flatMap((todo) => {
|
|
9247
9244
|
const record = recordValue5(todo);
|
|
9248
|
-
const content =
|
|
9245
|
+
const content = firstString4(
|
|
9249
9246
|
stringValue8(record?.content),
|
|
9250
9247
|
stringValue8(record?.text)
|
|
9251
9248
|
);
|
|
@@ -9270,20 +9267,20 @@ function getToolSearchRenderData(call) {
|
|
|
9270
9267
|
};
|
|
9271
9268
|
}
|
|
9272
9269
|
function getPlanModeRenderData(call) {
|
|
9273
|
-
const enterText = call.rendererKind === "plan-enter" ?
|
|
9270
|
+
const enterText = call.rendererKind === "plan-enter" ? firstString4(
|
|
9274
9271
|
stringValue8(call.planMode?.plan),
|
|
9275
9272
|
stringValue8(call.output?.text),
|
|
9276
9273
|
stringValue8(call.input?.content),
|
|
9277
9274
|
nonEmpty(call.summary),
|
|
9278
9275
|
"Exploring codebase and designing implementation approach."
|
|
9279
9276
|
) : null;
|
|
9280
|
-
const filePath =
|
|
9277
|
+
const filePath = firstString4(
|
|
9281
9278
|
stringValue8(call.input?.filePath),
|
|
9282
9279
|
stringValue8(call.input?.file_path)
|
|
9283
9280
|
);
|
|
9284
9281
|
return {
|
|
9285
9282
|
enterText,
|
|
9286
|
-
plan: call.rendererKind === "plan-enter" ? null :
|
|
9283
|
+
plan: call.rendererKind === "plan-enter" ? null : firstString4(
|
|
9287
9284
|
stringValue8(call.input?.plan),
|
|
9288
9285
|
stringValue8(call.payload?.plan),
|
|
9289
9286
|
nonEmpty(call.summary)
|
|
@@ -9300,13 +9297,13 @@ function getTaskRenderData(call) {
|
|
|
9300
9297
|
status: task?.status ?? null,
|
|
9301
9298
|
durationText: typeof task?.durationMs === "number" && Number.isFinite(task.durationMs) ? formatDuration(task.durationMs) : null,
|
|
9302
9299
|
latestStepSummary: task?.status === "running" ? steps.at(-1)?.summary ?? null : null,
|
|
9303
|
-
prompt:
|
|
9300
|
+
prompt: firstString4(
|
|
9304
9301
|
stringValue8(task?.prompt),
|
|
9305
9302
|
stringValue8(call.input?.prompt),
|
|
9306
9303
|
stringValue8(call.input?.description),
|
|
9307
9304
|
stringValue8(call.payload?.description)
|
|
9308
9305
|
),
|
|
9309
|
-
childSessionId:
|
|
9306
|
+
childSessionId: firstString4(
|
|
9310
9307
|
stringValue8(task?.delegateSessionId),
|
|
9311
9308
|
stringValue8(call.metadata?.childSessionID),
|
|
9312
9309
|
stringValue8(call.metadata?.child_session_id),
|
|
@@ -9314,7 +9311,7 @@ function getTaskRenderData(call) {
|
|
|
9314
9311
|
stringValue8(call.metadata?.subagent_session_id)
|
|
9315
9312
|
),
|
|
9316
9313
|
steps,
|
|
9317
|
-
resultMarkdown:
|
|
9314
|
+
resultMarkdown: firstString4(
|
|
9318
9315
|
stringValue8(task?.resultMarkdown),
|
|
9319
9316
|
firstNonEmptyStructuredText(call.output, call.error),
|
|
9320
9317
|
nonEmpty(call.summary)
|
|
@@ -9326,14 +9323,14 @@ function getSkillRenderData(call) {
|
|
|
9326
9323
|
const outputRawOutput = call.output?.rawOutput;
|
|
9327
9324
|
const success = booleanValue(call.output?.success) ?? legacySkillSuccess(outputRawOutput) ?? booleanValue(recordValue5(outputRawOutput)?.success);
|
|
9328
9325
|
return {
|
|
9329
|
-
skill:
|
|
9326
|
+
skill: firstString4(
|
|
9330
9327
|
stringValue8(call.input?.skill),
|
|
9331
9328
|
stringValue8(inputRawInput?.skill),
|
|
9332
9329
|
stringValue8(call.output?.commandName),
|
|
9333
9330
|
stringValue8(recordValue5(outputRawOutput)?.commandName),
|
|
9334
9331
|
nonEmpty(call.summary)
|
|
9335
9332
|
),
|
|
9336
|
-
args:
|
|
9333
|
+
args: firstString4(
|
|
9337
9334
|
stringValue8(call.input?.args),
|
|
9338
9335
|
stringValue8(inputRawInput?.args)
|
|
9339
9336
|
),
|
|
@@ -9510,7 +9507,7 @@ function contentText(value) {
|
|
|
9510
9507
|
return [];
|
|
9511
9508
|
}
|
|
9512
9509
|
return [
|
|
9513
|
-
|
|
9510
|
+
firstString4(
|
|
9514
9511
|
stringValue8(record.text),
|
|
9515
9512
|
stringValue8(record.content),
|
|
9516
9513
|
stringValue8(recordValue5(record.content)?.text)
|
|
@@ -9530,7 +9527,7 @@ function structuredText(value) {
|
|
|
9530
9527
|
if (!record) {
|
|
9531
9528
|
return null;
|
|
9532
9529
|
}
|
|
9533
|
-
const preferred =
|
|
9530
|
+
const preferred = firstString4(
|
|
9534
9531
|
stringValue8(record.plan),
|
|
9535
9532
|
stringValue8(record.text),
|
|
9536
9533
|
stringValue8(record.output),
|
|
@@ -9557,7 +9554,7 @@ function structuredText(value) {
|
|
|
9557
9554
|
}
|
|
9558
9555
|
return null;
|
|
9559
9556
|
}
|
|
9560
|
-
function
|
|
9557
|
+
function firstString4(...values) {
|
|
9561
9558
|
for (const value of values) {
|
|
9562
9559
|
if (typeof value === "string" && value.trim()) {
|
|
9563
9560
|
return value.trim();
|
|
@@ -9627,7 +9624,7 @@ function locationPaths(value) {
|
|
|
9627
9624
|
return [];
|
|
9628
9625
|
}
|
|
9629
9626
|
return [
|
|
9630
|
-
|
|
9627
|
+
firstString4(
|
|
9631
9628
|
stringValue8(record.path),
|
|
9632
9629
|
stringValue8(record.filePath),
|
|
9633
9630
|
stringValue8(record.file_path)
|
|
@@ -11281,7 +11278,7 @@ function normalizeMcpPayload(call) {
|
|
|
11281
11278
|
return {
|
|
11282
11279
|
server,
|
|
11283
11280
|
tool,
|
|
11284
|
-
inputSummary:
|
|
11281
|
+
inputSummary: firstString5(
|
|
11285
11282
|
stringValue9(call.input?.query),
|
|
11286
11283
|
stringValue9(call.input?.url),
|
|
11287
11284
|
stringValue9(call.input?.path),
|
|
@@ -11289,7 +11286,7 @@ function normalizeMcpPayload(call) {
|
|
|
11289
11286
|
stringValue9(call.input?.command)
|
|
11290
11287
|
),
|
|
11291
11288
|
structured,
|
|
11292
|
-
text:
|
|
11289
|
+
text: firstString5(
|
|
11293
11290
|
contentArrayText(call.output?.content),
|
|
11294
11291
|
stringValue9(call.output?.content),
|
|
11295
11292
|
stringValue9(call.output?.output),
|
|
@@ -11328,7 +11325,7 @@ function parsedItems(value) {
|
|
|
11328
11325
|
return [];
|
|
11329
11326
|
}
|
|
11330
11327
|
function itemPrimaryText(item) {
|
|
11331
|
-
return
|
|
11328
|
+
return firstString5(
|
|
11332
11329
|
stringValue9(item.key),
|
|
11333
11330
|
stringValue9(item.title),
|
|
11334
11331
|
stringValue9(item.name),
|
|
@@ -11338,7 +11335,7 @@ function itemPrimaryText(item) {
|
|
|
11338
11335
|
);
|
|
11339
11336
|
}
|
|
11340
11337
|
function itemSecondaryText(item) {
|
|
11341
|
-
return
|
|
11338
|
+
return firstString5(
|
|
11342
11339
|
stringValue9(item.summary),
|
|
11343
11340
|
stringValue9(item.description),
|
|
11344
11341
|
stringValue9(item.status),
|
|
@@ -11377,7 +11374,7 @@ function contentArrayText(value) {
|
|
|
11377
11374
|
return [];
|
|
11378
11375
|
}
|
|
11379
11376
|
return [
|
|
11380
|
-
|
|
11377
|
+
firstString5(
|
|
11381
11378
|
stringValue9(record.text),
|
|
11382
11379
|
stringValue9(record.content),
|
|
11383
11380
|
stringValue9(objectValue6(record.content)?.text)
|
|
@@ -11386,7 +11383,7 @@ function contentArrayText(value) {
|
|
|
11386
11383
|
}).join("\n").trim();
|
|
11387
11384
|
return text || null;
|
|
11388
11385
|
}
|
|
11389
|
-
function
|
|
11386
|
+
function firstString5(...values) {
|
|
11390
11387
|
for (const value of values) {
|
|
11391
11388
|
if (value) {
|
|
11392
11389
|
return value;
|
|
@@ -13290,4 +13287,4 @@ export {
|
|
|
13290
13287
|
AgentConversationFlow,
|
|
13291
13288
|
useProjectedAgentConversation
|
|
13292
13289
|
};
|
|
13293
|
-
//# sourceMappingURL=chunk-
|
|
13290
|
+
//# sourceMappingURL=chunk-72YSPOHX.js.map
|