mu-harness 0.26.0 → 0.27.0

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.
@@ -75,6 +75,7 @@ export declare class ChatApp {
75
75
  private unsubscribeTheme;
76
76
  private unsubscribeSubAgents;
77
77
  private unsubscribeModelLoading;
78
+ private modelLoading;
78
79
  private readonly runUnsubs;
79
80
  private readonly activeRuns;
80
81
  private mentionAc;
@@ -103,6 +103,7 @@ export class ChatApp {
103
103
  unsubscribeTheme;
104
104
  unsubscribeSubAgents;
105
105
  unsubscribeModelLoading;
106
+ modelLoading = false;
106
107
  runUnsubs = new Set();
107
108
  activeRuns = new Set();
108
109
  mentionAc;
@@ -431,13 +432,18 @@ export class ChatApp {
431
432
  this.queue.length = 0;
432
433
  this.pendingShell.length = 0;
433
434
  this.running = false;
434
- this.status.busy = false;
435
435
  this.status.context = '';
436
- this.stopSpinner();
437
- this.setStatus('ready');
436
+ // A model switch sets this session swap in motion AND kicks off a model load;
437
+ // don't stomp the "loading…" spinner the load just put up.
438
+ if (!this.modelLoading) {
439
+ this.status.busy = false;
440
+ this.stopSpinner();
441
+ this.setStatus('ready');
442
+ }
438
443
  this.tui.requestRender(true);
439
444
  }
440
445
  onModelLoading(model, loading) {
446
+ this.modelLoading = loading;
441
447
  const name = model.split('/').pop() ?? model;
442
448
  if (loading) {
443
449
  this.status.busy = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mu-harness",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
4
4
  "description": "Agent harness: createHarness wires mu-core into a host — XDG paths, model registry, plugins, disk-loaded agents & skills, sub-agents, sessions (JSONL + SQLite catalog), slash commands, permission/approval hooks, an optional scheduler, and a composable TUI chat app",
5
5
  "license": "MIT",
6
6
  "main": "./script/index.js",
@@ -23,8 +23,8 @@
23
23
  "@swc/wasm-typescript": "^1.15.0",
24
24
  "cli-highlight": "^2.1.11",
25
25
  "croner": "^9.0.0",
26
- "mu-core": "^0.26.0",
27
- "mu-tui": "^0.26.0",
26
+ "mu-core": "^0.27.0",
27
+ "mu-tui": "^0.27.0",
28
28
  "ws": "^8.18.0"
29
29
  },
30
30
  "_generatedBy": "dnt@dev",
@@ -75,6 +75,7 @@ export declare class ChatApp {
75
75
  private unsubscribeTheme;
76
76
  private unsubscribeSubAgents;
77
77
  private unsubscribeModelLoading;
78
+ private modelLoading;
78
79
  private readonly runUnsubs;
79
80
  private readonly activeRuns;
80
81
  private mentionAc;
@@ -106,6 +106,7 @@ class ChatApp {
106
106
  unsubscribeTheme;
107
107
  unsubscribeSubAgents;
108
108
  unsubscribeModelLoading;
109
+ modelLoading = false;
109
110
  runUnsubs = new Set();
110
111
  activeRuns = new Set();
111
112
  mentionAc;
@@ -434,13 +435,18 @@ class ChatApp {
434
435
  this.queue.length = 0;
435
436
  this.pendingShell.length = 0;
436
437
  this.running = false;
437
- this.status.busy = false;
438
438
  this.status.context = '';
439
- this.stopSpinner();
440
- this.setStatus('ready');
439
+ // A model switch sets this session swap in motion AND kicks off a model load;
440
+ // don't stomp the "loading…" spinner the load just put up.
441
+ if (!this.modelLoading) {
442
+ this.status.busy = false;
443
+ this.stopSpinner();
444
+ this.setStatus('ready');
445
+ }
441
446
  this.tui.requestRender(true);
442
447
  }
443
448
  onModelLoading(model, loading) {
449
+ this.modelLoading = loading;
444
450
  const name = model.split('/').pop() ?? model;
445
451
  if (loading) {
446
452
  this.status.busy = true;