ide-assi 0.168.0 → 0.170.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.
@@ -193332,9 +193332,12 @@ class IdeUtils
193332
193332
  console.log(text);
193333
193333
 
193334
193334
  //return text.replace(/```[\s\S]*?```/g, '').trim();
193335
- const match = text.match(/```json([\s\S]*?)```/);
193336
-
193337
- console.log(match);
193335
+ //const match = text.match(/```json([\s\S]*?)```/);
193336
+ //return match ? match[1].trim() : text;
193337
+ let match = text.match(/```json([\s\S]*?)```/);
193338
+ if (!match) match = text.match(/```jsx([\s\S]*?)```/);
193339
+ if (!match) match = text.match(/```xml([\s\S]*?)```/);
193340
+ if (!match) match = text.match(/```java([\s\S]*?)```/);
193338
193341
 
193339
193342
  return match ? match[1].trim() : text;
193340
193343
  };
@@ -193737,6 +193740,8 @@ class IdeAssi extends HTMLElement
193737
193740
  #init = (info) => {
193738
193741
  this.settings = this.shadowRoot.querySelector("ide-assi-settings");
193739
193742
 
193743
+ this.settings.server = "ollama";
193744
+
193740
193745
  this.shadowRoot.querySelector("textarea").addEventListener("keydown", this.#keydownHandler);
193741
193746
 
193742
193747
  this.shadowRoot.querySelector(".expand-icon").addEventListener("click", this.#toggleCollapseHandler);
@@ -193328,9 +193328,12 @@ class IdeUtils
193328
193328
  console.log(text);
193329
193329
 
193330
193330
  //return text.replace(/```[\s\S]*?```/g, '').trim();
193331
- const match = text.match(/```json([\s\S]*?)```/);
193332
-
193333
- console.log(match);
193331
+ //const match = text.match(/```json([\s\S]*?)```/);
193332
+ //return match ? match[1].trim() : text;
193333
+ let match = text.match(/```json([\s\S]*?)```/);
193334
+ if (!match) match = text.match(/```jsx([\s\S]*?)```/);
193335
+ if (!match) match = text.match(/```xml([\s\S]*?)```/);
193336
+ if (!match) match = text.match(/```java([\s\S]*?)```/);
193334
193337
 
193335
193338
  return match ? match[1].trim() : text;
193336
193339
  };
@@ -193733,6 +193736,8 @@ class IdeAssi extends HTMLElement
193733
193736
  #init = (info) => {
193734
193737
  this.settings = this.shadowRoot.querySelector("ide-assi-settings");
193735
193738
 
193739
+ this.settings.server = "ollama";
193740
+
193736
193741
  this.shadowRoot.querySelector("textarea").addEventListener("keydown", this.#keydownHandler);
193737
193742
 
193738
193743
  this.shadowRoot.querySelector(".expand-icon").addEventListener("click", this.#toggleCollapseHandler);
@@ -57,6 +57,8 @@ export class IdeAssi extends HTMLElement
57
57
  #init = (info) => {
58
58
  this.settings = this.shadowRoot.querySelector("ide-assi-settings");
59
59
 
60
+ this.settings.server = "ollama";
61
+
60
62
  this.shadowRoot.querySelector("textarea").addEventListener("keydown", this.#keydownHandler);
61
63
 
62
64
  this.shadowRoot.querySelector(".expand-icon").addEventListener("click", this.#toggleCollapseHandler);
@@ -22,9 +22,12 @@ export class IdeUtils
22
22
  console.log(text);
23
23
 
24
24
  //return text.replace(/```[\s\S]*?```/g, '').trim();
25
- const match = text.match(/```json([\s\S]*?)```/);
26
-
27
- console.log(match);
25
+ //const match = text.match(/```json([\s\S]*?)```/);
26
+ //return match ? match[1].trim() : text;
27
+ let match = text.match(/```json([\s\S]*?)```/);
28
+ if (!match) match = text.match(/```jsx([\s\S]*?)```/);
29
+ if (!match) match = text.match(/```xml([\s\S]*?)```/);
30
+ if (!match) match = text.match(/```java([\s\S]*?)```/);
28
31
 
29
32
  return match ? match[1].trim() : text;
30
33
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.168.0",
4
+ "version": "0.170.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -57,6 +57,8 @@ export class IdeAssi extends HTMLElement
57
57
  #init = (info) => {
58
58
  this.settings = this.shadowRoot.querySelector("ide-assi-settings");
59
59
 
60
+ this.settings.server = "ollama";
61
+
60
62
  this.shadowRoot.querySelector("textarea").addEventListener("keydown", this.#keydownHandler);
61
63
 
62
64
  this.shadowRoot.querySelector(".expand-icon").addEventListener("click", this.#toggleCollapseHandler);
@@ -22,9 +22,12 @@ export class IdeUtils
22
22
  console.log(text);
23
23
 
24
24
  //return text.replace(/```[\s\S]*?```/g, '').trim();
25
- const match = text.match(/```json([\s\S]*?)```/);
26
-
27
- console.log(match);
25
+ //const match = text.match(/```json([\s\S]*?)```/);
26
+ //return match ? match[1].trim() : text;
27
+ let match = text.match(/```json([\s\S]*?)```/);
28
+ if (!match) match = text.match(/```jsx([\s\S]*?)```/);
29
+ if (!match) match = text.match(/```xml([\s\S]*?)```/);
30
+ if (!match) match = text.match(/```java([\s\S]*?)```/);
28
31
 
29
32
  return match ? match[1].trim() : text;
30
33
  };