ide-assi 0.683.0 → 0.685.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.
@@ -202484,38 +202484,27 @@ class IdeUtils
202484
202484
  constructor() {
202485
202485
  }
202486
202486
 
202487
- /**
202488
- controller: "tmpl/controller/DocManagerController.java"
202489
- javascript: "tmpl/doc-manager.jsx"
202490
- menu : {url: '/tmpl/doc-manager', name: '문서관리'}
202491
- mybatis : "tmpl/docManagerMapper.xml"
202492
- package : "tmpl.docmanager"
202493
- service : "tmpl/service/DocManagerService.java"
202494
-
202495
- result : "1"
202496
- table : (3) ['t_doc', 't_doc_file', 't_doc_file_page'
202497
- */
202498
- /**
202499
- static toCamelCase = str =>
202500
- str
202501
- .toLowerCase()
202502
- .split('-')
202503
- .map((w, i) => (i === 0 ? w : w[0].toUpperCase() + w.slice(1)))
202504
- .join('');
202505
-
202506
- static transformPath = input =>
202507
- input
202508
- .split('/')
202509
- //.slice(0, -1)
202510
- .map(IdeUtils.toCamelCase)
202511
- .join('.');
202512
- */
202513
202487
 
202514
202488
 
202515
202489
 
202516
202490
  static generatePrompt = async (path, params) => {
202517
202491
 
202518
- const template = await fetch(path).then(res => res.text());
202492
+ let template = "";//await fetch(path).then(res => res.text());
202493
+
202494
+ console.log(path);
202495
+
202496
+ if (typeof path === 'string') {
202497
+ template = await fetch(path).then(res => res.text());
202498
+ } else {
202499
+ for (let file of path) {
202500
+ console.log(file);
202501
+ template += await fetch(file).then(res => res.text());
202502
+ }
202503
+ }/** else {
202504
+ throw new Error(`${path} is invalid`);
202505
+ } */
202506
+
202507
+ console.log(template);
202519
202508
 
202520
202509
  return await new PromptTemplate({
202521
202510
  template,
@@ -202562,7 +202551,7 @@ class IdeAi
202562
202551
  #SCHEMA = "booxtory_250131";
202563
202552
  #model;
202564
202553
  #parent;
202565
- #prompt;
202554
+ prompt = null;
202566
202555
 
202567
202556
  constructor(parent) {
202568
202557
  this.#parent = parent;
@@ -202737,6 +202726,7 @@ class IdeAi
202737
202726
  };
202738
202727
 
202739
202728
  #invoke = async (path, params) => {
202729
+
202740
202730
  const prompt = await IdeUtils.generatePrompt(path, params);
202741
202731
 
202742
202732
  //console.log(prompt);
@@ -202757,6 +202747,8 @@ class IdeAi
202757
202747
  }
202758
202748
  }
202759
202749
 
202750
+
202751
+
202760
202752
  #what = async (userPrompt) => {
202761
202753
  const o = await this.#invoke('/prompts/meta/1.what.txt', { "userPrompt": userPrompt });
202762
202754
 
@@ -203324,7 +203316,8 @@ console.log(el, href, title);
203324
203316
 
203325
203317
  let jsSrc;
203326
203318
  if (apply.javascript) {
203327
- jsSrc = await this.#generateTmplFile("/prompts/meta/U.BuildReactJsx.txt", "react.jsx", {
203319
+ //jsSrc = await this.#generateTmplFile("/prompts/meta/U.BuildReactJsx.txt", "react.jsx", {
203320
+ jsSrc = await this.#generateTmplFile(this.prompt.react, "react.jsx", {
203328
203321
  userPrompt: userPrompt,
203329
203322
  mybatis: srcPath.mybatis,
203330
203323
  originSrc: src.javascript,
@@ -203767,11 +203760,9 @@ console.log(el, href, title);
203767
203760
  if (apply.service) {
203768
203761
  initialProgressData.push({ id: 'service', message: 'Java(Service) 소스를 생성중입니다.', completedMessage: 'Java(Service) 소스를 생성했습니다.' });
203769
203762
  }
203770
-
203771
203763
  if (apply.controller) {
203772
203764
  initialProgressData.push({ id: 'controller', message: 'Java(Controller) 소스를 생성중입니다.', completedMessage: 'Java(Controller) 소스를 생성했습니다.' });
203773
203765
  }
203774
-
203775
203766
  if (apply.javascript) {
203776
203767
  initialProgressData.push({ id: 'javascript', message: 'Jsx(React) 소스를 생성중입니다.', completedMessage: 'Jsx(React) 소스를 생성했습니다.' });
203777
203768
  }
@@ -203990,7 +203981,17 @@ class IdeAssi extends HTMLElement
203990
203981
 
203991
203982
  this.shadowRoot.querySelectorAll(".menu-icon").forEach(el => el.addEventListener("click", this.#menuClickHandler));
203992
203983
 
203993
- console.log(":::::::", this.settings.feProjectName);
203984
+ /**
203985
+ * prompt 파일정보 취득
203986
+ * this.settings 에 파라미터 설정 delay
203987
+ */
203988
+ setTimeout(() => {
203989
+ api.post(`/api/prompt/dir`, {
203990
+ feProjectName: this.settings.feProjectName,
203991
+ }).then(res => {
203992
+ this.#ai.prompt = res;
203993
+ });
203994
+ }, 1000);
203994
203995
  };
203995
203996
 
203996
203997
 
@@ -204007,11 +204008,7 @@ class IdeAssi extends HTMLElement
204007
204008
 
204008
204009
  //this.shadowRoot.querySelector('ide-diff-popup').remove();
204009
204010
 
204010
- if (!this.#ai.prompt) {
204011
- this.#ai.prompt = await api.post(`/api/prompt/dir`, {
204012
- feProjectName: this.settings.feProjectName,
204013
- });
204014
- }
204011
+
204015
204012
 
204016
204013
  const apply = {
204017
204014
  mybatis: this.shadowRoot.querySelector("#mybatis").checked,
@@ -202480,38 +202480,27 @@ class IdeUtils
202480
202480
  constructor() {
202481
202481
  }
202482
202482
 
202483
- /**
202484
- controller: "tmpl/controller/DocManagerController.java"
202485
- javascript: "tmpl/doc-manager.jsx"
202486
- menu : {url: '/tmpl/doc-manager', name: '문서관리'}
202487
- mybatis : "tmpl/docManagerMapper.xml"
202488
- package : "tmpl.docmanager"
202489
- service : "tmpl/service/DocManagerService.java"
202490
-
202491
- result : "1"
202492
- table : (3) ['t_doc', 't_doc_file', 't_doc_file_page'
202493
- */
202494
- /**
202495
- static toCamelCase = str =>
202496
- str
202497
- .toLowerCase()
202498
- .split('-')
202499
- .map((w, i) => (i === 0 ? w : w[0].toUpperCase() + w.slice(1)))
202500
- .join('');
202501
-
202502
- static transformPath = input =>
202503
- input
202504
- .split('/')
202505
- //.slice(0, -1)
202506
- .map(IdeUtils.toCamelCase)
202507
- .join('.');
202508
- */
202509
202483
 
202510
202484
 
202511
202485
 
202512
202486
  static generatePrompt = async (path, params) => {
202513
202487
 
202514
- const template = await fetch(path).then(res => res.text());
202488
+ let template = "";//await fetch(path).then(res => res.text());
202489
+
202490
+ console.log(path);
202491
+
202492
+ if (typeof path === 'string') {
202493
+ template = await fetch(path).then(res => res.text());
202494
+ } else {
202495
+ for (let file of path) {
202496
+ console.log(file);
202497
+ template += await fetch(file).then(res => res.text());
202498
+ }
202499
+ }/** else {
202500
+ throw new Error(`${path} is invalid`);
202501
+ } */
202502
+
202503
+ console.log(template);
202515
202504
 
202516
202505
  return await new PromptTemplate({
202517
202506
  template,
@@ -202558,7 +202547,7 @@ class IdeAi
202558
202547
  #SCHEMA = "booxtory_250131";
202559
202548
  #model;
202560
202549
  #parent;
202561
- #prompt;
202550
+ prompt = null;
202562
202551
 
202563
202552
  constructor(parent) {
202564
202553
  this.#parent = parent;
@@ -202733,6 +202722,7 @@ class IdeAi
202733
202722
  };
202734
202723
 
202735
202724
  #invoke = async (path, params) => {
202725
+
202736
202726
  const prompt = await IdeUtils.generatePrompt(path, params);
202737
202727
 
202738
202728
  //console.log(prompt);
@@ -202753,6 +202743,8 @@ class IdeAi
202753
202743
  }
202754
202744
  }
202755
202745
 
202746
+
202747
+
202756
202748
  #what = async (userPrompt) => {
202757
202749
  const o = await this.#invoke('/prompts/meta/1.what.txt', { "userPrompt": userPrompt });
202758
202750
 
@@ -203320,7 +203312,8 @@ console.log(el, href, title);
203320
203312
 
203321
203313
  let jsSrc;
203322
203314
  if (apply.javascript) {
203323
- jsSrc = await this.#generateTmplFile("/prompts/meta/U.BuildReactJsx.txt", "react.jsx", {
203315
+ //jsSrc = await this.#generateTmplFile("/prompts/meta/U.BuildReactJsx.txt", "react.jsx", {
203316
+ jsSrc = await this.#generateTmplFile(this.prompt.react, "react.jsx", {
203324
203317
  userPrompt: userPrompt,
203325
203318
  mybatis: srcPath.mybatis,
203326
203319
  originSrc: src.javascript,
@@ -203763,11 +203756,9 @@ console.log(el, href, title);
203763
203756
  if (apply.service) {
203764
203757
  initialProgressData.push({ id: 'service', message: 'Java(Service) 소스를 생성중입니다.', completedMessage: 'Java(Service) 소스를 생성했습니다.' });
203765
203758
  }
203766
-
203767
203759
  if (apply.controller) {
203768
203760
  initialProgressData.push({ id: 'controller', message: 'Java(Controller) 소스를 생성중입니다.', completedMessage: 'Java(Controller) 소스를 생성했습니다.' });
203769
203761
  }
203770
-
203771
203762
  if (apply.javascript) {
203772
203763
  initialProgressData.push({ id: 'javascript', message: 'Jsx(React) 소스를 생성중입니다.', completedMessage: 'Jsx(React) 소스를 생성했습니다.' });
203773
203764
  }
@@ -203986,7 +203977,17 @@ class IdeAssi extends HTMLElement
203986
203977
 
203987
203978
  this.shadowRoot.querySelectorAll(".menu-icon").forEach(el => el.addEventListener("click", this.#menuClickHandler));
203988
203979
 
203989
- console.log(":::::::", this.settings.feProjectName);
203980
+ /**
203981
+ * prompt 파일정보 취득
203982
+ * this.settings 에 파라미터 설정 delay
203983
+ */
203984
+ setTimeout(() => {
203985
+ api.post(`/api/prompt/dir`, {
203986
+ feProjectName: this.settings.feProjectName,
203987
+ }).then(res => {
203988
+ this.#ai.prompt = res;
203989
+ });
203990
+ }, 1000);
203990
203991
  };
203991
203992
 
203992
203993
 
@@ -204003,11 +204004,7 @@ class IdeAssi extends HTMLElement
204003
204004
 
204004
204005
  //this.shadowRoot.querySelector('ide-diff-popup').remove();
204005
204006
 
204006
- if (!this.#ai.prompt) {
204007
- this.#ai.prompt = await api.post(`/api/prompt/dir`, {
204008
- feProjectName: this.settings.feProjectName,
204009
- });
204010
- }
204007
+
204011
204008
 
204012
204009
  const apply = {
204013
204010
  mybatis: this.shadowRoot.querySelector("#mybatis").checked,
@@ -12,7 +12,7 @@ export class IdeAi
12
12
  #SCHEMA = "booxtory_250131";
13
13
  #model;
14
14
  #parent;
15
- #prompt;
15
+ prompt = null;
16
16
 
17
17
  constructor(parent) {
18
18
  this.#parent = parent;
@@ -187,6 +187,7 @@ export class IdeAi
187
187
  };
188
188
 
189
189
  #invoke = async (path, params) => {
190
+
190
191
  const prompt = await IdeUtils.generatePrompt(path, params);
191
192
 
192
193
  //console.log(prompt);
@@ -207,6 +208,8 @@ export class IdeAi
207
208
  }
208
209
  }
209
210
 
211
+
212
+
210
213
  #what = async (userPrompt) => {
211
214
  const o = await this.#invoke('/prompts/meta/1.what.txt', { "userPrompt": userPrompt });
212
215
 
@@ -774,7 +777,8 @@ console.log(el, href, title);
774
777
 
775
778
  let jsSrc;
776
779
  if (apply.javascript) {
777
- jsSrc = await this.#generateTmplFile("/prompts/meta/U.BuildReactJsx.txt", "react.jsx", {
780
+ //jsSrc = await this.#generateTmplFile("/prompts/meta/U.BuildReactJsx.txt", "react.jsx", {
781
+ jsSrc = await this.#generateTmplFile(this.prompt.react, "react.jsx", {
778
782
  userPrompt: userPrompt,
779
783
  mybatis: srcPath.mybatis,
780
784
  originSrc: src.javascript,
@@ -1217,11 +1221,9 @@ console.log(el, href, title);
1217
1221
  if (apply.service) {
1218
1222
  initialProgressData.push({ id: 'service', message: 'Java(Service) 소스를 생성중입니다.', completedMessage: 'Java(Service) 소스를 생성했습니다.' });
1219
1223
  }
1220
-
1221
1224
  if (apply.controller) {
1222
1225
  initialProgressData.push({ id: 'controller', message: 'Java(Controller) 소스를 생성중입니다.', completedMessage: 'Java(Controller) 소스를 생성했습니다.' });
1223
1226
  }
1224
-
1225
1227
  if (apply.javascript) {
1226
1228
  initialProgressData.push({ id: 'javascript', message: 'Jsx(React) 소스를 생성중입니다.', completedMessage: 'Jsx(React) 소스를 생성했습니다.' });
1227
1229
  }
@@ -116,7 +116,17 @@ export class IdeAssi extends HTMLElement
116
116
 
117
117
  this.shadowRoot.querySelectorAll(".menu-icon").forEach(el => el.addEventListener("click", this.#menuClickHandler));
118
118
 
119
- console.log(":::::::", this.settings.feProjectName)
119
+ /**
120
+ * prompt 파일정보 취득
121
+ * this.settings 에 파라미터 설정 delay
122
+ */
123
+ setTimeout(() => {
124
+ api.post(`/api/prompt/dir`, {
125
+ feProjectName: this.settings.feProjectName,
126
+ }).then(res => {
127
+ this.#ai.prompt = res;
128
+ });
129
+ }, 1000);
120
130
  };
121
131
 
122
132
 
@@ -133,11 +143,7 @@ export class IdeAssi extends HTMLElement
133
143
 
134
144
  //this.shadowRoot.querySelector('ide-diff-popup').remove();
135
145
 
136
- if (!this.#ai.prompt) {
137
- this.#ai.prompt = await api.post(`/api/prompt/dir`, {
138
- feProjectName: this.settings.feProjectName,
139
- });
140
- }
146
+
141
147
 
142
148
  const apply = {
143
149
  mybatis: this.shadowRoot.querySelector("#mybatis").checked,
@@ -6,38 +6,27 @@ export class IdeUtils
6
6
  constructor() {
7
7
  }
8
8
 
9
- /**
10
- controller: "tmpl/controller/DocManagerController.java"
11
- javascript: "tmpl/doc-manager.jsx"
12
- menu : {url: '/tmpl/doc-manager', name: '문서관리'}
13
- mybatis : "tmpl/docManagerMapper.xml"
14
- package : "tmpl.docmanager"
15
- service : "tmpl/service/DocManagerService.java"
16
-
17
- result : "1"
18
- table : (3) ['t_doc', 't_doc_file', 't_doc_file_page'
19
- */
20
- /**
21
- static toCamelCase = str =>
22
- str
23
- .toLowerCase()
24
- .split('-')
25
- .map((w, i) => (i === 0 ? w : w[0].toUpperCase() + w.slice(1)))
26
- .join('');
27
-
28
- static transformPath = input =>
29
- input
30
- .split('/')
31
- //.slice(0, -1)
32
- .map(IdeUtils.toCamelCase)
33
- .join('.');
34
- */
35
9
 
36
10
 
37
11
 
38
12
  static generatePrompt = async (path, params) => {
39
13
 
40
- const template = await fetch(path).then(res => res.text());
14
+ let template = "";//await fetch(path).then(res => res.text());
15
+
16
+ console.log(path);
17
+
18
+ if (typeof path === 'string') {
19
+ template = await fetch(path).then(res => res.text());
20
+ } else {
21
+ for (let file of path) {
22
+ console.log(file)
23
+ template += await fetch(file).then(res => res.text());
24
+ }
25
+ }/** else {
26
+ throw new Error(`${path} is invalid`);
27
+ } */
28
+
29
+ console.log(template);
41
30
 
42
31
  return await new PromptTemplate({
43
32
  template,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.683.0",
4
+ "version": "0.685.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -12,7 +12,7 @@ export class IdeAi
12
12
  #SCHEMA = "booxtory_250131";
13
13
  #model;
14
14
  #parent;
15
- #prompt;
15
+ prompt = null;
16
16
 
17
17
  constructor(parent) {
18
18
  this.#parent = parent;
@@ -187,6 +187,7 @@ export class IdeAi
187
187
  };
188
188
 
189
189
  #invoke = async (path, params) => {
190
+
190
191
  const prompt = await IdeUtils.generatePrompt(path, params);
191
192
 
192
193
  //console.log(prompt);
@@ -207,6 +208,8 @@ export class IdeAi
207
208
  }
208
209
  }
209
210
 
211
+
212
+
210
213
  #what = async (userPrompt) => {
211
214
  const o = await this.#invoke('/prompts/meta/1.what.txt', { "userPrompt": userPrompt });
212
215
 
@@ -774,7 +777,8 @@ console.log(el, href, title);
774
777
 
775
778
  let jsSrc;
776
779
  if (apply.javascript) {
777
- jsSrc = await this.#generateTmplFile("/prompts/meta/U.BuildReactJsx.txt", "react.jsx", {
780
+ //jsSrc = await this.#generateTmplFile("/prompts/meta/U.BuildReactJsx.txt", "react.jsx", {
781
+ jsSrc = await this.#generateTmplFile(this.prompt.react, "react.jsx", {
778
782
  userPrompt: userPrompt,
779
783
  mybatis: srcPath.mybatis,
780
784
  originSrc: src.javascript,
@@ -1217,11 +1221,9 @@ console.log(el, href, title);
1217
1221
  if (apply.service) {
1218
1222
  initialProgressData.push({ id: 'service', message: 'Java(Service) 소스를 생성중입니다.', completedMessage: 'Java(Service) 소스를 생성했습니다.' });
1219
1223
  }
1220
-
1221
1224
  if (apply.controller) {
1222
1225
  initialProgressData.push({ id: 'controller', message: 'Java(Controller) 소스를 생성중입니다.', completedMessage: 'Java(Controller) 소스를 생성했습니다.' });
1223
1226
  }
1224
-
1225
1227
  if (apply.javascript) {
1226
1228
  initialProgressData.push({ id: 'javascript', message: 'Jsx(React) 소스를 생성중입니다.', completedMessage: 'Jsx(React) 소스를 생성했습니다.' });
1227
1229
  }
@@ -116,7 +116,17 @@ export class IdeAssi extends HTMLElement
116
116
 
117
117
  this.shadowRoot.querySelectorAll(".menu-icon").forEach(el => el.addEventListener("click", this.#menuClickHandler));
118
118
 
119
- console.log(":::::::", this.settings.feProjectName)
119
+ /**
120
+ * prompt 파일정보 취득
121
+ * this.settings 에 파라미터 설정 delay
122
+ */
123
+ setTimeout(() => {
124
+ api.post(`/api/prompt/dir`, {
125
+ feProjectName: this.settings.feProjectName,
126
+ }).then(res => {
127
+ this.#ai.prompt = res;
128
+ });
129
+ }, 1000);
120
130
  };
121
131
 
122
132
 
@@ -133,11 +143,7 @@ export class IdeAssi extends HTMLElement
133
143
 
134
144
  //this.shadowRoot.querySelector('ide-diff-popup').remove();
135
145
 
136
- if (!this.#ai.prompt) {
137
- this.#ai.prompt = await api.post(`/api/prompt/dir`, {
138
- feProjectName: this.settings.feProjectName,
139
- });
140
- }
146
+
141
147
 
142
148
  const apply = {
143
149
  mybatis: this.shadowRoot.querySelector("#mybatis").checked,
@@ -6,38 +6,27 @@ export class IdeUtils
6
6
  constructor() {
7
7
  }
8
8
 
9
- /**
10
- controller: "tmpl/controller/DocManagerController.java"
11
- javascript: "tmpl/doc-manager.jsx"
12
- menu : {url: '/tmpl/doc-manager', name: '문서관리'}
13
- mybatis : "tmpl/docManagerMapper.xml"
14
- package : "tmpl.docmanager"
15
- service : "tmpl/service/DocManagerService.java"
16
-
17
- result : "1"
18
- table : (3) ['t_doc', 't_doc_file', 't_doc_file_page'
19
- */
20
- /**
21
- static toCamelCase = str =>
22
- str
23
- .toLowerCase()
24
- .split('-')
25
- .map((w, i) => (i === 0 ? w : w[0].toUpperCase() + w.slice(1)))
26
- .join('');
27
-
28
- static transformPath = input =>
29
- input
30
- .split('/')
31
- //.slice(0, -1)
32
- .map(IdeUtils.toCamelCase)
33
- .join('.');
34
- */
35
9
 
36
10
 
37
11
 
38
12
  static generatePrompt = async (path, params) => {
39
13
 
40
- const template = await fetch(path).then(res => res.text());
14
+ let template = "";//await fetch(path).then(res => res.text());
15
+
16
+ console.log(path);
17
+
18
+ if (typeof path === 'string') {
19
+ template = await fetch(path).then(res => res.text());
20
+ } else {
21
+ for (let file of path) {
22
+ console.log(file)
23
+ template += await fetch(file).then(res => res.text());
24
+ }
25
+ }/** else {
26
+ throw new Error(`${path} is invalid`);
27
+ } */
28
+
29
+ console.log(template);
41
30
 
42
31
  return await new PromptTemplate({
43
32
  template,