erosolar-cli 2.1.97 → 2.1.98
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 -1
- package/dist/shell/interactiveShell.d.ts.map +1 -1
- package/dist/shell/interactiveShell.js +2 -13
- package/dist/shell/interactiveShell.js.map +1 -1
- package/package.json +1 -1
- package/dist/ui/streamingFormatter.d.ts +0 -32
- package/dist/ui/streamingFormatter.d.ts.map +0 -1
- package/dist/ui/streamingFormatter.js +0 -141
- package/dist/ui/streamingFormatter.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "erosolar-cli",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.98",
|
|
4
4
|
"description": "Unified AI agent framework for the command line - Multi-provider support with schema-driven tools, code intelligence, and transparent reasoning",
|
|
5
5
|
"main": "dist/bin/erosolar.js",
|
|
6
6
|
"type": "module",
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* StreamingResponseFormatter
|
|
3
|
-
* Claude Code style: Format streaming content with ⏺ bullet prefix.
|
|
4
|
-
* First line gets bullet, continuation lines are indented.
|
|
5
|
-
*/
|
|
6
|
-
export declare class StreamingResponseFormatter {
|
|
7
|
-
private lineOpen;
|
|
8
|
-
private currentLine;
|
|
9
|
-
private mode;
|
|
10
|
-
private isFirstLine;
|
|
11
|
-
private columns;
|
|
12
|
-
constructor(columns?: number);
|
|
13
|
-
header(): string;
|
|
14
|
-
/**
|
|
15
|
-
* Set the streaming mode (content vs reasoning)
|
|
16
|
-
* Reasoning chunks are visually distinguished with muted styling
|
|
17
|
-
*/
|
|
18
|
-
setMode(mode: 'content' | 'reasoning'): void;
|
|
19
|
-
formatChunk(chunk: string): string;
|
|
20
|
-
/**
|
|
21
|
-
* Format reasoning chunk with visual indicator
|
|
22
|
-
* Used for extended thinking mode - uses muted ○ prefix
|
|
23
|
-
*/
|
|
24
|
-
formatReasoningChunk(chunk: string): string;
|
|
25
|
-
finish(options?: string | {
|
|
26
|
-
note?: string;
|
|
27
|
-
mode?: 'update' | 'complete' | 'stop' | 'quit';
|
|
28
|
-
}): string;
|
|
29
|
-
private resetState;
|
|
30
|
-
private modeIcon;
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=streamingFormatter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"streamingFormatter.d.ts","sourceRoot":"","sources":["../../src/ui/streamingFormatter.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,qBAAa,0BAA0B;IACrC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,WAAW,CAAM;IACzB,OAAO,CAAC,IAAI,CAAsC;IAClD,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,OAAO,CAAS;gBAEZ,OAAO,CAAC,EAAE,MAAM;IAI5B,MAAM,IAAI,MAAM;IAMhB;;;OAGG;IACH,OAAO,CAAC,IAAI,EAAE,SAAS,GAAG,WAAW,GAAG,IAAI;IAI5C,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IA0ClC;;;OAGG;IACH,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAqC3C,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,MAAM;IAsBpG,OAAO,CAAC,UAAU;IAMlB,OAAO,CAAC,QAAQ;CAajB"}
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import { theme } from './theme.js';
|
|
2
|
-
const BULLET = '⏺';
|
|
3
|
-
const INDENT = ' '; // 2 spaces for continuation lines
|
|
4
|
-
/**
|
|
5
|
-
* StreamingResponseFormatter
|
|
6
|
-
* Claude Code style: Format streaming content with ⏺ bullet prefix.
|
|
7
|
-
* First line gets bullet, continuation lines are indented.
|
|
8
|
-
*/
|
|
9
|
-
export class StreamingResponseFormatter {
|
|
10
|
-
lineOpen = false;
|
|
11
|
-
currentLine = '';
|
|
12
|
-
mode = 'content';
|
|
13
|
-
isFirstLine = true; // Track if we've output the bullet yet
|
|
14
|
-
columns;
|
|
15
|
-
constructor(columns) {
|
|
16
|
-
this.columns = clamp(columns ?? 80, 48, 110);
|
|
17
|
-
}
|
|
18
|
-
header() {
|
|
19
|
-
// Start on a clean line before streaming content
|
|
20
|
-
this.isFirstLine = true;
|
|
21
|
-
return '\n';
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Set the streaming mode (content vs reasoning)
|
|
25
|
-
* Reasoning chunks are visually distinguished with muted styling
|
|
26
|
-
*/
|
|
27
|
-
setMode(mode) {
|
|
28
|
-
this.mode = mode;
|
|
29
|
-
}
|
|
30
|
-
formatChunk(chunk) {
|
|
31
|
-
if (!chunk) {
|
|
32
|
-
return '';
|
|
33
|
-
}
|
|
34
|
-
const normalized = chunk.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
|
|
35
|
-
// Build output with bullet formatting
|
|
36
|
-
let output = '';
|
|
37
|
-
const chars = normalized.split('');
|
|
38
|
-
for (const char of chars) {
|
|
39
|
-
// Add bullet prefix for first character of first line
|
|
40
|
-
if (this.isFirstLine && !this.lineOpen) {
|
|
41
|
-
output += `${BULLET} `;
|
|
42
|
-
this.isFirstLine = false;
|
|
43
|
-
this.lineOpen = true;
|
|
44
|
-
}
|
|
45
|
-
if (char === '\n') {
|
|
46
|
-
output += char;
|
|
47
|
-
this.lineOpen = false;
|
|
48
|
-
this.currentLine = '';
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
// If starting a new line after newline, add indent
|
|
52
|
-
if (!this.lineOpen) {
|
|
53
|
-
output += INDENT;
|
|
54
|
-
this.lineOpen = true;
|
|
55
|
-
}
|
|
56
|
-
output += char;
|
|
57
|
-
this.currentLine += char;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
// Apply visual distinction for reasoning blocks
|
|
61
|
-
const formatted = this.mode === 'reasoning'
|
|
62
|
-
? theme.ui.muted(output)
|
|
63
|
-
: output;
|
|
64
|
-
return formatted;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Format reasoning chunk with visual indicator
|
|
68
|
-
* Used for extended thinking mode - uses muted ○ prefix
|
|
69
|
-
*/
|
|
70
|
-
formatReasoningChunk(chunk) {
|
|
71
|
-
if (!chunk) {
|
|
72
|
-
return '';
|
|
73
|
-
}
|
|
74
|
-
const normalized = chunk.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
|
|
75
|
-
// Build output with muted bullet formatting for reasoning
|
|
76
|
-
let output = '';
|
|
77
|
-
const chars = normalized.split('');
|
|
78
|
-
for (const char of chars) {
|
|
79
|
-
// Add muted bullet prefix for first character of first line
|
|
80
|
-
if (this.isFirstLine && !this.lineOpen) {
|
|
81
|
-
output += '○ '; // Muted bullet for reasoning
|
|
82
|
-
this.isFirstLine = false;
|
|
83
|
-
this.lineOpen = true;
|
|
84
|
-
}
|
|
85
|
-
if (char === '\n') {
|
|
86
|
-
output += char;
|
|
87
|
-
this.lineOpen = false;
|
|
88
|
-
this.currentLine = '';
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
// If starting a new line after newline, add indent
|
|
92
|
-
if (!this.lineOpen) {
|
|
93
|
-
output += INDENT;
|
|
94
|
-
this.lineOpen = true;
|
|
95
|
-
}
|
|
96
|
-
output += char;
|
|
97
|
-
this.currentLine += char;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
return theme.ui.muted(output);
|
|
101
|
-
}
|
|
102
|
-
finish(options) {
|
|
103
|
-
const resolved = typeof options === 'string' ? { note: options } : options ?? {};
|
|
104
|
-
const note = resolved.note?.trim();
|
|
105
|
-
const mode = resolved.mode ?? 'complete';
|
|
106
|
-
let output = '';
|
|
107
|
-
// Close any open line so the status note lands on its own line
|
|
108
|
-
if (this.lineOpen) {
|
|
109
|
-
output += '\n';
|
|
110
|
-
}
|
|
111
|
-
if (note) {
|
|
112
|
-
const icon = this.modeIcon(mode);
|
|
113
|
-
const statusText = icon ? `${icon} ${note}` : note;
|
|
114
|
-
output += `${statusText}\n`;
|
|
115
|
-
}
|
|
116
|
-
this.resetState();
|
|
117
|
-
return output;
|
|
118
|
-
}
|
|
119
|
-
resetState() {
|
|
120
|
-
this.lineOpen = false;
|
|
121
|
-
this.currentLine = '';
|
|
122
|
-
this.isFirstLine = true;
|
|
123
|
-
}
|
|
124
|
-
modeIcon(mode) {
|
|
125
|
-
switch (mode) {
|
|
126
|
-
case 'update':
|
|
127
|
-
return theme.info('↺');
|
|
128
|
-
case 'stop':
|
|
129
|
-
return theme.warning('■');
|
|
130
|
-
case 'quit':
|
|
131
|
-
return theme.error('■');
|
|
132
|
-
case 'complete':
|
|
133
|
-
default:
|
|
134
|
-
return null;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
function clamp(value, min, max) {
|
|
139
|
-
return Math.max(min, Math.min(max, value));
|
|
140
|
-
}
|
|
141
|
-
//# sourceMappingURL=streamingFormatter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"streamingFormatter.js","sourceRoot":"","sources":["../../src/ui/streamingFormatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,MAAM,MAAM,GAAG,GAAG,CAAC;AACnB,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,kCAAkC;AAEvD;;;;GAIG;AACH,MAAM,OAAO,0BAA0B;IAC7B,QAAQ,GAAG,KAAK,CAAC;IACjB,WAAW,GAAG,EAAE,CAAC;IACjB,IAAI,GAA4B,SAAS,CAAC;IAC1C,WAAW,GAAG,IAAI,CAAC,CAAC,uCAAuC;IAC3D,OAAO,CAAS;IA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