ide-assi 0.684.0 → 0.686.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,18 @@ 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
- static generatePrompt = async (path, params) => {
202490
+ static generatePrompt = async (paths, params) => {
202491
+
202492
+ if (!Array.isArray(paths)) paths = [paths];
202517
202493
 
202518
- const template = await fetch(path).then(res => res.text());
202494
+ let template = "";//await fetch(path).then(res => res.text());
202495
+
202496
+ for (let path of paths) {
202497
+ template += await fetch(path).then(res => res.text());
202498
+ }
202519
202499
 
202520
202500
  return await new PromptTemplate({
202521
202501
  template,
@@ -202562,7 +202542,7 @@ class IdeAi
202562
202542
  #SCHEMA = "booxtory_250131";
202563
202543
  #model;
202564
202544
  #parent;
202565
- #prompt;
202545
+ prompt = null;
202566
202546
 
202567
202547
  constructor(parent) {
202568
202548
  this.#parent = parent;
@@ -202737,6 +202717,7 @@ class IdeAi
202737
202717
  };
202738
202718
 
202739
202719
  #invoke = async (path, params) => {
202720
+
202740
202721
  const prompt = await IdeUtils.generatePrompt(path, params);
202741
202722
 
202742
202723
  //console.log(prompt);
@@ -202757,6 +202738,8 @@ class IdeAi
202757
202738
  }
202758
202739
  }
202759
202740
 
202741
+
202742
+
202760
202743
  #what = async (userPrompt) => {
202761
202744
  const o = await this.#invoke('/prompts/meta/1.what.txt', { "userPrompt": userPrompt });
202762
202745
 
@@ -203324,7 +203307,8 @@ console.log(el, href, title);
203324
203307
 
203325
203308
  let jsSrc;
203326
203309
  if (apply.javascript) {
203327
- jsSrc = await this.#generateTmplFile("/prompts/meta/U.BuildReactJsx.txt", "react.jsx", {
203310
+ //jsSrc = await this.#generateTmplFile("/prompts/meta/U.BuildReactJsx.txt", "react.jsx", {
203311
+ jsSrc = await this.#generateTmplFile(this.prompt.react, "react.jsx", {
203328
203312
  userPrompt: userPrompt,
203329
203313
  mybatis: srcPath.mybatis,
203330
203314
  originSrc: src.javascript,
@@ -203767,11 +203751,9 @@ console.log(el, href, title);
203767
203751
  if (apply.service) {
203768
203752
  initialProgressData.push({ id: 'service', message: 'Java(Service) 소스를 생성중입니다.', completedMessage: 'Java(Service) 소스를 생성했습니다.' });
203769
203753
  }
203770
-
203771
203754
  if (apply.controller) {
203772
203755
  initialProgressData.push({ id: 'controller', message: 'Java(Controller) 소스를 생성중입니다.', completedMessage: 'Java(Controller) 소스를 생성했습니다.' });
203773
203756
  }
203774
-
203775
203757
  if (apply.javascript) {
203776
203758
  initialProgressData.push({ id: 'javascript', message: 'Jsx(React) 소스를 생성중입니다.', completedMessage: 'Jsx(React) 소스를 생성했습니다.' });
203777
203759
  }
@@ -203990,7 +203972,26 @@ class IdeAssi extends HTMLElement
203990
203972
 
203991
203973
  this.shadowRoot.querySelectorAll(".menu-icon").forEach(el => el.addEventListener("click", this.#menuClickHandler));
203992
203974
 
203993
- console.log(":::::::", this.settings.feProjectName);
203975
+ /**
203976
+ * prompt 파일정보 취득
203977
+ * this.settings 에 파라미터 설정 delay
203978
+ */
203979
+ setTimeout(() => {
203980
+ api.post(`/api/prompt/dir`, {
203981
+ feProjectName: this.settings.feProjectName,
203982
+ }).then(res => {
203983
+ this.#ai.prompt = {
203984
+ mybatis: res.service.map(item => "/prompt/mybatis" + item),
203985
+ service: res.service.map(item => "/prompt/service" + item),
203986
+ controller: res.service.map(item => "/prompt/controller" + item),
203987
+ react: res.react.map(item => "/prompt/react" + item),
203988
+ };
203989
+
203990
+ console.log(this.#ai.prompt);
203991
+ });
203992
+
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,18 @@ 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
- static generatePrompt = async (path, params) => {
202486
+ static generatePrompt = async (paths, params) => {
202487
+
202488
+ if (!Array.isArray(paths)) paths = [paths];
202513
202489
 
202514
- const template = await fetch(path).then(res => res.text());
202490
+ let template = "";//await fetch(path).then(res => res.text());
202491
+
202492
+ for (let path of paths) {
202493
+ template += await fetch(path).then(res => res.text());
202494
+ }
202515
202495
 
202516
202496
  return await new PromptTemplate({
202517
202497
  template,
@@ -202558,7 +202538,7 @@ class IdeAi
202558
202538
  #SCHEMA = "booxtory_250131";
202559
202539
  #model;
202560
202540
  #parent;
202561
- #prompt;
202541
+ prompt = null;
202562
202542
 
202563
202543
  constructor(parent) {
202564
202544
  this.#parent = parent;
@@ -202733,6 +202713,7 @@ class IdeAi
202733
202713
  };
202734
202714
 
202735
202715
  #invoke = async (path, params) => {
202716
+
202736
202717
  const prompt = await IdeUtils.generatePrompt(path, params);
202737
202718
 
202738
202719
  //console.log(prompt);
@@ -202753,6 +202734,8 @@ class IdeAi
202753
202734
  }
202754
202735
  }
202755
202736
 
202737
+
202738
+
202756
202739
  #what = async (userPrompt) => {
202757
202740
  const o = await this.#invoke('/prompts/meta/1.what.txt', { "userPrompt": userPrompt });
202758
202741
 
@@ -203320,7 +203303,8 @@ console.log(el, href, title);
203320
203303
 
203321
203304
  let jsSrc;
203322
203305
  if (apply.javascript) {
203323
- jsSrc = await this.#generateTmplFile("/prompts/meta/U.BuildReactJsx.txt", "react.jsx", {
203306
+ //jsSrc = await this.#generateTmplFile("/prompts/meta/U.BuildReactJsx.txt", "react.jsx", {
203307
+ jsSrc = await this.#generateTmplFile(this.prompt.react, "react.jsx", {
203324
203308
  userPrompt: userPrompt,
203325
203309
  mybatis: srcPath.mybatis,
203326
203310
  originSrc: src.javascript,
@@ -203763,11 +203747,9 @@ console.log(el, href, title);
203763
203747
  if (apply.service) {
203764
203748
  initialProgressData.push({ id: 'service', message: 'Java(Service) 소스를 생성중입니다.', completedMessage: 'Java(Service) 소스를 생성했습니다.' });
203765
203749
  }
203766
-
203767
203750
  if (apply.controller) {
203768
203751
  initialProgressData.push({ id: 'controller', message: 'Java(Controller) 소스를 생성중입니다.', completedMessage: 'Java(Controller) 소스를 생성했습니다.' });
203769
203752
  }
203770
-
203771
203753
  if (apply.javascript) {
203772
203754
  initialProgressData.push({ id: 'javascript', message: 'Jsx(React) 소스를 생성중입니다.', completedMessage: 'Jsx(React) 소스를 생성했습니다.' });
203773
203755
  }
@@ -203986,7 +203968,26 @@ class IdeAssi extends HTMLElement
203986
203968
 
203987
203969
  this.shadowRoot.querySelectorAll(".menu-icon").forEach(el => el.addEventListener("click", this.#menuClickHandler));
203988
203970
 
203989
- console.log(":::::::", this.settings.feProjectName);
203971
+ /**
203972
+ * prompt 파일정보 취득
203973
+ * this.settings 에 파라미터 설정 delay
203974
+ */
203975
+ setTimeout(() => {
203976
+ api.post(`/api/prompt/dir`, {
203977
+ feProjectName: this.settings.feProjectName,
203978
+ }).then(res => {
203979
+ this.#ai.prompt = {
203980
+ mybatis: res.service.map(item => "/prompt/mybatis" + item),
203981
+ service: res.service.map(item => "/prompt/service" + item),
203982
+ controller: res.service.map(item => "/prompt/controller" + item),
203983
+ react: res.react.map(item => "/prompt/react" + item),
203984
+ };
203985
+
203986
+ console.log(this.#ai.prompt);
203987
+ });
203988
+
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,26 @@ 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 = {
128
+ mybatis: res.service.map(item => "/prompt/mybatis" + item),
129
+ service: res.service.map(item => "/prompt/service" + item),
130
+ controller: res.service.map(item => "/prompt/controller" + item),
131
+ react: res.react.map(item => "/prompt/react" + item),
132
+ };
133
+
134
+ console.log(this.#ai.prompt);
135
+ });
136
+
137
+
138
+ }, 1000);
120
139
  };
121
140
 
122
141
 
@@ -133,11 +152,7 @@ export class IdeAssi extends HTMLElement
133
152
 
134
153
  //this.shadowRoot.querySelector('ide-diff-popup').remove();
135
154
 
136
- if (!this.#ai.prompt) {
137
- this.#ai.prompt = await api.post(`/api/prompt/dir`, {
138
- feProjectName: this.settings.feProjectName,
139
- });
140
- }
155
+
141
156
 
142
157
  const apply = {
143
158
  mybatis: this.shadowRoot.querySelector("#mybatis").checked,
@@ -6,38 +6,18 @@ 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
-
36
-
37
-
38
- static generatePrompt = async (path, params) => {
39
-
40
- const template = await fetch(path).then(res => res.text());
9
+
10
+
11
+
12
+ static generatePrompt = async (paths, params) => {
13
+
14
+ if (!Array.isArray(paths)) paths = [paths];
15
+
16
+ let template = "";//await fetch(path).then(res => res.text());
17
+
18
+ for (let path of paths) {
19
+ template += await fetch(path).then(res => res.text());
20
+ }
41
21
 
42
22
  return await new PromptTemplate({
43
23
  template,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.684.0",
4
+ "version": "0.686.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,26 @@ 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 = {
128
+ mybatis: res.service.map(item => "/prompt/mybatis" + item),
129
+ service: res.service.map(item => "/prompt/service" + item),
130
+ controller: res.service.map(item => "/prompt/controller" + item),
131
+ react: res.react.map(item => "/prompt/react" + item),
132
+ };
133
+
134
+ console.log(this.#ai.prompt);
135
+ });
136
+
137
+
138
+ }, 1000);
120
139
  };
121
140
 
122
141
 
@@ -133,11 +152,7 @@ export class IdeAssi extends HTMLElement
133
152
 
134
153
  //this.shadowRoot.querySelector('ide-diff-popup').remove();
135
154
 
136
- if (!this.#ai.prompt) {
137
- this.#ai.prompt = await api.post(`/api/prompt/dir`, {
138
- feProjectName: this.settings.feProjectName,
139
- });
140
- }
155
+
141
156
 
142
157
  const apply = {
143
158
  mybatis: this.shadowRoot.querySelector("#mybatis").checked,
@@ -6,38 +6,18 @@ 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
-
36
-
37
-
38
- static generatePrompt = async (path, params) => {
39
-
40
- const template = await fetch(path).then(res => res.text());
9
+
10
+
11
+
12
+ static generatePrompt = async (paths, params) => {
13
+
14
+ if (!Array.isArray(paths)) paths = [paths];
15
+
16
+ let template = "";//await fetch(path).then(res => res.text());
17
+
18
+ for (let path of paths) {
19
+ template += await fetch(path).then(res => res.text());
20
+ }
41
21
 
42
22
  return await new PromptTemplate({
43
23
  template,