pi-extended-teams 2.4.2 → 2.4.3
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.
|
@@ -8,9 +8,6 @@ import { createActivityColors } from "./activity-colors";
|
|
|
8
8
|
|
|
9
9
|
const REFRESH_INTERVAL_MS = 250;
|
|
10
10
|
const MAX_NAVIGATION_AGENTS = 6;
|
|
11
|
-
const COLLAPSED_TOOL_RESULT_LINE_LIMIT = 14;
|
|
12
|
-
const COLLAPSED_TOOL_RESULT_HEAD_LINES = 8;
|
|
13
|
-
const COLLAPSED_TOOL_RESULT_TAIL_LINES = 3;
|
|
14
11
|
|
|
15
12
|
export interface AgentFollowViewOptions {
|
|
16
13
|
getAgents(): RunningReadAgent[];
|
|
@@ -227,7 +224,7 @@ function renderToolBlock(theme: ExtendedTeamsTheme, block: Extract<TranscriptBlo
|
|
|
227
224
|
if (compactBlock) return compactBlock;
|
|
228
225
|
|
|
229
226
|
const header = renderToolHeader(theme, block);
|
|
230
|
-
if (!expandLargeToolResults
|
|
227
|
+
if (!expandLargeToolResults) {
|
|
231
228
|
const state = block.result === undefined
|
|
232
229
|
? pendingText(theme, "working")
|
|
233
230
|
: block.isError ? failureText(theme, "✗") : successText(theme, "✓");
|
|
@@ -241,22 +238,12 @@ function renderToolBlock(theme: ExtendedTeamsTheme, block: Extract<TranscriptBlo
|
|
|
241
238
|
|
|
242
239
|
const result = block.result || "(no output)";
|
|
243
240
|
const resultLines = result.split("\n");
|
|
244
|
-
const isCollapsed = !expandLargeToolResults && resultLines.length > COLLAPSED_TOOL_RESULT_LINE_LIMIT;
|
|
245
|
-
const visibleLines = isCollapsed
|
|
246
|
-
? [
|
|
247
|
-
...resultLines.slice(0, COLLAPSED_TOOL_RESULT_HEAD_LINES),
|
|
248
|
-
`… ${resultLines.length - COLLAPSED_TOOL_RESULT_HEAD_LINES - COLLAPSED_TOOL_RESULT_TAIL_LINES} lines hidden · press l to expand logs`,
|
|
249
|
-
...resultLines.slice(-COLLAPSED_TOOL_RESULT_TAIL_LINES),
|
|
250
|
-
]
|
|
251
|
-
: resultLines;
|
|
252
241
|
const resultLineWidth = width === undefined ? undefined : Math.max(1, width - visibleWidth("│ "));
|
|
253
|
-
const boundedLines =
|
|
242
|
+
const boundedLines = resultLines.map((line) => resultLineWidth === undefined
|
|
254
243
|
? line
|
|
255
244
|
: truncateToWidth(line, resultLineWidth, "…"));
|
|
256
|
-
const body = boundedLines.map((line
|
|
257
|
-
|
|
258
|
-
: `${structuralText(theme, "│")} ${line}`);
|
|
259
|
-
const summary = `${resultLines.length} line${resultLines.length === 1 ? "" : "s"} · ${formatResultSize(result)}${isCollapsed ? " · collapsed" : ""}`;
|
|
245
|
+
const body = boundedLines.map((line) => `${structuralText(theme, "│")} ${line}`);
|
|
246
|
+
const summary = `${resultLines.length} line${resultLines.length === 1 ? "" : "s"} · ${formatResultSize(result)}`;
|
|
260
247
|
const renderedSummary = block.isError ? failureText(theme, summary) : successText(theme, summary);
|
|
261
248
|
return [header, ...body, `${structuralText(theme, "╰─")} ${renderedSummary}`, ""];
|
|
262
249
|
}
|