@robota-sdk/agent-cli 3.0.0-beta.50 → 3.0.0-beta.51
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/node/bin.js
CHANGED
|
@@ -169,6 +169,26 @@ import { randomUUID } from "crypto";
|
|
|
169
169
|
|
|
170
170
|
// src/ui/tui-state-manager.ts
|
|
171
171
|
var MAX_RENDERED_MESSAGES = 100;
|
|
172
|
+
var STREAMING_DEBOUNCE_MS = 300;
|
|
173
|
+
function createDebouncedNotify(notify, ms) {
|
|
174
|
+
let timer = null;
|
|
175
|
+
return {
|
|
176
|
+
schedule() {
|
|
177
|
+
if (!timer) {
|
|
178
|
+
timer = setTimeout(() => {
|
|
179
|
+
timer = null;
|
|
180
|
+
notify();
|
|
181
|
+
}, ms);
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
flush() {
|
|
185
|
+
if (timer) {
|
|
186
|
+
clearTimeout(timer);
|
|
187
|
+
timer = null;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
}
|
|
172
192
|
var TuiStateManager = class {
|
|
173
193
|
// ── Rendering state ───────────────────────────────────────────
|
|
174
194
|
history = [];
|
|
@@ -182,6 +202,7 @@ var TuiStateManager = class {
|
|
|
182
202
|
onChange = null;
|
|
183
203
|
// ── Internal ──────────────────────────────────────────────────
|
|
184
204
|
streamBuf = "";
|
|
205
|
+
debouncedStreamNotify = createDebouncedNotify(() => this.notify(), STREAMING_DEBOUNCE_MS);
|
|
185
206
|
notify() {
|
|
186
207
|
this.onChange?.();
|
|
187
208
|
}
|
|
@@ -189,7 +210,7 @@ var TuiStateManager = class {
|
|
|
189
210
|
onTextDelta = (delta) => {
|
|
190
211
|
this.streamBuf += delta;
|
|
191
212
|
this.streamingText = this.streamBuf;
|
|
192
|
-
this.
|
|
213
|
+
this.debouncedStreamNotify.schedule();
|
|
193
214
|
};
|
|
194
215
|
onToolStart = (state) => {
|
|
195
216
|
this.activeTools = [...this.activeTools, state];
|
|
@@ -207,6 +228,7 @@ var TuiStateManager = class {
|
|
|
207
228
|
onThinking = (thinking) => {
|
|
208
229
|
this.isThinking = thinking;
|
|
209
230
|
if (thinking) {
|
|
231
|
+
this.debouncedStreamNotify.flush();
|
|
210
232
|
this.streamBuf = "";
|
|
211
233
|
this.streamingText = "";
|
|
212
234
|
this.activeTools = [];
|
|
@@ -216,6 +238,7 @@ var TuiStateManager = class {
|
|
|
216
238
|
this.notify();
|
|
217
239
|
};
|
|
218
240
|
onComplete = (result) => {
|
|
241
|
+
this.debouncedStreamNotify.flush();
|
|
219
242
|
this.streamBuf = "";
|
|
220
243
|
this.streamingText = "";
|
|
221
244
|
this.activeTools = [];
|
|
@@ -227,12 +250,14 @@ var TuiStateManager = class {
|
|
|
227
250
|
this.notify();
|
|
228
251
|
};
|
|
229
252
|
onInterrupted = () => {
|
|
253
|
+
this.debouncedStreamNotify.flush();
|
|
230
254
|
this.streamBuf = "";
|
|
231
255
|
this.streamingText = "";
|
|
232
256
|
this.activeTools = [];
|
|
233
257
|
this.notify();
|
|
234
258
|
};
|
|
235
259
|
onError = () => {
|
|
260
|
+
this.debouncedStreamNotify.flush();
|
|
236
261
|
this.streamBuf = "";
|
|
237
262
|
this.streamingText = "";
|
|
238
263
|
this.activeTools = [];
|
package/dist/node/index.cjs
CHANGED
|
@@ -197,6 +197,26 @@ var import_node_crypto = require("crypto");
|
|
|
197
197
|
|
|
198
198
|
// src/ui/tui-state-manager.ts
|
|
199
199
|
var MAX_RENDERED_MESSAGES = 100;
|
|
200
|
+
var STREAMING_DEBOUNCE_MS = 300;
|
|
201
|
+
function createDebouncedNotify(notify, ms) {
|
|
202
|
+
let timer = null;
|
|
203
|
+
return {
|
|
204
|
+
schedule() {
|
|
205
|
+
if (!timer) {
|
|
206
|
+
timer = setTimeout(() => {
|
|
207
|
+
timer = null;
|
|
208
|
+
notify();
|
|
209
|
+
}, ms);
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
flush() {
|
|
213
|
+
if (timer) {
|
|
214
|
+
clearTimeout(timer);
|
|
215
|
+
timer = null;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
}
|
|
200
220
|
var TuiStateManager = class {
|
|
201
221
|
// ── Rendering state ───────────────────────────────────────────
|
|
202
222
|
history = [];
|
|
@@ -210,6 +230,7 @@ var TuiStateManager = class {
|
|
|
210
230
|
onChange = null;
|
|
211
231
|
// ── Internal ──────────────────────────────────────────────────
|
|
212
232
|
streamBuf = "";
|
|
233
|
+
debouncedStreamNotify = createDebouncedNotify(() => this.notify(), STREAMING_DEBOUNCE_MS);
|
|
213
234
|
notify() {
|
|
214
235
|
this.onChange?.();
|
|
215
236
|
}
|
|
@@ -217,7 +238,7 @@ var TuiStateManager = class {
|
|
|
217
238
|
onTextDelta = (delta) => {
|
|
218
239
|
this.streamBuf += delta;
|
|
219
240
|
this.streamingText = this.streamBuf;
|
|
220
|
-
this.
|
|
241
|
+
this.debouncedStreamNotify.schedule();
|
|
221
242
|
};
|
|
222
243
|
onToolStart = (state) => {
|
|
223
244
|
this.activeTools = [...this.activeTools, state];
|
|
@@ -235,6 +256,7 @@ var TuiStateManager = class {
|
|
|
235
256
|
onThinking = (thinking) => {
|
|
236
257
|
this.isThinking = thinking;
|
|
237
258
|
if (thinking) {
|
|
259
|
+
this.debouncedStreamNotify.flush();
|
|
238
260
|
this.streamBuf = "";
|
|
239
261
|
this.streamingText = "";
|
|
240
262
|
this.activeTools = [];
|
|
@@ -244,6 +266,7 @@ var TuiStateManager = class {
|
|
|
244
266
|
this.notify();
|
|
245
267
|
};
|
|
246
268
|
onComplete = (result) => {
|
|
269
|
+
this.debouncedStreamNotify.flush();
|
|
247
270
|
this.streamBuf = "";
|
|
248
271
|
this.streamingText = "";
|
|
249
272
|
this.activeTools = [];
|
|
@@ -255,12 +278,14 @@ var TuiStateManager = class {
|
|
|
255
278
|
this.notify();
|
|
256
279
|
};
|
|
257
280
|
onInterrupted = () => {
|
|
281
|
+
this.debouncedStreamNotify.flush();
|
|
258
282
|
this.streamBuf = "";
|
|
259
283
|
this.streamingText = "";
|
|
260
284
|
this.activeTools = [];
|
|
261
285
|
this.notify();
|
|
262
286
|
};
|
|
263
287
|
onError = () => {
|
|
288
|
+
this.debouncedStreamNotify.flush();
|
|
264
289
|
this.streamBuf = "";
|
|
265
290
|
this.streamingText = "";
|
|
266
291
|
this.activeTools = [];
|
package/dist/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robota-sdk/agent-cli",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.51",
|
|
4
4
|
"description": "AI coding assistant CLI built on Robota SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dist"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@robota-sdk/agent-sessions": "3.0.0-beta.
|
|
36
|
+
"@robota-sdk/agent-sessions": "3.0.0-beta.51",
|
|
37
37
|
"chalk": "^5.3.0",
|
|
38
38
|
"cli-highlight": "^2.1.0",
|
|
39
39
|
"ink": "^6.8.0",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"marked-terminal": "^7.3.0",
|
|
45
45
|
"react": "19.2.4",
|
|
46
46
|
"string-width": "^8.2.0",
|
|
47
|
-
"@robota-sdk/agent-core": "3.0.0-beta.
|
|
48
|
-
"@robota-sdk/agent-provider-anthropic": "3.0.0-beta.
|
|
49
|
-
"@robota-sdk/agent-
|
|
50
|
-
"@robota-sdk/agent-
|
|
47
|
+
"@robota-sdk/agent-core": "3.0.0-beta.51",
|
|
48
|
+
"@robota-sdk/agent-provider-anthropic": "3.0.0-beta.51",
|
|
49
|
+
"@robota-sdk/agent-sdk": "3.0.0-beta.51",
|
|
50
|
+
"@robota-sdk/agent-transport-headless": "3.0.0-beta.51"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/marked": "^6.0.0",
|