ide-assi 0.169.0 → 0.171.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
  };
@@ -193640,8 +193643,6 @@ class IdeAi
193640
193643
  });
193641
193644
  this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
193642
193645
 
193643
- return "111";
193644
-
193645
193646
  const serviceSrc = await this.#generateTmplFile("/prompts/meta/BuildService.txt", "service.java", {
193646
193647
  userPrompt: userPrompt,
193647
193648
  menuUrl: where.menu.url,
@@ -193737,8 +193738,6 @@ class IdeAssi extends HTMLElement
193737
193738
  #init = (info) => {
193738
193739
  this.settings = this.shadowRoot.querySelector("ide-assi-settings");
193739
193740
 
193740
- this.settings.server = "ollama";
193741
-
193742
193741
  this.shadowRoot.querySelector("textarea").addEventListener("keydown", this.#keydownHandler);
193743
193742
 
193744
193743
  this.shadowRoot.querySelector(".expand-icon").addEventListener("click", this.#toggleCollapseHandler);
@@ -193862,8 +193861,6 @@ customElements.define("ide-assi", IdeAssi);
193862
193861
  class ideAssiSettings extends HTMLElement
193863
193862
  {
193864
193863
  constructor() {
193865
- console.log("construct");
193866
-
193867
193864
  super();
193868
193865
  this.attachShadow({ mode: 'open' });
193869
193866
  }
@@ -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
  };
@@ -193636,8 +193639,6 @@ class IdeAi
193636
193639
  });
193637
193640
  this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
193638
193641
 
193639
- return "111";
193640
-
193641
193642
  const serviceSrc = await this.#generateTmplFile("/prompts/meta/BuildService.txt", "service.java", {
193642
193643
  userPrompt: userPrompt,
193643
193644
  menuUrl: where.menu.url,
@@ -193733,8 +193734,6 @@ class IdeAssi extends HTMLElement
193733
193734
  #init = (info) => {
193734
193735
  this.settings = this.shadowRoot.querySelector("ide-assi-settings");
193735
193736
 
193736
- this.settings.server = "ollama";
193737
-
193738
193737
  this.shadowRoot.querySelector("textarea").addEventListener("keydown", this.#keydownHandler);
193739
193738
 
193740
193739
  this.shadowRoot.querySelector(".expand-icon").addEventListener("click", this.#toggleCollapseHandler);
@@ -193858,8 +193857,6 @@ customElements.define("ide-assi", IdeAssi);
193858
193857
  class ideAssiSettings extends HTMLElement
193859
193858
  {
193860
193859
  constructor() {
193861
- console.log("construct");
193862
-
193863
193860
  super();
193864
193861
  this.attachShadow({ mode: 'open' });
193865
193862
  }
@@ -299,8 +299,6 @@ export class IdeAi
299
299
  });
300
300
  this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
301
301
 
302
- return "111";
303
-
304
302
  const serviceSrc = await this.#generateTmplFile("/prompts/meta/BuildService.txt", "service.java", {
305
303
  userPrompt: userPrompt,
306
304
  menuUrl: where.menu.url,
@@ -57,8 +57,6 @@ 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
-
62
60
  this.shadowRoot.querySelector("textarea").addEventListener("keydown", this.#keydownHandler);
63
61
 
64
62
  this.shadowRoot.querySelector(".expand-icon").addEventListener("click", this.#toggleCollapseHandler);
@@ -3,8 +3,6 @@ import ninegrid from "ninegrid2";
3
3
  class ideAssiSettings extends HTMLElement
4
4
  {
5
5
  constructor() {
6
- console.log("construct");
7
-
8
6
  super();
9
7
  this.attachShadow({ mode: 'open' });
10
8
  }
@@ -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.169.0",
4
+ "version": "0.171.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -299,8 +299,6 @@ export class IdeAi
299
299
  });
300
300
  this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
301
301
 
302
- return "111";
303
-
304
302
  const serviceSrc = await this.#generateTmplFile("/prompts/meta/BuildService.txt", "service.java", {
305
303
  userPrompt: userPrompt,
306
304
  menuUrl: where.menu.url,
@@ -57,8 +57,6 @@ 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
-
62
60
  this.shadowRoot.querySelector("textarea").addEventListener("keydown", this.#keydownHandler);
63
61
 
64
62
  this.shadowRoot.querySelector(".expand-icon").addEventListener("click", this.#toggleCollapseHandler);
@@ -3,8 +3,6 @@ import ninegrid from "ninegrid2";
3
3
  class ideAssiSettings extends HTMLElement
4
4
  {
5
5
  constructor() {
6
- console.log("construct");
7
-
8
6
  super();
9
7
  this.attachShadow({ mode: 'open' });
10
8
  }
@@ -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
  };