langchain_agentx_stream_ui 0.1.2 → 0.1.8
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/{AskUserQuestionToolBody-CyuNy_k5.d.ts → AskUserQuestionToolBody-BG1StdvE.d.ts} +3 -3
- package/dist/{MarkdownBlock-3iEW0Ubm.d.ts → MarkdownBlock-CcXZ5nTm.d.ts} +1 -1
- package/dist/{chunk-WM6Y6APP.js → chunk-6DYISADG.js} +2 -2
- package/dist/{chunk-MHK53ZHC.js → chunk-7CLAU74Y.js} +216 -56
- package/dist/chunk-7CLAU74Y.js.map +1 -0
- package/dist/{chunk-3B4WC67E.js → chunk-LBJFJF22.js} +307 -44
- package/dist/chunk-LBJFJF22.js.map +1 -0
- package/dist/chunk-WPW3TQQF.js +1900 -0
- package/dist/chunk-WPW3TQQF.js.map +1 -0
- package/dist/default.css +445 -31
- package/dist/index.d.ts +78 -31
- package/dist/index.js +46 -11
- package/dist/index.js.map +1 -1
- package/dist/{multi-session-DAHwfTNb.d.ts → multi-session-Dxyo3y7w.d.ts} +23 -3
- package/dist/multi-session.d.ts +4 -4
- package/dist/multi-session.js +4 -4
- package/dist/{nodes-DqhaBW7M.d.ts → nodes-BcyPw6Fr.d.ts} +12 -1
- package/dist/{sessionViewOptions-DLSFRQwZ.d.ts → sessionViewOptions-WM00Fpcn.d.ts} +1 -1
- package/dist/tools-presentation.d.ts +3 -3
- package/dist/tools.d.ts +5 -5
- package/dist/tools.js +2 -2
- package/dist/{types-aXj5TYSP.d.ts → types-BEXSHQG7.d.ts} +2 -1
- package/dist/virtual.d.ts +1 -1
- package/dist/virtual.js +2 -2
- package/package.json +6 -5
- package/dist/chunk-3B4WC67E.js.map +0 -1
- package/dist/chunk-A4W6B7C3.js +0 -1429
- package/dist/chunk-A4W6B7C3.js.map +0 -1
- package/dist/chunk-MHK53ZHC.js.map +0 -1
- /package/dist/{chunk-WM6Y6APP.js.map → chunk-6DYISADG.js.map} +0 -0
package/dist/{AskUserQuestionToolBody-CyuNy_k5.d.ts → AskUserQuestionToolBody-BG1StdvE.d.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { b as ToolDisplayProps, T as ToolBodyComponent } from './types-
|
|
3
|
-
import { T as ToolDisplayRegistry } from './sessionViewOptions-
|
|
2
|
+
import { b as ToolDisplayProps, T as ToolBodyComponent } from './types-BEXSHQG7.js';
|
|
3
|
+
import { T as ToolDisplayRegistry } from './sessionViewOptions-WM00Fpcn.js';
|
|
4
4
|
|
|
5
5
|
declare function DefaultToolBody({ result, bodyMode, onBodyModeChange, }: ToolDisplayProps): react_jsx_runtime.JSX.Element;
|
|
6
6
|
|
|
@@ -20,7 +20,7 @@ declare function WriteToolBody({ input, result, bodyMode, onBodyModeChange, }: T
|
|
|
20
20
|
|
|
21
21
|
declare function BashToolBody({ result, bodyMode, onBodyModeChange, }: ToolDisplayProps): react_jsx_runtime.JSX.Element;
|
|
22
22
|
|
|
23
|
-
declare function AgentToolBody({ result, bodyMode, onBodyModeChange, status, subagentProgress, }: ToolDisplayProps): react_jsx_runtime.JSX.Element;
|
|
23
|
+
declare function AgentToolBody({ result, bodyMode, onBodyModeChange, status, subagentProgress, subagentTranscript, }: ToolDisplayProps): react_jsx_runtime.JSX.Element;
|
|
24
24
|
|
|
25
25
|
declare function WebSearchToolBody({ result, bodyMode, onBodyModeChange, }: ToolDisplayProps): react_jsx_runtime.JSX.Element;
|
|
26
26
|
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
formatAgentTitle,
|
|
19
19
|
numField,
|
|
20
20
|
strField
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-7CLAU74Y.js";
|
|
22
22
|
import {
|
|
23
23
|
TruncatedContent,
|
|
24
24
|
displayPath,
|
|
@@ -408,4 +408,4 @@ export {
|
|
|
408
408
|
useInteractionBus,
|
|
409
409
|
ToolCallShell
|
|
410
410
|
};
|
|
411
|
-
//# sourceMappingURL=chunk-
|
|
411
|
+
//# sourceMappingURL=chunk-6DYISADG.js.map
|
|
@@ -95,6 +95,53 @@ function formatSubagentProgressLine(entry) {
|
|
|
95
95
|
toolInput: entry.toolInput
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
|
+
function isSubagentProgressEntry(value) {
|
|
99
|
+
if (value == null || typeof value !== "object" || Array.isArray(value)) return false;
|
|
100
|
+
const row = value;
|
|
101
|
+
return typeof row.toolName === "string" && row.toolName.length > 0;
|
|
102
|
+
}
|
|
103
|
+
function readProgressField(row, camel, snake) {
|
|
104
|
+
const camelValue = row[camel];
|
|
105
|
+
if (camelValue !== void 0 && camelValue !== null) return camelValue;
|
|
106
|
+
const snakeValue = row[snake];
|
|
107
|
+
if (snakeValue !== void 0 && snakeValue !== null) return snakeValue;
|
|
108
|
+
return void 0;
|
|
109
|
+
}
|
|
110
|
+
function coerceSubagentProgressEntries(raw) {
|
|
111
|
+
if (!Array.isArray(raw)) return [];
|
|
112
|
+
const entries = [];
|
|
113
|
+
for (const item of raw) {
|
|
114
|
+
if (item == null || typeof item !== "object" || Array.isArray(item)) continue;
|
|
115
|
+
const row = item;
|
|
116
|
+
const toolName = readProgressField(row, "toolName", "tool_name");
|
|
117
|
+
const agentId = readProgressField(row, "agentId", "agent_id");
|
|
118
|
+
if (!toolName || !agentId) continue;
|
|
119
|
+
const stepRaw = readProgressField(row, "step", "step") ?? 0;
|
|
120
|
+
const statusRaw = readProgressField(row, "status", "status") ?? "completed";
|
|
121
|
+
const status = statusRaw === "running" ? "running" : statusRaw === "error" || statusRaw === "failed" ? "error" : "completed";
|
|
122
|
+
entries.push({
|
|
123
|
+
agentId,
|
|
124
|
+
subagentType: readProgressField(row, "subagentType", "subagent_type"),
|
|
125
|
+
step: stepRaw,
|
|
126
|
+
toolName,
|
|
127
|
+
summary: readProgressField(row, "summary", "summary") ?? toolName,
|
|
128
|
+
status,
|
|
129
|
+
toolInput: readProgressField(row, "toolInput", "tool_input"),
|
|
130
|
+
childToolCallId: readProgressField(row, "childToolCallId", "child_tool_call_id")
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
return entries.sort((a, b) => a.step - b.step || a.toolName.localeCompare(b.toolName));
|
|
134
|
+
}
|
|
135
|
+
function extractLastToolInfoFromProgress(progress) {
|
|
136
|
+
if (!Array.isArray(progress) || progress.length === 0) return null;
|
|
137
|
+
for (let index = progress.length - 1; index >= 0; index -= 1) {
|
|
138
|
+
const entry = progress[index];
|
|
139
|
+
if (!isSubagentProgressEntry(entry)) continue;
|
|
140
|
+
const line = formatSubagentProgressLine(entry);
|
|
141
|
+
if (line) return line;
|
|
142
|
+
}
|
|
143
|
+
return null;
|
|
144
|
+
}
|
|
98
145
|
function formatGroupText(toolName, display, count, isRead, isSearch, isRunning) {
|
|
99
146
|
if (count > 1) {
|
|
100
147
|
if (isRead) {
|
|
@@ -307,29 +354,130 @@ function AgentProgressLines({
|
|
|
307
354
|
] });
|
|
308
355
|
}
|
|
309
356
|
|
|
310
|
-
// src/view/tools/
|
|
357
|
+
// src/view/tools/presentation/subagentTranscriptRenderer.ts
|
|
358
|
+
function toolCallsFromAssistant(message) {
|
|
359
|
+
const raw = message.tool_calls;
|
|
360
|
+
if (!Array.isArray(raw)) return [];
|
|
361
|
+
return raw.filter(
|
|
362
|
+
(item) => item != null && typeof item === "object" && !Array.isArray(item)
|
|
363
|
+
);
|
|
364
|
+
}
|
|
365
|
+
function toolInputFromCall(call) {
|
|
366
|
+
const args = call.args;
|
|
367
|
+
if (args != null && typeof args === "object" && !Array.isArray(args)) {
|
|
368
|
+
return args;
|
|
369
|
+
}
|
|
370
|
+
const input = call.input;
|
|
371
|
+
if (input != null && typeof input === "object" && !Array.isArray(input)) {
|
|
372
|
+
return input;
|
|
373
|
+
}
|
|
374
|
+
return null;
|
|
375
|
+
}
|
|
376
|
+
function formatAssistantToolLine(toolName, step, toolInput) {
|
|
377
|
+
const name = toolName.trim() || "Tool";
|
|
378
|
+
if (name === "Bash" && toolInput) {
|
|
379
|
+
const cmd = String(toolInput.command ?? toolInput.cmd ?? "").trim();
|
|
380
|
+
if (cmd) return formatSubagentToolProgressLine("Bash", { toolInput: { command: cmd } });
|
|
381
|
+
}
|
|
382
|
+
if (["Read", "Write", "Edit", "Glob", "Grep"].includes(name) && toolInput) {
|
|
383
|
+
return formatSubagentToolProgressLine(name, { toolInput });
|
|
384
|
+
}
|
|
385
|
+
if (typeof step === "number") return `${name} step ${step}`;
|
|
386
|
+
return name;
|
|
387
|
+
}
|
|
388
|
+
function renderUserToolResult(message) {
|
|
389
|
+
const content = message.content;
|
|
390
|
+
if (typeof content === "string" && content.trim()) {
|
|
391
|
+
return truncatePreview2(content.trim(), 240);
|
|
392
|
+
}
|
|
393
|
+
if (content != null && typeof content !== "string") {
|
|
394
|
+
try {
|
|
395
|
+
return truncatePreview2(JSON.stringify(content), 240);
|
|
396
|
+
} catch {
|
|
397
|
+
return truncatePreview2(String(content), 240);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
const toolName = String(message.name ?? "tool").trim();
|
|
401
|
+
return `${toolName} result`;
|
|
402
|
+
}
|
|
403
|
+
function renderTranscriptEntryLines(entry) {
|
|
404
|
+
const lines = [];
|
|
405
|
+
const { messageKind, message, step, toolName } = entry;
|
|
406
|
+
if (messageKind === "assistant") {
|
|
407
|
+
const toolCalls = toolCallsFromAssistant(message);
|
|
408
|
+
if (toolCalls.length > 0) {
|
|
409
|
+
for (const call of toolCalls) {
|
|
410
|
+
const callName = String(call.name ?? toolName ?? "Tool").trim();
|
|
411
|
+
lines.push(
|
|
412
|
+
formatAssistantToolLine(callName, step, toolInputFromCall(call))
|
|
413
|
+
);
|
|
414
|
+
}
|
|
415
|
+
return lines;
|
|
416
|
+
}
|
|
417
|
+
const text = String(message.content ?? "").trim();
|
|
418
|
+
if (text) {
|
|
419
|
+
lines.push(truncatePreview2(text, 240));
|
|
420
|
+
}
|
|
421
|
+
return lines;
|
|
422
|
+
}
|
|
423
|
+
if (messageKind === "user") {
|
|
424
|
+
lines.push(renderUserToolResult(message));
|
|
425
|
+
}
|
|
426
|
+
return lines;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
// src/view/tools/agent/SubagentTranscriptBlock.tsx
|
|
311
430
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
431
|
+
function SubagentTranscriptBlock({
|
|
432
|
+
entries,
|
|
433
|
+
dataSource = "transcript-lane"
|
|
434
|
+
}) {
|
|
435
|
+
if (entries.length === 0) return null;
|
|
436
|
+
const rendered = [];
|
|
437
|
+
for (const entry of entries) {
|
|
438
|
+
rendered.push(...renderTranscriptEntryLines(entry));
|
|
439
|
+
}
|
|
440
|
+
if (rendered.length === 0) return null;
|
|
441
|
+
return /* @__PURE__ */ jsx2(
|
|
442
|
+
"div",
|
|
443
|
+
{
|
|
444
|
+
className: "lax-agent-progress lax-agent-progress--transcript",
|
|
445
|
+
"data-testid": "lax-subagent-transcript-lane",
|
|
446
|
+
"data-source": dataSource,
|
|
447
|
+
children: rendered.map((text, index) => /* @__PURE__ */ jsxs2("div", { className: "lax-agent-progress__line", children: [
|
|
448
|
+
/* @__PURE__ */ jsx2("span", { className: "lax-agent-progress__gutter", "aria-hidden": true, children: index === 0 ? AGENT_PROGRESS_GUTTER : AGENT_PROGRESS_INDENT }),
|
|
449
|
+
/* @__PURE__ */ jsx2("span", { className: "lax-agent-progress__text", children: text })
|
|
450
|
+
] }, `${index}:${text}`))
|
|
451
|
+
}
|
|
452
|
+
);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
// src/view/tools/agent/AgentToolBody.tsx
|
|
456
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
312
457
|
function AgentToolBody({
|
|
313
458
|
result,
|
|
314
459
|
bodyMode,
|
|
315
460
|
onBodyModeChange,
|
|
316
461
|
status,
|
|
317
|
-
subagentProgress
|
|
462
|
+
subagentProgress,
|
|
463
|
+
subagentTranscript
|
|
318
464
|
}) {
|
|
319
465
|
if (result?.error) {
|
|
320
|
-
return /* @__PURE__ */
|
|
466
|
+
return /* @__PURE__ */ jsx3("div", { className: "lax-tool-body lax-tool-body--agent", children: /* @__PURE__ */ jsx3("div", { className: "lax-tool-body__block", "data-variant": "error", children: /* @__PURE__ */ jsx3("pre", { className: "lax-tool-body__text", children: result.error.message }) }) });
|
|
321
467
|
}
|
|
322
468
|
const progress = subagentProgress ?? [];
|
|
469
|
+
const transcriptLane = subagentTranscript ?? [];
|
|
323
470
|
const bodyText = buildAgentBodyText(result?.display, result?.summary ?? "");
|
|
324
|
-
const
|
|
325
|
-
const showRunningProgress = status === "running" && progress.length > 0;
|
|
471
|
+
const transcriptFallback = buildAgentTranscriptText(result?.display, progress);
|
|
326
472
|
const showDoneSummary = status !== "running" && bodyText.length > 0;
|
|
327
|
-
const
|
|
328
|
-
|
|
329
|
-
|
|
473
|
+
const showTranscriptLane = bodyMode === "full" && transcriptLane.length > 0;
|
|
474
|
+
const showRunningProgress = status === "running" && progress.length > 0 && !showTranscriptLane;
|
|
475
|
+
const showTranscriptFallback = bodyMode === "full" && !showTranscriptLane && transcriptFallback.length > 0;
|
|
476
|
+
if (!showRunningProgress && !showDoneSummary && !showTranscriptLane && !showTranscriptFallback) {
|
|
477
|
+
return /* @__PURE__ */ jsx3("div", { className: "lax-tool-body lax-tool-body--agent", children: /* @__PURE__ */ jsx3("div", { className: "lax-tool-body__block", "data-variant": "dim", children: /* @__PURE__ */ jsx3("pre", { className: "lax-tool-body__text", children: "(running)" }) }) });
|
|
330
478
|
}
|
|
331
|
-
return /* @__PURE__ */
|
|
332
|
-
showRunningProgress ? /* @__PURE__ */
|
|
479
|
+
return /* @__PURE__ */ jsxs3("div", { className: "lax-tool-body lax-tool-body--agent", children: [
|
|
480
|
+
showRunningProgress ? /* @__PURE__ */ jsx3(
|
|
333
481
|
AgentProgressLines,
|
|
334
482
|
{
|
|
335
483
|
entries: progress,
|
|
@@ -337,7 +485,7 @@ function AgentToolBody({
|
|
|
337
485
|
onExpand: () => onBodyModeChange?.("full")
|
|
338
486
|
}
|
|
339
487
|
) : null,
|
|
340
|
-
showDoneSummary ? /* @__PURE__ */
|
|
488
|
+
showDoneSummary ? /* @__PURE__ */ jsx3(
|
|
341
489
|
TruncatedContent,
|
|
342
490
|
{
|
|
343
491
|
text: bodyText,
|
|
@@ -346,10 +494,18 @@ function AgentToolBody({
|
|
|
346
494
|
onExpand: () => onBodyModeChange?.("full")
|
|
347
495
|
}
|
|
348
496
|
) : null,
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
497
|
+
showTranscriptLane ? /* @__PURE__ */ jsx3(SubagentTranscriptBlock, { entries: transcriptLane, dataSource: "transcript-lane" }) : null,
|
|
498
|
+
showTranscriptFallback ? /* @__PURE__ */ jsxs3(
|
|
499
|
+
"div",
|
|
500
|
+
{
|
|
501
|
+
className: "lax-agent-progress lax-agent-progress--transcript",
|
|
502
|
+
"data-source": "trace-fallback",
|
|
503
|
+
children: [
|
|
504
|
+
/* @__PURE__ */ jsx3("div", { className: "lax-agent-progress__label", children: "Transcript" }),
|
|
505
|
+
/* @__PURE__ */ jsx3(TruncatedContent, { text: transcriptFallback, mode: "full" })
|
|
506
|
+
]
|
|
507
|
+
}
|
|
508
|
+
) : null
|
|
353
509
|
] });
|
|
354
510
|
}
|
|
355
511
|
|
|
@@ -430,7 +586,7 @@ function formatAskUserQuestionsPreview(input) {
|
|
|
430
586
|
}
|
|
431
587
|
|
|
432
588
|
// src/view/tools/ask_user_question/AskUserQuestionToolBody.tsx
|
|
433
|
-
import { jsx as
|
|
589
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
434
590
|
var MAX_DISPLAY_LINES = 25;
|
|
435
591
|
var MAX_DISPLAY_CHARS = 1200;
|
|
436
592
|
function buildAskUserBody(input, display, summary) {
|
|
@@ -457,10 +613,10 @@ function AskUserQuestionToolBody({
|
|
|
457
613
|
onBodyModeChange
|
|
458
614
|
}) {
|
|
459
615
|
if (result?.error) {
|
|
460
|
-
return /* @__PURE__ */
|
|
616
|
+
return /* @__PURE__ */ jsx4("div", { className: "lax-tool-body lax-tool-body--ask-user", children: /* @__PURE__ */ jsx4("div", { className: "lax-tool-body__block", "data-variant": "error", children: /* @__PURE__ */ jsx4("pre", { className: "lax-tool-body__text", children: result.error.message }) }) });
|
|
461
617
|
}
|
|
462
618
|
const bodyText = buildAskUserBody(input, result?.display, result?.summary ?? "");
|
|
463
|
-
return /* @__PURE__ */
|
|
619
|
+
return /* @__PURE__ */ jsx4("div", { className: "lax-tool-body lax-tool-body--ask-user", children: /* @__PURE__ */ jsx4(
|
|
464
620
|
TruncatedContent,
|
|
465
621
|
{
|
|
466
622
|
text: bodyText,
|
|
@@ -472,7 +628,7 @@ function AskUserQuestionToolBody({
|
|
|
472
628
|
}
|
|
473
629
|
|
|
474
630
|
// src/view/tools/bash/BashToolBody.tsx
|
|
475
|
-
import { jsx as
|
|
631
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
476
632
|
function BashToolBody({
|
|
477
633
|
result,
|
|
478
634
|
bodyMode,
|
|
@@ -487,9 +643,9 @@ function BashToolBody({
|
|
|
487
643
|
bodyMode,
|
|
488
644
|
isError
|
|
489
645
|
);
|
|
490
|
-
return /* @__PURE__ */
|
|
491
|
-
/* @__PURE__ */
|
|
492
|
-
truncated && bodyMode === "preview" ? /* @__PURE__ */
|
|
646
|
+
return /* @__PURE__ */ jsxs4("div", { className: "lax-tool-body lax-tool-body--bash", children: [
|
|
647
|
+
/* @__PURE__ */ jsx5(BodyBlockList, { blocks }),
|
|
648
|
+
truncated && bodyMode === "preview" ? /* @__PURE__ */ jsxs4(
|
|
493
649
|
"button",
|
|
494
650
|
{
|
|
495
651
|
type: "button",
|
|
@@ -506,7 +662,7 @@ function BashToolBody({
|
|
|
506
662
|
}
|
|
507
663
|
|
|
508
664
|
// src/view/tools/edit/EditToolBody.tsx
|
|
509
|
-
import { jsx as
|
|
665
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
510
666
|
function EditToolBody({
|
|
511
667
|
input,
|
|
512
668
|
result,
|
|
@@ -514,14 +670,14 @@ function EditToolBody({
|
|
|
514
670
|
onBodyModeChange
|
|
515
671
|
}) {
|
|
516
672
|
if (result?.error) {
|
|
517
|
-
return /* @__PURE__ */
|
|
673
|
+
return /* @__PURE__ */ jsx6("div", { className: "lax-tool-body lax-tool-body--edit", children: /* @__PURE__ */ jsx6("div", { className: "lax-tool-body__block", "data-variant": "error", children: /* @__PURE__ */ jsx6("pre", { className: "lax-tool-body__text", children: result.error.message }) }) });
|
|
518
674
|
}
|
|
519
675
|
const diff = resolveEditDiffText(
|
|
520
676
|
result?.display,
|
|
521
677
|
input,
|
|
522
678
|
result?.summary ?? ""
|
|
523
679
|
);
|
|
524
|
-
return /* @__PURE__ */
|
|
680
|
+
return /* @__PURE__ */ jsx6("div", { className: "lax-tool-body lax-tool-body--edit", children: /* @__PURE__ */ jsx6(
|
|
525
681
|
DiffView,
|
|
526
682
|
{
|
|
527
683
|
diff,
|
|
@@ -532,7 +688,7 @@ function EditToolBody({
|
|
|
532
688
|
}
|
|
533
689
|
|
|
534
690
|
// src/view/tools/glob/GlobToolBody.tsx
|
|
535
|
-
import { jsx as
|
|
691
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
536
692
|
function buildGlobBodyText(result) {
|
|
537
693
|
const d = asDisplayRecord(result?.display);
|
|
538
694
|
if (d?.type === "file_list") {
|
|
@@ -561,10 +717,10 @@ function GlobToolBody({
|
|
|
561
717
|
onBodyModeChange
|
|
562
718
|
}) {
|
|
563
719
|
if (result?.error) {
|
|
564
|
-
return /* @__PURE__ */
|
|
720
|
+
return /* @__PURE__ */ jsx7("div", { className: "lax-tool-body lax-tool-body--glob", children: /* @__PURE__ */ jsx7("div", { className: "lax-tool-body__block", "data-variant": "error", children: /* @__PURE__ */ jsx7("pre", { className: "lax-tool-body__text", children: result.error.message }) }) });
|
|
565
721
|
}
|
|
566
722
|
const bodyText = buildGlobBodyText(result);
|
|
567
|
-
return /* @__PURE__ */
|
|
723
|
+
return /* @__PURE__ */ jsx7("div", { className: "lax-tool-body lax-tool-body--glob", children: /* @__PURE__ */ jsx7(
|
|
568
724
|
TruncatedContent,
|
|
569
725
|
{
|
|
570
726
|
text: bodyText,
|
|
@@ -575,7 +731,7 @@ function GlobToolBody({
|
|
|
575
731
|
}
|
|
576
732
|
|
|
577
733
|
// src/view/tools/grep/GrepToolBody.tsx
|
|
578
|
-
import { jsx as
|
|
734
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
579
735
|
function buildGrepBodyText(result) {
|
|
580
736
|
const d = asDisplayRecord(result?.display);
|
|
581
737
|
if (d?.type === "search_results") {
|
|
@@ -604,10 +760,10 @@ function GrepToolBody({
|
|
|
604
760
|
onBodyModeChange
|
|
605
761
|
}) {
|
|
606
762
|
if (result?.error) {
|
|
607
|
-
return /* @__PURE__ */
|
|
763
|
+
return /* @__PURE__ */ jsx8("div", { className: "lax-tool-body lax-tool-body--grep", children: /* @__PURE__ */ jsx8("div", { className: "lax-tool-body__block", "data-variant": "error", children: /* @__PURE__ */ jsx8("pre", { className: "lax-tool-body__text", children: result.error.message }) }) });
|
|
608
764
|
}
|
|
609
765
|
const bodyText = buildGrepBodyText(result);
|
|
610
|
-
return /* @__PURE__ */
|
|
766
|
+
return /* @__PURE__ */ jsx8("div", { className: "lax-tool-body lax-tool-body--grep", children: /* @__PURE__ */ jsx8(
|
|
611
767
|
TruncatedContent,
|
|
612
768
|
{
|
|
613
769
|
text: bodyText,
|
|
@@ -618,7 +774,7 @@ function GrepToolBody({
|
|
|
618
774
|
}
|
|
619
775
|
|
|
620
776
|
// src/view/tools/read/ReadToolBody.tsx
|
|
621
|
-
import { Fragment, jsx as
|
|
777
|
+
import { Fragment, jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
622
778
|
var LINES_RANGE_RE = /lines (\d+)-(\d+) of (\d+)/i;
|
|
623
779
|
var READ_LINES_RE = /Read (\d+) lines from/i;
|
|
624
780
|
var EMPTY_RE = /\(empty file\)/i;
|
|
@@ -701,18 +857,18 @@ function ReadToolBody({
|
|
|
701
857
|
};
|
|
702
858
|
const textBlocks = buildTextBlocks();
|
|
703
859
|
const hasMore = content && bodyMode === "preview" && content.split("\n").length > MAX_PREVIEW_LINES;
|
|
704
|
-
return /* @__PURE__ */
|
|
705
|
-
/* @__PURE__ */
|
|
706
|
-
content ? isMarkdown ? /* @__PURE__ */
|
|
860
|
+
return /* @__PURE__ */ jsxs5("div", { className: "lax-tool-body lax-tool-body--read", children: [
|
|
861
|
+
/* @__PURE__ */ jsx9("div", { className: "lax-tool-body__summary", children: bodyLine }),
|
|
862
|
+
content ? isMarkdown ? /* @__PURE__ */ jsx9(
|
|
707
863
|
MarkdownBlock,
|
|
708
864
|
{
|
|
709
865
|
text: content,
|
|
710
866
|
mode: bodyMode,
|
|
711
867
|
onExpand: () => onBodyModeChange?.("full")
|
|
712
868
|
}
|
|
713
|
-
) : /* @__PURE__ */
|
|
714
|
-
/* @__PURE__ */
|
|
715
|
-
hasMore ? /* @__PURE__ */
|
|
869
|
+
) : /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
870
|
+
/* @__PURE__ */ jsx9(BodyBlockList, { blocks: textBlocks }),
|
|
871
|
+
hasMore ? /* @__PURE__ */ jsxs5(
|
|
716
872
|
"button",
|
|
717
873
|
{
|
|
718
874
|
type: "button",
|
|
@@ -726,16 +882,16 @@ function ReadToolBody({
|
|
|
726
882
|
}
|
|
727
883
|
) : null
|
|
728
884
|
] }) : null,
|
|
729
|
-
result?.truncated ? /* @__PURE__ */
|
|
730
|
-
result?.overflow_file ? /* @__PURE__ */
|
|
885
|
+
result?.truncated ? /* @__PURE__ */ jsx9("div", { className: "lax-tool-card__truncated", children: "\u7ED3\u679C\u5DF2\u622A\u65AD" }) : null,
|
|
886
|
+
result?.overflow_file ? /* @__PURE__ */ jsxs5("div", { className: "lax-tool-card__overflow", children: [
|
|
731
887
|
"\u5B8C\u6574\u8F93\u51FA\uFF1A",
|
|
732
|
-
/* @__PURE__ */
|
|
888
|
+
/* @__PURE__ */ jsx9("code", { children: result.overflow_file })
|
|
733
889
|
] }) : null
|
|
734
890
|
] });
|
|
735
891
|
}
|
|
736
892
|
|
|
737
893
|
// src/view/tools/skill/SkillToolBody.tsx
|
|
738
|
-
import { jsx as
|
|
894
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
739
895
|
var MAX_BODY_LINES = 20;
|
|
740
896
|
function SkillToolBody({
|
|
741
897
|
result,
|
|
@@ -743,16 +899,16 @@ function SkillToolBody({
|
|
|
743
899
|
onBodyModeChange
|
|
744
900
|
}) {
|
|
745
901
|
if (result?.error) {
|
|
746
|
-
return /* @__PURE__ */
|
|
902
|
+
return /* @__PURE__ */ jsx10("div", { className: "lax-tool-body lax-tool-body--skill", children: /* @__PURE__ */ jsx10("div", { className: "lax-tool-body__block", "data-variant": "error", children: /* @__PURE__ */ jsx10("pre", { className: "lax-tool-body__text", children: result.error.message }) }) });
|
|
747
903
|
}
|
|
748
904
|
const text = result?.summary?.trim() ?? "";
|
|
749
905
|
if (!text) {
|
|
750
|
-
return /* @__PURE__ */
|
|
906
|
+
return /* @__PURE__ */ jsx10("div", { className: "lax-tool-body lax-tool-body--skill", children: /* @__PURE__ */ jsx10("div", { className: "lax-tool-body__block", "data-variant": "dim", children: /* @__PURE__ */ jsx10("pre", { className: "lax-tool-body__text", children: "(done)" }) }) });
|
|
751
907
|
}
|
|
752
908
|
const { text: truncated, truncated: was } = truncateLines(text, MAX_BODY_LINES);
|
|
753
909
|
const bodyText = was ? `${truncated}
|
|
754
910
|
\u2026 \u5DF2\u622A\u65AD` : truncated;
|
|
755
|
-
return /* @__PURE__ */
|
|
911
|
+
return /* @__PURE__ */ jsx10("div", { className: "lax-tool-body lax-tool-body--skill", children: /* @__PURE__ */ jsx10(
|
|
756
912
|
TruncatedContent,
|
|
757
913
|
{
|
|
758
914
|
text: bodyText,
|
|
@@ -764,7 +920,7 @@ function SkillToolBody({
|
|
|
764
920
|
}
|
|
765
921
|
|
|
766
922
|
// src/view/tools/webfetch/WebFetchToolBody.tsx
|
|
767
|
-
import { jsx as
|
|
923
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
768
924
|
var RECEIVED_RE = /Received\s+.+/i;
|
|
769
925
|
var MAX_BODY_LINES2 = 15;
|
|
770
926
|
function buildWebFetchBody(result) {
|
|
@@ -793,10 +949,10 @@ function WebFetchToolBody({
|
|
|
793
949
|
onBodyModeChange
|
|
794
950
|
}) {
|
|
795
951
|
if (result?.error) {
|
|
796
|
-
return /* @__PURE__ */
|
|
952
|
+
return /* @__PURE__ */ jsx11("div", { className: "lax-tool-body lax-tool-body--webfetch", children: /* @__PURE__ */ jsx11("div", { className: "lax-tool-body__block", "data-variant": "error", children: /* @__PURE__ */ jsx11("pre", { className: "lax-tool-body__text", children: result.error.message }) }) });
|
|
797
953
|
}
|
|
798
954
|
const bodyText = buildWebFetchBody(result);
|
|
799
|
-
return /* @__PURE__ */
|
|
955
|
+
return /* @__PURE__ */ jsx11("div", { className: "lax-tool-body lax-tool-body--webfetch", children: /* @__PURE__ */ jsx11(
|
|
800
956
|
TruncatedContent,
|
|
801
957
|
{
|
|
802
958
|
text: bodyText,
|
|
@@ -808,7 +964,7 @@ function WebFetchToolBody({
|
|
|
808
964
|
}
|
|
809
965
|
|
|
810
966
|
// src/view/tools/websearch/WebSearchToolBody.tsx
|
|
811
|
-
import { jsx as
|
|
967
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
812
968
|
var MAX_BODY_LINES3 = 15;
|
|
813
969
|
function buildWebSearchBody(result) {
|
|
814
970
|
const d = asDisplayRecord(result?.display);
|
|
@@ -833,10 +989,10 @@ function WebSearchToolBody({
|
|
|
833
989
|
onBodyModeChange
|
|
834
990
|
}) {
|
|
835
991
|
if (result?.error) {
|
|
836
|
-
return /* @__PURE__ */
|
|
992
|
+
return /* @__PURE__ */ jsx12("div", { className: "lax-tool-body lax-tool-body--websearch", children: /* @__PURE__ */ jsx12("div", { className: "lax-tool-body__block", "data-variant": "error", children: /* @__PURE__ */ jsx12("pre", { className: "lax-tool-body__text", children: result.error.message }) }) });
|
|
837
993
|
}
|
|
838
994
|
const bodyText = buildWebSearchBody(result);
|
|
839
|
-
return /* @__PURE__ */
|
|
995
|
+
return /* @__PURE__ */ jsx12("div", { className: "lax-tool-body lax-tool-body--websearch", children: /* @__PURE__ */ jsx12(
|
|
840
996
|
TruncatedContent,
|
|
841
997
|
{
|
|
842
998
|
text: bodyText,
|
|
@@ -848,7 +1004,7 @@ function WebSearchToolBody({
|
|
|
848
1004
|
}
|
|
849
1005
|
|
|
850
1006
|
// src/view/tools/write/WriteToolBody.tsx
|
|
851
|
-
import { jsx as
|
|
1007
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
852
1008
|
function buildWriteBodyText(input, display, summary) {
|
|
853
1009
|
const d = asDisplayRecord(display);
|
|
854
1010
|
const inp = asInputRecord(input);
|
|
@@ -890,7 +1046,7 @@ function WriteToolBody({
|
|
|
890
1046
|
onBodyModeChange
|
|
891
1047
|
}) {
|
|
892
1048
|
if (result?.error) {
|
|
893
|
-
return /* @__PURE__ */
|
|
1049
|
+
return /* @__PURE__ */ jsx13("div", { className: "lax-tool-body lax-tool-body--write", children: /* @__PURE__ */ jsx13("div", { className: "lax-tool-body__block", "data-variant": "error", children: /* @__PURE__ */ jsx13("pre", { className: "lax-tool-body__text", children: result.error.message }) }) });
|
|
894
1050
|
}
|
|
895
1051
|
const body = buildWriteBodyText(
|
|
896
1052
|
input,
|
|
@@ -898,7 +1054,7 @@ function WriteToolBody({
|
|
|
898
1054
|
result?.summary ?? ""
|
|
899
1055
|
);
|
|
900
1056
|
if (body.kind === "diff") {
|
|
901
|
-
return /* @__PURE__ */
|
|
1057
|
+
return /* @__PURE__ */ jsx13("div", { className: "lax-tool-body lax-tool-body--write", children: /* @__PURE__ */ jsx13(
|
|
902
1058
|
DiffView,
|
|
903
1059
|
{
|
|
904
1060
|
diff: body.text,
|
|
@@ -907,7 +1063,7 @@ function WriteToolBody({
|
|
|
907
1063
|
}
|
|
908
1064
|
) });
|
|
909
1065
|
}
|
|
910
|
-
return /* @__PURE__ */
|
|
1066
|
+
return /* @__PURE__ */ jsx13("div", { className: "lax-tool-body lax-tool-body--write", children: /* @__PURE__ */ jsx13(
|
|
911
1067
|
TruncatedContent,
|
|
912
1068
|
{
|
|
913
1069
|
text: body.text,
|
|
@@ -950,7 +1106,11 @@ export {
|
|
|
950
1106
|
WebFetch,
|
|
951
1107
|
SILENT_TASK_TOOL_NAMES,
|
|
952
1108
|
INTERNAL_TOOL_NAMES,
|
|
1109
|
+
coerceSubagentProgressEntries,
|
|
1110
|
+
extractLastToolInfoFromProgress,
|
|
953
1111
|
formatAgentTitle,
|
|
1112
|
+
AgentProgressLines,
|
|
1113
|
+
SubagentTranscriptBlock,
|
|
954
1114
|
AgentToolBody,
|
|
955
1115
|
asDisplayRecord,
|
|
956
1116
|
asInputRecord,
|
|
@@ -969,4 +1129,4 @@ export {
|
|
|
969
1129
|
ToolDisplayRegistry,
|
|
970
1130
|
createDefaultToolRegistry
|
|
971
1131
|
};
|
|
972
|
-
//# sourceMappingURL=chunk-
|
|
1132
|
+
//# sourceMappingURL=chunk-7CLAU74Y.js.map
|