@genai-fi/nanogpt 1.1.0 → 1.1.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.
@@ -66,6 +66,7 @@ export default class Responses {
66
66
  * @returns `true` if the response exists and was hooked, otherwise `false`
67
67
  */
68
68
  hook(id: string): boolean;
69
+ unhook(id: string): void;
69
70
  /**
70
71
  * Resume a previously hooked response, releasing a single paused chunk.
71
72
  * @param id Response ID to resume
@@ -151,6 +151,9 @@ var r = class {
151
151
  hook(e) {
152
152
  return this._responses.has(e) ? (this._hookedResponses.add(e), !0) : !1;
153
153
  }
154
+ unhook(e) {
155
+ this._hookedResponses.delete(e), (this._resumeWaiters.get(e) || []).forEach((e) => e()), this._resumeWaiters.delete(e);
156
+ }
154
157
  resume(e) {
155
158
  let t = this._resumeWaiters.get(e);
156
159
  if (!t || t.length === 0) return this._hookedResponses.has(e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genai-fi/nanogpt",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "type": "module",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",