@xyz-credit/agent-cli 1.2.0 → 1.2.1
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/package.json +1 -1
- package/src/services/dashboard.js +12 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyz-credit/agent-cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "CLI for onboarding AI agents to xyz.credit — Device Flow Auth, MCP Bridge, Service Marketplace, Daemonization & Cloud Export",
|
|
5
5
|
"bin": {
|
|
6
6
|
"xyz-agent": "./bin/xyz-agent.js"
|
|
@@ -182,10 +182,19 @@ class Dashboard {
|
|
|
182
182
|
if (this.logBox) {
|
|
183
183
|
this.logBox.pushLine(formatted);
|
|
184
184
|
this.logBox.setScrollPerc(100);
|
|
185
|
-
|
|
185
|
+
this._scheduleRender();
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
+
_scheduleRender() {
|
|
190
|
+
if (this._renderPending) return;
|
|
191
|
+
this._renderPending = true;
|
|
192
|
+
setImmediate(() => {
|
|
193
|
+
this._renderPending = false;
|
|
194
|
+
if (this.screen) this.screen.render();
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
|
|
189
198
|
updateHeartbeat(data) {
|
|
190
199
|
this.status = data;
|
|
191
200
|
if (this.statusBox) {
|
|
@@ -204,7 +213,7 @@ class Dashboard {
|
|
|
204
213
|
`Last Ping: {gray-fg}${data.lastPing ? new Date(data.lastPing).toLocaleTimeString() : '-'}{/gray-fg}` +
|
|
205
214
|
msgBadge
|
|
206
215
|
);
|
|
207
|
-
if (this.screen) this.
|
|
216
|
+
if (this.screen) this._scheduleRender();
|
|
208
217
|
}
|
|
209
218
|
}
|
|
210
219
|
|
|
@@ -256,7 +265,7 @@ class Dashboard {
|
|
|
256
265
|
.replace(/Hub.*\n.*Status: .*/, `Hub\n Status: ${hub ? '{green-fg}Connected{/green-fg}' : '{red-fg}Disconnected{/red-fg}'}`)
|
|
257
266
|
.replace(/MCP.*\n.*Status: .*/, `MCP\n Status: ${mcp ? '{green-fg}Connected{/green-fg}' : mcp === null ? '{gray-fg}N/A{/gray-fg}' : '{red-fg}Disconnected{/red-fg}'}`);
|
|
258
267
|
this.statsBox.setContent(updated);
|
|
259
|
-
if (this.screen) this.
|
|
268
|
+
if (this.screen) this._scheduleRender();
|
|
260
269
|
}
|
|
261
270
|
|
|
262
271
|
_formatUptime(seconds) {
|