@g9tm/aiassistant 1.9.3 → 1.9.4

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/assistant.js CHANGED
@@ -81,7 +81,14 @@ export class Assistant {
81
81
  }
82
82
  /** A new conversation. */
83
83
  fresh() {
84
+ // A run still working belongs to the old conversation: it is cancelled on the server (no tokens spent on an answer
85
+ // nobody waits for) and dropped here — kept, it held «busy» for good and every later question was refused (a
86
+ // host's eval battery, 2026-11-28).
87
+ const working = this.run !== null && !finished(this.run) ? this.run.runId : null;
84
88
  this.follow(null);
89
+ this.run = null;
90
+ if (working)
91
+ void this.api.cancel(working).catch(() => undefined);
85
92
  this.store.reset(null);
86
93
  this.plans.clear();
87
94
  this.attachments = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@g9tm/aiassistant",
3
- "version": "1.9.3",
3
+ "version": "1.9.4",
4
4
  "description": "Headless client of the G9 AI assistant: API client, run state, transports, block view models, safe text and Persian helpers. No DOM, no framework.",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -33,7 +33,7 @@
33
33
  "access": "public"
34
34
  },
35
35
  "dependencies": {
36
- "@g9tm/aiassistant-contracts": "1.9.3"
36
+ "@g9tm/aiassistant-contracts": "1.9.4"
37
37
  },
38
38
  "scripts": {
39
39
  "build": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && tsc -p tsconfig.json",