ide-assi 0.88.0 → 0.91.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.
@@ -193480,10 +193480,20 @@ class IdeAi
193480
193480
  new HumanMessage(prompt),
193481
193481
  ]);
193482
193482
 
193483
- const a = IdeUtils.extractResponse(response, this.#parent.settings.server);
193484
- console.log(a);
193483
+ const o = IdeUtils.extractResponse(response, this.#parent.settings.server);
193484
+ if (Object.prototype.toString.call(o) === "[object Object]" && o.hasOwnProperty("result")) {
193485
+ if (o.result == "0") {
193486
+ //return o.reason;
193487
+ throw new Error(o.reason);
193488
+ }
193489
+ }
193490
+ else {
193491
+ throw new Error(o);
193492
+ }
193493
+
193485
193494
 
193486
193495
 
193496
+ return "OK";
193487
193497
  }
193488
193498
  }
193489
193499
 
@@ -193582,7 +193592,7 @@ class IdeAssi extends HTMLElement
193582
193592
  //this.#createModel();
193583
193593
 
193584
193594
  const r = await this.#ai.generateSourceClient(userPrompt);
193585
- elAiChat.add("ai", r);
193595
+ //elAiChat.add("ai", r);
193586
193596
 
193587
193597
  /**
193588
193598
  const r = await this.#ai.generateSource(userPrompt);
@@ -193476,10 +193476,20 @@ class IdeAi
193476
193476
  new HumanMessage(prompt),
193477
193477
  ]);
193478
193478
 
193479
- const a = IdeUtils.extractResponse(response, this.#parent.settings.server);
193480
- console.log(a);
193479
+ const o = IdeUtils.extractResponse(response, this.#parent.settings.server);
193480
+ if (Object.prototype.toString.call(o) === "[object Object]" && o.hasOwnProperty("result")) {
193481
+ if (o.result == "0") {
193482
+ //return o.reason;
193483
+ throw new Error(o.reason);
193484
+ }
193485
+ }
193486
+ else {
193487
+ throw new Error(o);
193488
+ }
193489
+
193481
193490
 
193482
193491
 
193492
+ return "OK";
193483
193493
  }
193484
193494
  }
193485
193495
 
@@ -193578,7 +193588,7 @@ class IdeAssi extends HTMLElement
193578
193588
  //this.#createModel();
193579
193589
 
193580
193590
  const r = await this.#ai.generateSourceClient(userPrompt);
193581
- elAiChat.add("ai", r);
193591
+ //elAiChat.add("ai", r);
193582
193592
 
193583
193593
  /**
193584
193594
  const r = await this.#ai.generateSource(userPrompt);
@@ -185,10 +185,20 @@ export class IdeAi
185
185
  new HumanMessage(prompt),
186
186
  ]);
187
187
 
188
- const a = IdeUtils.extractResponse(response, this.#parent.settings.server);
189
- console.log(a);
188
+ const o = IdeUtils.extractResponse(response, this.#parent.settings.server);
189
+ if (Object.prototype.toString.call(o) === "[object Object]" && o.hasOwnProperty("result")) {
190
+ if (o.result == "0") {
191
+ //return o.reason;
192
+ throw new Error(o.reason);
193
+ }
194
+ }
195
+ else {
196
+ throw new Error(o);
197
+ }
198
+
190
199
 
191
200
 
201
+ return "OK";
192
202
  }
193
203
  }
194
204
 
@@ -96,7 +96,7 @@ export class IdeAssi extends HTMLElement
96
96
  //this.#createModel();
97
97
 
98
98
  const r = await this.#ai.generateSourceClient(userPrompt);
99
- elAiChat.add("ai", r);
99
+ //elAiChat.add("ai", r);
100
100
 
101
101
  /**
102
102
  const r = await this.#ai.generateSource(userPrompt);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.88.0",
4
+ "version": "0.91.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -185,10 +185,20 @@ export class IdeAi
185
185
  new HumanMessage(prompt),
186
186
  ]);
187
187
 
188
- const a = IdeUtils.extractResponse(response, this.#parent.settings.server);
189
- console.log(a);
188
+ const o = IdeUtils.extractResponse(response, this.#parent.settings.server);
189
+ if (Object.prototype.toString.call(o) === "[object Object]" && o.hasOwnProperty("result")) {
190
+ if (o.result == "0") {
191
+ //return o.reason;
192
+ throw new Error(o.reason);
193
+ }
194
+ }
195
+ else {
196
+ throw new Error(o);
197
+ }
198
+
190
199
 
191
200
 
201
+ return "OK";
192
202
  }
193
203
  }
194
204
 
@@ -96,7 +96,7 @@ export class IdeAssi extends HTMLElement
96
96
  //this.#createModel();
97
97
 
98
98
  const r = await this.#ai.generateSourceClient(userPrompt);
99
- elAiChat.add("ai", r);
99
+ //elAiChat.add("ai", r);
100
100
 
101
101
  /**
102
102
  const r = await this.#ai.generateSource(userPrompt);