ide-assi 0.685.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.
@@ -202487,24 +202487,15 @@ class IdeUtils
202487
202487
 
202488
202488
 
202489
202489
 
202490
- static generatePrompt = async (path, params) => {
202490
+ static generatePrompt = async (paths, params) => {
202491
202491
 
202492
- let template = "";//await fetch(path).then(res => res.text());
202493
-
202494
- console.log(path);
202492
+ if (!Array.isArray(paths)) paths = [paths];
202495
202493
 
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
- } */
202494
+ let template = "";//await fetch(path).then(res => res.text());
202506
202495
 
202507
- console.log(template);
202496
+ for (let path of paths) {
202497
+ template += await fetch(path).then(res => res.text());
202498
+ }
202508
202499
 
202509
202500
  return await new PromptTemplate({
202510
202501
  template,
@@ -203989,8 +203980,17 @@ class IdeAssi extends HTMLElement
203989
203980
  api.post(`/api/prompt/dir`, {
203990
203981
  feProjectName: this.settings.feProjectName,
203991
203982
  }).then(res => {
203992
- this.#ai.prompt = 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);
203993
203991
  });
203992
+
203993
+
203994
203994
  }, 1000);
203995
203995
  };
203996
203996
 
@@ -202483,24 +202483,15 @@ class IdeUtils
202483
202483
 
202484
202484
 
202485
202485
 
202486
- static generatePrompt = async (path, params) => {
202486
+ static generatePrompt = async (paths, params) => {
202487
202487
 
202488
- let template = "";//await fetch(path).then(res => res.text());
202489
-
202490
- console.log(path);
202488
+ if (!Array.isArray(paths)) paths = [paths];
202491
202489
 
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
- } */
202490
+ let template = "";//await fetch(path).then(res => res.text());
202502
202491
 
202503
- console.log(template);
202492
+ for (let path of paths) {
202493
+ template += await fetch(path).then(res => res.text());
202494
+ }
202504
202495
 
202505
202496
  return await new PromptTemplate({
202506
202497
  template,
@@ -203985,8 +203976,17 @@ class IdeAssi extends HTMLElement
203985
203976
  api.post(`/api/prompt/dir`, {
203986
203977
  feProjectName: this.settings.feProjectName,
203987
203978
  }).then(res => {
203988
- this.#ai.prompt = 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);
203989
203987
  });
203988
+
203989
+
203990
203990
  }, 1000);
203991
203991
  };
203992
203992
 
@@ -124,8 +124,17 @@ export class IdeAssi extends HTMLElement
124
124
  api.post(`/api/prompt/dir`, {
125
125
  feProjectName: this.settings.feProjectName,
126
126
  }).then(res => {
127
- this.#ai.prompt = 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);
128
135
  });
136
+
137
+
129
138
  }, 1000);
130
139
  };
131
140
 
@@ -9,24 +9,15 @@ export class IdeUtils
9
9
 
10
10
 
11
11
 
12
- static generatePrompt = async (path, params) => {
12
+ static generatePrompt = async (paths, params) => {
13
13
 
14
- let template = "";//await fetch(path).then(res => res.text());
15
-
16
- console.log(path);
14
+ if (!Array.isArray(paths)) paths = [paths];
17
15
 
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
- } */
16
+ let template = "";//await fetch(path).then(res => res.text());
28
17
 
29
- console.log(template);
18
+ for (let path of paths) {
19
+ template += await fetch(path).then(res => res.text());
20
+ }
30
21
 
31
22
  return await new PromptTemplate({
32
23
  template,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.685.0",
4
+ "version": "0.686.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -124,8 +124,17 @@ export class IdeAssi extends HTMLElement
124
124
  api.post(`/api/prompt/dir`, {
125
125
  feProjectName: this.settings.feProjectName,
126
126
  }).then(res => {
127
- this.#ai.prompt = 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);
128
135
  });
136
+
137
+
129
138
  }, 1000);
130
139
  };
131
140
 
@@ -9,24 +9,15 @@ export class IdeUtils
9
9
 
10
10
 
11
11
 
12
- static generatePrompt = async (path, params) => {
12
+ static generatePrompt = async (paths, params) => {
13
13
 
14
- let template = "";//await fetch(path).then(res => res.text());
15
-
16
- console.log(path);
14
+ if (!Array.isArray(paths)) paths = [paths];
17
15
 
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
- } */
16
+ let template = "";//await fetch(path).then(res => res.text());
28
17
 
29
- console.log(template);
18
+ for (let path of paths) {
19
+ template += await fetch(path).then(res => res.text());
20
+ }
30
21
 
31
22
  return await new PromptTemplate({
32
23
  template,