erosolar-cli 1.7.428 → 1.7.429
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 +1 -0
- package/dist/shell/interactiveShell.d.ts.map +1 -1
- package/dist/shell/interactiveShell.js +15 -10
- package/dist/shell/interactiveShell.js.map +1 -1
- package/dist/shell/systemPrompt.d.ts.map +1 -1
- package/dist/shell/systemPrompt.js +3 -2
- package/dist/shell/systemPrompt.js.map +1 -1
- package/dist/ui/ShellUIAdapter.d.ts +2 -7
- package/dist/ui/ShellUIAdapter.d.ts.map +1 -1
- package/dist/ui/ShellUIAdapter.js +13 -47
- package/dist/ui/ShellUIAdapter.js.map +1 -1
- package/dist/ui/display.d.ts.map +1 -1
- package/dist/ui/display.js +1 -0
- package/dist/ui/display.js.map +1 -1
- package/dist/ui/streamingFormatter.d.ts +2 -7
- package/dist/ui/streamingFormatter.d.ts.map +1 -1
- package/dist/ui/streamingFormatter.js +10 -36
- package/dist/ui/streamingFormatter.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* StreamingResponseFormatter
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* Claude Code style: Streaming responses use ⏺ bullet prefix with continuation indent
|
|
4
|
+
* First line gets the bullet, subsequent lines are indented to align
|
|
5
5
|
*/
|
|
6
6
|
export declare class StreamingResponseFormatter {
|
|
7
7
|
private readonly bulletPrefix;
|
|
8
8
|
private readonly indentPrefix;
|
|
9
|
-
private hasStartedEvent;
|
|
10
9
|
private lineOpen;
|
|
11
10
|
private currentLine;
|
|
12
11
|
private nextLinePrefix;
|
|
@@ -17,10 +16,6 @@ export declare class StreamingResponseFormatter {
|
|
|
17
16
|
note?: string;
|
|
18
17
|
mode?: 'update' | 'complete' | 'stop' | 'quit';
|
|
19
18
|
}): string;
|
|
20
|
-
private decorateLine;
|
|
21
|
-
private isThoughtBoundary;
|
|
22
|
-
private isBlankLine;
|
|
23
|
-
private lineDecoration;
|
|
24
19
|
private resetState;
|
|
25
20
|
private modeIcon;
|
|
26
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streamingFormatter.d.ts","sourceRoot":"","sources":["../../src/ui/streamingFormatter.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,qBAAa,0BAA0B;IACrC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"streamingFormatter.d.ts","sourceRoot":"","sources":["../../src/ui/streamingFormatter.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,qBAAa,0BAA0B;IACrC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,WAAW,CAAM;IACzB,OAAO,CAAC,cAAc,CAAS;gBAEnB,OAAO,CAAC,EAAE,MAAM;IAO5B,MAAM,IAAI,MAAM;IAKhB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAgClC,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;IAuBpG,OAAO,CAAC,UAAU;IAMlB,OAAO,CAAC,QAAQ;CAajB"}
|
|
@@ -1,27 +1,23 @@
|
|
|
1
1
|
import { theme } from './theme.js';
|
|
2
2
|
/**
|
|
3
3
|
* StreamingResponseFormatter
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Claude Code style: Streaming responses use ⏺ bullet prefix with continuation indent
|
|
5
|
+
* First line gets the bullet, subsequent lines are indented to align
|
|
6
6
|
*/
|
|
7
7
|
export class StreamingResponseFormatter {
|
|
8
8
|
bulletPrefix;
|
|
9
9
|
indentPrefix;
|
|
10
|
-
hasStartedEvent = false;
|
|
11
10
|
lineOpen = false;
|
|
12
11
|
currentLine = '';
|
|
13
12
|
nextLinePrefix;
|
|
14
13
|
constructor(columns) {
|
|
15
|
-
// Columns are kept for compatibility with previous versions; currently unused
|
|
16
14
|
clamp(columns ?? 80, 48, 110);
|
|
17
15
|
this.bulletPrefix = `${theme.info('⏺')} `;
|
|
18
|
-
|
|
19
|
-
this.indentPrefix = ' ';
|
|
16
|
+
this.indentPrefix = ' '; // 2 spaces to align with bullet
|
|
20
17
|
this.nextLinePrefix = this.bulletPrefix;
|
|
21
18
|
}
|
|
22
19
|
header() {
|
|
23
|
-
|
|
24
|
-
// Keep header minimal so the first bullet is the thought itself
|
|
20
|
+
// Start with newline before first bullet
|
|
25
21
|
return '\n';
|
|
26
22
|
}
|
|
27
23
|
formatChunk(chunk) {
|
|
@@ -34,16 +30,15 @@ export class StreamingResponseFormatter {
|
|
|
34
30
|
if (!this.lineOpen) {
|
|
35
31
|
result += this.nextLinePrefix;
|
|
36
32
|
this.lineOpen = true;
|
|
37
|
-
|
|
33
|
+
// After first line with bullet, use indent
|
|
38
34
|
this.nextLinePrefix = this.indentPrefix;
|
|
39
35
|
}
|
|
40
36
|
if (char === '\n') {
|
|
41
37
|
result += '\n';
|
|
42
|
-
// Start a fresh bullet after status-bearing or blank lines
|
|
43
|
-
const boundary = this.isThoughtBoundary(this.currentLine) || this.isBlankLine(this.currentLine);
|
|
44
38
|
this.lineOpen = false;
|
|
45
39
|
this.currentLine = '';
|
|
46
|
-
|
|
40
|
+
// Continue with indent for next line
|
|
41
|
+
this.nextLinePrefix = this.indentPrefix;
|
|
47
42
|
continue;
|
|
48
43
|
}
|
|
49
44
|
result += char;
|
|
@@ -56,41 +51,20 @@ export class StreamingResponseFormatter {
|
|
|
56
51
|
const note = resolved.note?.trim();
|
|
57
52
|
const mode = resolved.mode ?? 'complete';
|
|
58
53
|
let output = '';
|
|
59
|
-
// Close any open line
|
|
54
|
+
// Close any open line
|
|
60
55
|
if (this.lineOpen) {
|
|
61
|
-
const decoration = this.lineDecoration();
|
|
62
|
-
if (decoration) {
|
|
63
|
-
output += decoration;
|
|
64
|
-
}
|
|
65
56
|
output += '\n';
|
|
66
57
|
}
|
|
58
|
+
// Claude Code: Status notes shown with indent
|
|
67
59
|
if (note) {
|
|
68
60
|
const icon = this.modeIcon(mode);
|
|
69
|
-
const prefix = this.hasStartedEvent ? this.indentPrefix : this.bulletPrefix;
|
|
70
61
|
const statusText = icon ? `${icon} ${note}` : note;
|
|
71
|
-
output += `${
|
|
62
|
+
output += `${this.indentPrefix}${statusText}\n`;
|
|
72
63
|
}
|
|
73
64
|
this.resetState();
|
|
74
65
|
return output;
|
|
75
66
|
}
|
|
76
|
-
decorateLine(line) {
|
|
77
|
-
return '';
|
|
78
|
-
}
|
|
79
|
-
isThoughtBoundary(line) {
|
|
80
|
-
const normalized = line.trim();
|
|
81
|
-
if (!normalized) {
|
|
82
|
-
return false;
|
|
83
|
-
}
|
|
84
|
-
return /⎿\s*(\d+\s+lines?|completed|done|stopped|cancelled)/i.test(normalized);
|
|
85
|
-
}
|
|
86
|
-
isBlankLine(line) {
|
|
87
|
-
return line.trim().length === 0;
|
|
88
|
-
}
|
|
89
|
-
lineDecoration() {
|
|
90
|
-
return this.decorateLine(this.currentLine);
|
|
91
|
-
}
|
|
92
67
|
resetState() {
|
|
93
|
-
this.hasStartedEvent = false;
|
|
94
68
|
this.lineOpen = false;
|
|
95
69
|
this.currentLine = '';
|
|
96
70
|
this.nextLinePrefix = this.bulletPrefix;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streamingFormatter.js","sourceRoot":"","sources":["../../src/ui/streamingFormatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC;;;;GAIG;AACH,MAAM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,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,YAAY,CAAC;IAC1C,CAAC;IAEO,QAAQ,CAAC,IAA6C;QAC5D,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,QAAQ;gBACX,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACzB,KAAK,MAAM;gBACT,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAC5B,KAAK,MAAM;gBACT,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC1B,KAAK,UAAU,CAAC;YAChB;gBACE,OAAO,IAAI,CAAC;QAChB,CAAC;IACH,CAAC;CACF;AAED,SAAS,KAAK,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW;IACpD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAC7C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "erosolar-cli",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.429",
|
|
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",
|