ide-assi 0.90.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.
@@ -193483,13 +193483,16 @@ class IdeAi
193483
193483
  const o = IdeUtils.extractResponse(response, this.#parent.settings.server);
193484
193484
  if (Object.prototype.toString.call(o) === "[object Object]" && o.hasOwnProperty("result")) {
193485
193485
  if (o.result == "0") {
193486
- return o.reason;
193486
+ //return o.reason;
193487
+ throw new Error(o.reason);
193487
193488
  }
193488
193489
  }
193489
193490
  else {
193490
- return o;
193491
+ throw new Error(o);
193491
193492
  }
193492
193493
 
193494
+
193495
+
193493
193496
  return "OK";
193494
193497
  }
193495
193498
  }
@@ -193589,7 +193592,7 @@ class IdeAssi extends HTMLElement
193589
193592
  //this.#createModel();
193590
193593
 
193591
193594
  const r = await this.#ai.generateSourceClient(userPrompt);
193592
- elAiChat.add("ai", r);
193595
+ //elAiChat.add("ai", r);
193593
193596
 
193594
193597
  /**
193595
193598
  const r = await this.#ai.generateSource(userPrompt);
@@ -193479,13 +193479,16 @@ class IdeAi
193479
193479
  const o = IdeUtils.extractResponse(response, this.#parent.settings.server);
193480
193480
  if (Object.prototype.toString.call(o) === "[object Object]" && o.hasOwnProperty("result")) {
193481
193481
  if (o.result == "0") {
193482
- return o.reason;
193482
+ //return o.reason;
193483
+ throw new Error(o.reason);
193483
193484
  }
193484
193485
  }
193485
193486
  else {
193486
- return o;
193487
+ throw new Error(o);
193487
193488
  }
193488
193489
 
193490
+
193491
+
193489
193492
  return "OK";
193490
193493
  }
193491
193494
  }
@@ -193585,7 +193588,7 @@ class IdeAssi extends HTMLElement
193585
193588
  //this.#createModel();
193586
193589
 
193587
193590
  const r = await this.#ai.generateSourceClient(userPrompt);
193588
- elAiChat.add("ai", r);
193591
+ //elAiChat.add("ai", r);
193589
193592
 
193590
193593
  /**
193591
193594
  const r = await this.#ai.generateSource(userPrompt);
@@ -188,13 +188,16 @@ export class IdeAi
188
188
  const o = IdeUtils.extractResponse(response, this.#parent.settings.server);
189
189
  if (Object.prototype.toString.call(o) === "[object Object]" && o.hasOwnProperty("result")) {
190
190
  if (o.result == "0") {
191
- return o.reason;
191
+ //return o.reason;
192
+ throw new Error(o.reason);
192
193
  }
193
194
  }
194
195
  else {
195
- return o;
196
+ throw new Error(o);
196
197
  }
197
198
 
199
+
200
+
198
201
  return "OK";
199
202
  }
200
203
  }
@@ -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.90.0",
4
+ "version": "0.91.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -188,13 +188,16 @@ export class IdeAi
188
188
  const o = IdeUtils.extractResponse(response, this.#parent.settings.server);
189
189
  if (Object.prototype.toString.call(o) === "[object Object]" && o.hasOwnProperty("result")) {
190
190
  if (o.result == "0") {
191
- return o.reason;
191
+ //return o.reason;
192
+ throw new Error(o.reason);
192
193
  }
193
194
  }
194
195
  else {
195
- return o;
196
+ throw new Error(o);
196
197
  }
197
198
 
199
+
200
+
198
201
  return "OK";
199
202
  }
200
203
  }
@@ -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);