erosolar-cli 1.7.361 → 1.7.363
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/shell/interactiveShell.d.ts +0 -2
- package/dist/shell/interactiveShell.d.ts.map +1 -1
- package/dist/shell/interactiveShell.js +13 -32
- package/dist/shell/interactiveShell.js.map +1 -1
- package/dist/shell/terminalInput.d.ts +19 -26
- package/dist/shell/terminalInput.d.ts.map +1 -1
- package/dist/shell/terminalInput.js +224 -148
- package/dist/shell/terminalInput.js.map +1 -1
- package/dist/shell/terminalInputAdapter.d.ts.map +1 -1
- package/dist/shell/terminalInputAdapter.js +2 -5
- package/dist/shell/terminalInputAdapter.js.map +1 -1
- package/dist/subagents/taskRunner.d.ts.map +1 -1
- package/dist/subagents/taskRunner.js +25 -7
- package/dist/subagents/taskRunner.js.map +1 -1
- package/dist/tools/learnTools.js +4 -127
- package/dist/tools/learnTools.js.map +1 -1
- package/dist/ui/ShellUIAdapter.d.ts +0 -27
- package/dist/ui/ShellUIAdapter.d.ts.map +1 -1
- package/dist/ui/ShellUIAdapter.js +9 -175
- package/dist/ui/ShellUIAdapter.js.map +1 -1
- package/dist/ui/theme.d.ts +3 -108
- package/dist/ui/theme.d.ts.map +1 -1
- package/dist/ui/theme.js +3 -124
- package/dist/ui/theme.js.map +1 -1
- package/dist/ui/toolDisplay.d.ts +7 -44
- package/dist/ui/toolDisplay.d.ts.map +1 -1
- package/dist/ui/toolDisplay.js +32 -163
- package/dist/ui/toolDisplay.js.map +1 -1
- package/dist/ui/unified/index.d.ts +0 -11
- package/dist/ui/unified/index.d.ts.map +1 -1
- package/dist/ui/unified/index.js +0 -16
- package/dist/ui/unified/index.js.map +1 -1
- package/dist/ui/unified/layout.d.ts.map +1 -1
- package/dist/ui/unified/layout.js +47 -32
- package/dist/ui/unified/layout.js.map +1 -1
- package/package.json +1 -1
- package/dist/ui/compactRenderer.d.ts +0 -139
- package/dist/ui/compactRenderer.d.ts.map +0 -1
- package/dist/ui/compactRenderer.js +0 -398
- package/dist/ui/compactRenderer.js.map +0 -1
- package/dist/ui/inPlaceUpdater.d.ts +0 -181
- package/dist/ui/inPlaceUpdater.d.ts.map +0 -1
- package/dist/ui/inPlaceUpdater.js +0 -515
- package/dist/ui/inPlaceUpdater.js.map +0 -1
package/dist/ui/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/ui/theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,MAAM,iBAAiB,CAAC;AAE7C;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,SAAS;IACxC,SAAS,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,SAAS;IAC1C,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,OAAO;IACrC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,QAAQ;IACvC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,QAAQ;IACvC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,MAAM;IACnC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,OAAO;IAEnC,GAAG,EAAE,KAAK,CAAC,GAAG;IACd,IAAI,EAAE,KAAK,CAAC,IAAI;IAChB,MAAM,EAAE,KAAK,CAAC,MAAM;IACpB,SAAS,EAAE,KAAK,CAAC,SAAS;IAE1B,QAAQ,EAAE;QACR,OAAO,EAAE,cAAc,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;QAC1D,IAAI,EAAE,cAAc,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,C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ACvD,KAAK,QAAQ;YACX,OAAO,KAAK,CAAC,MAAM,CAAC,YAAY,OAAO,EAAE,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC"}
|
package/dist/ui/toolDisplay.d.ts
CHANGED
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
* - Result summaries with status indicators
|
|
7
7
|
* - Expandable content with previews
|
|
8
8
|
* - Diff formatting with colors
|
|
9
|
-
* - Advanced progress indicators
|
|
10
|
-
* - Compact same-line displays
|
|
11
9
|
*/
|
|
12
10
|
export interface ToolCallDisplay {
|
|
13
11
|
name: string;
|
|
@@ -138,7 +136,14 @@ export interface ToolResultSummaryInput {
|
|
|
138
136
|
output: string;
|
|
139
137
|
success: boolean;
|
|
140
138
|
durationMs?: number;
|
|
139
|
+
/** Force compact single-line output */
|
|
140
|
+
compact?: boolean;
|
|
141
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* Compact display mode for tool results
|
|
144
|
+
* When true, all results are formatted as single lines
|
|
145
|
+
*/
|
|
146
|
+
export type DisplayMode = 'compact' | 'normal' | 'expanded';
|
|
142
147
|
/**
|
|
143
148
|
* Format a tool result summary for display in the terminal.
|
|
144
149
|
* This is the central function for displaying ALL tool results.
|
|
@@ -150,46 +155,4 @@ export interface ToolResultSummaryInput {
|
|
|
150
155
|
* @returns Formatted string to display, or null if no display needed
|
|
151
156
|
*/
|
|
152
157
|
export declare function formatToolResultSummary(input: ToolResultSummaryInput): string | null;
|
|
153
|
-
/**
|
|
154
|
-
* Format a compact progress bar
|
|
155
|
-
*/
|
|
156
|
-
export declare function formatCompactProgressBar(current: number, total: number, options?: {
|
|
157
|
-
width?: number;
|
|
158
|
-
style?: 'bar' | 'braille' | 'dots';
|
|
159
|
-
}): string;
|
|
160
|
-
/**
|
|
161
|
-
* Format a micro progress indicator (fits in status line)
|
|
162
|
-
*/
|
|
163
|
-
export declare function formatMicroProgress(current: number, total: number): string;
|
|
164
|
-
/**
|
|
165
|
-
* Format a spinner with elapsed time
|
|
166
|
-
*/
|
|
167
|
-
export declare function formatSpinnerWithTime(frame: string, label: string, elapsedMs: number): string;
|
|
168
|
-
/**
|
|
169
|
-
* Format multiple tool operations on a single line
|
|
170
|
-
*/
|
|
171
|
-
export declare function formatCompactToolLine(operations: Array<{
|
|
172
|
-
name: string;
|
|
173
|
-
status: 'success' | 'error' | 'running';
|
|
174
|
-
summary?: string;
|
|
175
|
-
}>, options?: {
|
|
176
|
-
separator?: string;
|
|
177
|
-
maxWidth?: number;
|
|
178
|
-
}): string;
|
|
179
|
-
/**
|
|
180
|
-
* Format a file operation summary with additions/removals
|
|
181
|
-
*/
|
|
182
|
-
export declare function formatFileOpSummary(path: string, type: 'read' | 'edit' | 'write', stats?: {
|
|
183
|
-
lines?: number;
|
|
184
|
-
additions?: number;
|
|
185
|
-
removals?: number;
|
|
186
|
-
}): string;
|
|
187
|
-
/**
|
|
188
|
-
* Format a search result summary
|
|
189
|
-
*/
|
|
190
|
-
export declare function formatSearchOpSummary(pattern: string, matchCount: number, fileCount?: number, durationMs?: number): string;
|
|
191
|
-
/**
|
|
192
|
-
* Format a context usage badge
|
|
193
|
-
*/
|
|
194
|
-
export declare function formatContextBadge(usedPercentage: number): string;
|
|
195
158
|
//# sourceMappingURL=toolDisplay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolDisplay.d.ts","sourceRoot":"","sources":["../../src/ui/toolDisplay.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"toolDisplay.d.ts","sourceRoot":"","sources":["../../src/ui/toolDisplay.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,U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AAQ,GAAG,UAAU,CAAC;AAE5D;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,sBAAsB,GAAG,MAAM,GAAG,IAAI,CA6KpF"}
|
package/dist/ui/toolDisplay.js
CHANGED
|
@@ -6,11 +6,9 @@
|
|
|
6
6
|
* - Result summaries with status indicators
|
|
7
7
|
* - Expandable content with previews
|
|
8
8
|
* - Diff formatting with colors
|
|
9
|
-
* - Advanced progress indicators
|
|
10
|
-
* - Compact same-line displays
|
|
11
9
|
*/
|
|
12
10
|
import { formatPlan, normalizePlanItems, resolvePlanWidth, wrapPlanText } from '../utils/planFormatter.js';
|
|
13
|
-
import { theme
|
|
11
|
+
import { theme } from './theme.js';
|
|
14
12
|
/**
|
|
15
13
|
* Format tool call display (Claude Code style)
|
|
16
14
|
*
|
|
@@ -435,7 +433,7 @@ export function formatKeyValue(key, value) {
|
|
|
435
433
|
* @returns Formatted string to display, or null if no display needed
|
|
436
434
|
*/
|
|
437
435
|
export function formatToolResultSummary(input) {
|
|
438
|
-
const { toolName, args, output, success, durationMs } = input;
|
|
436
|
+
const { toolName, args, output, success, durationMs, compact } = input;
|
|
439
437
|
// Determine tool category and format accordingly
|
|
440
438
|
switch (toolName) {
|
|
441
439
|
// === FILE OPERATIONS ===
|
|
@@ -449,7 +447,7 @@ export function formatToolResultSummary(input) {
|
|
|
449
447
|
case 'execute_bash':
|
|
450
448
|
case 'execute_bash_stream':
|
|
451
449
|
case 'execute_command':
|
|
452
|
-
return formatBashResult(args, output, success, durationMs);
|
|
450
|
+
return formatBashResult(args, output, success, durationMs, compact);
|
|
453
451
|
// === BACKGROUND BASH ===
|
|
454
452
|
case 'BashOutput':
|
|
455
453
|
return formatBashOutputResult(args, output, success);
|
|
@@ -465,11 +463,11 @@ export function formatToolResultSummary(input) {
|
|
|
465
463
|
case 'grep_search':
|
|
466
464
|
case 'search_text':
|
|
467
465
|
case 'search_files':
|
|
468
|
-
return formatGrepResult(args, output, success);
|
|
466
|
+
return formatGrepResult(args, output, success, compact);
|
|
469
467
|
case 'Glob':
|
|
470
468
|
case 'glob':
|
|
471
469
|
case 'list_files':
|
|
472
|
-
return formatGlobResult(args, output, success);
|
|
470
|
+
return formatGlobResult(args, output, success, compact);
|
|
473
471
|
case 'find_definition':
|
|
474
472
|
return formatFindDefinitionResult(args, output, success);
|
|
475
473
|
// === WEB OPERATIONS ===
|
|
@@ -584,14 +582,23 @@ export function formatToolResultSummary(input) {
|
|
|
584
582
|
* Format Bash command result
|
|
585
583
|
* Shows: command executed, exit status, and output preview
|
|
586
584
|
*/
|
|
587
|
-
function formatBashResult(args, output, success, durationMs) {
|
|
585
|
+
function formatBashResult(args, output, success, durationMs, compact) {
|
|
588
586
|
const command = args['command'] || '';
|
|
589
587
|
const description = args['description'];
|
|
590
|
-
const lines = [];
|
|
591
|
-
// Header with command
|
|
592
588
|
const statusIcon = success ? theme.success('✓') : theme.error('✗');
|
|
593
|
-
const cmdDisplay = truncateCommand(command, 50);
|
|
594
589
|
const durationStr = durationMs ? ` ${theme.ui.muted(`(${formatDuration(durationMs)})`)}` : '';
|
|
590
|
+
// Compact mode: single line with essential info
|
|
591
|
+
if (compact) {
|
|
592
|
+
const cmdShort = truncateCommand(command, 40);
|
|
593
|
+
const outputLines = output.trim().split('\n').length;
|
|
594
|
+
const outputInfo = output.trim() ? theme.ui.muted(`→ ${outputLines}L`) : '';
|
|
595
|
+
if (description) {
|
|
596
|
+
return `${statusIcon} ${description}${durationStr} ${outputInfo}`;
|
|
597
|
+
}
|
|
598
|
+
return `${statusIcon} ${theme.ui.muted('$')} ${cmdShort}${durationStr} ${outputInfo}`;
|
|
599
|
+
}
|
|
600
|
+
const lines = [];
|
|
601
|
+
const cmdDisplay = truncateCommand(command, 50);
|
|
595
602
|
if (description) {
|
|
596
603
|
lines.push(`${statusIcon} ${description}${durationStr}`);
|
|
597
604
|
lines.push(` ${theme.ui.muted('$')} ${theme.dim(cmdDisplay)}`);
|
|
@@ -633,17 +640,20 @@ function formatReadResult(args, output, success) {
|
|
|
633
640
|
* Format Grep search result
|
|
634
641
|
* Shows: pattern, matches found, and file list preview
|
|
635
642
|
*/
|
|
636
|
-
function formatGrepResult(args, output, success) {
|
|
643
|
+
function formatGrepResult(args, output, success, compact) {
|
|
637
644
|
const pattern = args['pattern'] || '';
|
|
638
645
|
const patternDisplay = pattern.length > 30 ? `${pattern.slice(0, 27)}...` : pattern;
|
|
639
|
-
const lines = [];
|
|
640
646
|
if (!success || !output.trim()) {
|
|
641
|
-
|
|
642
|
-
return lines.join('\n');
|
|
647
|
+
return `${theme.warning('○')} No matches for "${patternDisplay}"`;
|
|
643
648
|
}
|
|
644
649
|
// Count matches/files
|
|
645
650
|
const outputLines = output.trim().split('\n').filter(l => l.trim());
|
|
646
651
|
const matchCount = outputLines.length;
|
|
652
|
+
// Compact mode: single line
|
|
653
|
+
if (compact) {
|
|
654
|
+
return `${theme.success('✓')} grep "${patternDisplay}" ${theme.ui.muted(`→ ${matchCount}`)}`;
|
|
655
|
+
}
|
|
656
|
+
const lines = [];
|
|
647
657
|
lines.push(`${theme.success('✓')} Found ${theme.info(String(matchCount))} match${matchCount === 1 ? '' : 'es'} for "${patternDisplay}"`);
|
|
648
658
|
// Show first few matches
|
|
649
659
|
const maxPreview = 3;
|
|
@@ -661,15 +671,18 @@ function formatGrepResult(args, output, success) {
|
|
|
661
671
|
* Format Glob file search result
|
|
662
672
|
* Shows: pattern and files found
|
|
663
673
|
*/
|
|
664
|
-
function formatGlobResult(args, output, success) {
|
|
674
|
+
function formatGlobResult(args, output, success, compact) {
|
|
665
675
|
const pattern = args['pattern'] || '*';
|
|
666
|
-
const lines = [];
|
|
667
676
|
if (!success || !output.trim()) {
|
|
668
|
-
|
|
669
|
-
return lines.join('\n');
|
|
677
|
+
return `${theme.warning('○')} No files matching "${pattern}"`;
|
|
670
678
|
}
|
|
671
679
|
const files = output.trim().split('\n').filter(f => f.trim());
|
|
672
680
|
const fileCount = files.length;
|
|
681
|
+
// Compact mode: single line
|
|
682
|
+
if (compact) {
|
|
683
|
+
return `${theme.success('✓')} glob "${pattern}" ${theme.ui.muted(`→ ${fileCount}`)}`;
|
|
684
|
+
}
|
|
685
|
+
const lines = [];
|
|
673
686
|
lines.push(`${theme.success('✓')} Found ${theme.info(String(fileCount))} file${fileCount === 1 ? '' : 's'} matching "${pattern}"`);
|
|
674
687
|
// Show first few files
|
|
675
688
|
const maxPreview = 4;
|
|
@@ -1354,148 +1367,4 @@ function formatLearnResult(toolName, args, output, success) {
|
|
|
1354
1367
|
return `${theme.success('✓')} Learning completed`;
|
|
1355
1368
|
}
|
|
1356
1369
|
}
|
|
1357
|
-
// ============================================================================
|
|
1358
|
-
// ADVANCED PROGRESS INDICATORS
|
|
1359
|
-
// ============================================================================
|
|
1360
|
-
/**
|
|
1361
|
-
* Format a compact progress bar
|
|
1362
|
-
*/
|
|
1363
|
-
export function formatCompactProgressBar(current, total, options = {}) {
|
|
1364
|
-
const { width = 15, style = 'bar' } = options;
|
|
1365
|
-
const percentage = Math.min(100, Math.max(0, Math.round((current / total) * 100)));
|
|
1366
|
-
const filled = Math.round((current / total) * width);
|
|
1367
|
-
const empty = width - filled;
|
|
1368
|
-
let bar;
|
|
1369
|
-
switch (style) {
|
|
1370
|
-
case 'braille': {
|
|
1371
|
-
// Smooth braille progress (8 states per character)
|
|
1372
|
-
const fullBlocks = Math.floor((current / total) * width);
|
|
1373
|
-
const remainder = ((current / total) * width) - fullBlocks;
|
|
1374
|
-
const partials = [' ', '⡀', '⡄', '⡆', '⡇', '⣇', '⣧', '⣷', '⣿'];
|
|
1375
|
-
const partialIndex = Math.floor(remainder * 8);
|
|
1376
|
-
bar = '⣿'.repeat(fullBlocks);
|
|
1377
|
-
if (fullBlocks < width) {
|
|
1378
|
-
bar += partials[partialIndex] ?? ' ';
|
|
1379
|
-
bar += ' '.repeat(width - fullBlocks - 1);
|
|
1380
|
-
}
|
|
1381
|
-
bar = theme.progress?.bar?.(bar) ?? theme.info(bar);
|
|
1382
|
-
break;
|
|
1383
|
-
}
|
|
1384
|
-
case 'dots':
|
|
1385
|
-
bar = theme.success('●').repeat(filled) + theme.ui.muted('○').repeat(empty);
|
|
1386
|
-
break;
|
|
1387
|
-
case 'bar':
|
|
1388
|
-
default:
|
|
1389
|
-
bar = (theme.progress?.bar ?? theme.info)(progressChars.filled.repeat(filled)) +
|
|
1390
|
-
(theme.progress?.empty ?? theme.ui.muted)(progressChars.empty.repeat(empty));
|
|
1391
|
-
}
|
|
1392
|
-
return `[${bar}] ${(theme.progress?.percentage ?? theme.warning)(`${percentage}%`)}`;
|
|
1393
|
-
}
|
|
1394
|
-
/**
|
|
1395
|
-
* Format a micro progress indicator (fits in status line)
|
|
1396
|
-
*/
|
|
1397
|
-
export function formatMicroProgress(current, total) {
|
|
1398
|
-
const percentage = Math.min(100, Math.max(0, Math.round((current / total) * 100)));
|
|
1399
|
-
// Use single-char block progress
|
|
1400
|
-
const blocks = ['░', '▒', '▓', '█'];
|
|
1401
|
-
const blockIndex = Math.min(3, Math.floor(percentage / 25));
|
|
1402
|
-
const block = blocks[blockIndex] ?? '░';
|
|
1403
|
-
return `${theme.info(block)}${percentage}%`;
|
|
1404
|
-
}
|
|
1405
|
-
/**
|
|
1406
|
-
* Format a spinner with elapsed time
|
|
1407
|
-
*/
|
|
1408
|
-
export function formatSpinnerWithTime(frame, label, elapsedMs) {
|
|
1409
|
-
const elapsed = formatDuration(elapsedMs);
|
|
1410
|
-
return `${theme.info(frame)} ${label} ${theme.ui.muted(`(${elapsed})`)}`;
|
|
1411
|
-
}
|
|
1412
|
-
/**
|
|
1413
|
-
* Format multiple tool operations on a single line
|
|
1414
|
-
*/
|
|
1415
|
-
export function formatCompactToolLine(operations, options = {}) {
|
|
1416
|
-
const { separator = ' · ', maxWidth = 80 } = options;
|
|
1417
|
-
const badges = [];
|
|
1418
|
-
let currentLength = 0;
|
|
1419
|
-
for (const op of operations) {
|
|
1420
|
-
const icon = op.status === 'success' ? icons.success :
|
|
1421
|
-
op.status === 'error' ? icons.error : icons.running;
|
|
1422
|
-
const color = op.status === 'success' ? theme.success :
|
|
1423
|
-
op.status === 'error' ? theme.error : theme.info;
|
|
1424
|
-
let badge = `${color(icon)} ${theme.tool(op.name)}`;
|
|
1425
|
-
if (op.summary) {
|
|
1426
|
-
badge += ` ${theme.ui.muted(op.summary)}`;
|
|
1427
|
-
}
|
|
1428
|
-
const badgeLength = badge.replace(/\u001B\[[0-9;]*m/g, '').length;
|
|
1429
|
-
const sepLength = badges.length > 0 ? separator.replace(/\u001B\[[0-9;]*m/g, '').length : 0;
|
|
1430
|
-
if (currentLength + sepLength + badgeLength > maxWidth - 5) {
|
|
1431
|
-
const remaining = operations.length - badges.length;
|
|
1432
|
-
if (remaining > 0) {
|
|
1433
|
-
badges.push(theme.ui.muted(`+${remaining} more`));
|
|
1434
|
-
}
|
|
1435
|
-
break;
|
|
1436
|
-
}
|
|
1437
|
-
badges.push(badge);
|
|
1438
|
-
currentLength += sepLength + badgeLength;
|
|
1439
|
-
}
|
|
1440
|
-
return badges.join(theme.ui.muted(separator));
|
|
1441
|
-
}
|
|
1442
|
-
/**
|
|
1443
|
-
* Format a file operation summary with additions/removals
|
|
1444
|
-
*/
|
|
1445
|
-
export function formatFileOpSummary(path, type, stats) {
|
|
1446
|
-
const shortPath = truncatePathForDisplay(path, 40);
|
|
1447
|
-
const icon = type === 'read' ? icons.success :
|
|
1448
|
-
type === 'edit' ? icons.success : icons.success;
|
|
1449
|
-
const color = theme.success;
|
|
1450
|
-
const parts = [
|
|
1451
|
-
`${color(icon)} ${theme.file?.path?.(shortPath) ?? theme.info(shortPath)}`,
|
|
1452
|
-
];
|
|
1453
|
-
if (stats) {
|
|
1454
|
-
const details = [];
|
|
1455
|
-
if (stats.lines !== undefined) {
|
|
1456
|
-
details.push(`${stats.lines} lines`);
|
|
1457
|
-
}
|
|
1458
|
-
if (stats.additions !== undefined && stats.additions > 0) {
|
|
1459
|
-
details.push((theme.file?.additions ?? theme.success)(`+${stats.additions}`));
|
|
1460
|
-
}
|
|
1461
|
-
if (stats.removals !== undefined && stats.removals > 0) {
|
|
1462
|
-
details.push((theme.file?.removals ?? theme.error)(`-${stats.removals}`));
|
|
1463
|
-
}
|
|
1464
|
-
if (details.length > 0) {
|
|
1465
|
-
parts.push(theme.ui.muted(`(${details.join(', ')})`));
|
|
1466
|
-
}
|
|
1467
|
-
}
|
|
1468
|
-
return parts.join(' ');
|
|
1469
|
-
}
|
|
1470
|
-
/**
|
|
1471
|
-
* Format a search result summary
|
|
1472
|
-
*/
|
|
1473
|
-
export function formatSearchOpSummary(pattern, matchCount, fileCount, durationMs) {
|
|
1474
|
-
const truncPattern = pattern.length > 25 ? `${pattern.slice(0, 22)}...` : pattern;
|
|
1475
|
-
if (matchCount === 0) {
|
|
1476
|
-
return `${theme.warning(icons.pending)} No matches for "${truncPattern}"`;
|
|
1477
|
-
}
|
|
1478
|
-
const parts = [
|
|
1479
|
-
`${theme.success(icons.success)} Found`,
|
|
1480
|
-
theme.info(`${matchCount}`),
|
|
1481
|
-
matchCount === 1 ? 'match' : 'matches',
|
|
1482
|
-
];
|
|
1483
|
-
if (fileCount && fileCount > 0) {
|
|
1484
|
-
parts.push('in', theme.info(`${fileCount}`), fileCount === 1 ? 'file' : 'files');
|
|
1485
|
-
}
|
|
1486
|
-
parts.push(theme.ui.muted(`for "${truncPattern}"`));
|
|
1487
|
-
if (durationMs) {
|
|
1488
|
-
parts.push(theme.ui.muted(`(${formatDuration(durationMs)})`));
|
|
1489
|
-
}
|
|
1490
|
-
return parts.join(' ');
|
|
1491
|
-
}
|
|
1492
|
-
/**
|
|
1493
|
-
* Format a context usage badge
|
|
1494
|
-
*/
|
|
1495
|
-
export function formatContextBadge(usedPercentage) {
|
|
1496
|
-
const remaining = 100 - usedPercentage;
|
|
1497
|
-
const color = usedPercentage > 80 ? theme.error :
|
|
1498
|
-
usedPercentage > 60 ? theme.warning : theme.success;
|
|
1499
|
-
return `${color(icons.context)}${remaining}%`;
|
|
1500
|
-
}
|
|
1501
1370
|
//# sourceMappingURL=toolDisplay.js.map
|