ide-assi 0.236.0 → 0.238.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.
@@ -193437,8 +193437,12 @@ class IdeAi
193437
193437
  #createModel = () => {
193438
193438
 
193439
193439
  switch (this.#parent.settings.server) {
193440
+ case "chatopenai":
193441
+ this.#model = new ChatOpenAI({ modelName: "deepseek-coder", openAIApiKey: this.#parent.settings.chatopenaiApiKey, });
193442
+ break;
193440
193443
  case "gemini":
193441
- this.#model = new ChatGoogleGenerativeAI({ model: this.#parent.settings.model, apiKey: this.#parent.settings.geminiApiKey, temperature: 0,});
193444
+ this.#model = new ChatOpenAI({ modelName: "deepseek-coder", openAIApiKey: "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", });
193445
+ //this.#model = new ChatGoogleGenerativeAI({ model: this.#parent.settings.model, apiKey: this.#parent.settings.geminiApiKey, temperature: 0,});
193442
193446
  break;
193443
193447
  case "openai":
193444
193448
  this.#model = new ChatOpenAI({ model: this.#parent.settings.model, apiKey: this.#parent.settings.openaiApiKey, temperature: 0, });
@@ -193769,6 +193773,7 @@ class IdeAi
193769
193773
  const srcPath = this.#getSourcePath(href);
193770
193774
  console.log(srcPath);
193771
193775
 
193776
+
193772
193777
  /**
193773
193778
  * {
193774
193779
  * "package": "ide.assi.be.tmpla",
@@ -193785,12 +193790,74 @@ class IdeAi
193785
193790
  const src = await api.post("/api/source/read", srcPath);
193786
193791
  //console.log(src);
193787
193792
 
193793
+ /**
193788
193794
  const response = await fetch(srcPath.javascript);
193789
- src.javascript = await response.text();
193795
+ src.javascript = await response.text();*/
193796
+
193797
+
193798
+ //console.log(src);
193799
+
193800
+ //const template = await fetch(path).then(res => res.text());
193801
+
193802
+
193803
+
193804
+ const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
193805
+ this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
193806
+
193807
+ console.log(where);
193808
+
193809
+ //const srcPath = this.#getSourcePath(where.menu.url);
193810
+
193811
+ console.log(srcPath);
193812
+
193813
+ const columnInfo = await this.#getColumnInfo(where.table);
193814
+
193815
+ const mybatisXmlSource = await this.#generateTmplFile("/prompts/meta/U.BuildMyBatisMapper.txt", "mybatis.xml", {
193816
+ userPrompt: userPrompt,
193817
+ originSrc: src.mybatis,
193818
+ resultType: srcPath.resultType,
193819
+ namespace: srcPath.namespace,
193820
+ tableDefinitions: columnInfo,
193821
+ });
193822
+ this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
193823
+
193824
+ const serviceSrc = await this.#generateTmplFile("/prompts/meta/U.BuildService.txt", "service.java", {
193825
+ userPrompt: userPrompt,
193826
+ originSrc: src.service,
193827
+ baseClass: srcPath.baseClass,
193828
+ myBatisPath: srcPath.mybatis,
193829
+ namespace: srcPath.namespace,
193830
+ package: srcPath.package + ".service",
193831
+ mybatisXmlSource: mybatisXmlSource,
193832
+ });
193833
+ this.#parent.addMessage("Java(Service) 소스파일을 생성했습니다.");
193834
+
193835
+
193836
+ const controllerSrc = await this.#generateTmplFile("/prompts/meta/U.BuildController.txt", "controller.java", {
193837
+ userPrompt: userPrompt,
193838
+ originSrc: src.controller,
193839
+ baseClass: srcPath.baseClass,
193840
+ menuUrl: where.menu.url,
193841
+ package: srcPath.package + ".controller",
193842
+ serviceSource: serviceSrc,
193843
+ });
193844
+ this.#parent.addMessage("Java(Controller) 소스파일을 생성했습니다.");
193845
+
193846
+
193847
+ await this.#generateTmplFile("/prompts/meta/U.BuildReactJsx.txt", "react.jsx", {
193848
+ userPrompt: userPrompt,
193849
+ originSrc: src.javascript,
193850
+ menuUrl: where.menu.url,
193851
+ menuName: where.menu.name,
193852
+ baseClass: srcPath.baseClass,
193853
+ controllerSource: controllerSrc,
193854
+ tableDefinitions: columnInfo,
193855
+ });
193856
+ this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
193790
193857
 
193791
193858
  console.log(src.javascript);
193792
193859
 
193793
- return;
193860
+ await this.#generateRealFile(srcPath);
193794
193861
  };
193795
193862
 
193796
193863
  generateSourceClient = async (userPrompt) => {
@@ -193433,8 +193433,12 @@ class IdeAi
193433
193433
  #createModel = () => {
193434
193434
 
193435
193435
  switch (this.#parent.settings.server) {
193436
+ case "chatopenai":
193437
+ this.#model = new ChatOpenAI({ modelName: "deepseek-coder", openAIApiKey: this.#parent.settings.chatopenaiApiKey, });
193438
+ break;
193436
193439
  case "gemini":
193437
- this.#model = new ChatGoogleGenerativeAI({ model: this.#parent.settings.model, apiKey: this.#parent.settings.geminiApiKey, temperature: 0,});
193440
+ this.#model = new ChatOpenAI({ modelName: "deepseek-coder", openAIApiKey: "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", });
193441
+ //this.#model = new ChatGoogleGenerativeAI({ model: this.#parent.settings.model, apiKey: this.#parent.settings.geminiApiKey, temperature: 0,});
193438
193442
  break;
193439
193443
  case "openai":
193440
193444
  this.#model = new ChatOpenAI({ model: this.#parent.settings.model, apiKey: this.#parent.settings.openaiApiKey, temperature: 0, });
@@ -193765,6 +193769,7 @@ class IdeAi
193765
193769
  const srcPath = this.#getSourcePath(href);
193766
193770
  console.log(srcPath);
193767
193771
 
193772
+
193768
193773
  /**
193769
193774
  * {
193770
193775
  * "package": "ide.assi.be.tmpla",
@@ -193781,12 +193786,74 @@ class IdeAi
193781
193786
  const src = await api.post("/api/source/read", srcPath);
193782
193787
  //console.log(src);
193783
193788
 
193789
+ /**
193784
193790
  const response = await fetch(srcPath.javascript);
193785
- src.javascript = await response.text();
193791
+ src.javascript = await response.text();*/
193792
+
193793
+
193794
+ //console.log(src);
193795
+
193796
+ //const template = await fetch(path).then(res => res.text());
193797
+
193798
+
193799
+
193800
+ const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
193801
+ this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
193802
+
193803
+ console.log(where);
193804
+
193805
+ //const srcPath = this.#getSourcePath(where.menu.url);
193806
+
193807
+ console.log(srcPath);
193808
+
193809
+ const columnInfo = await this.#getColumnInfo(where.table);
193810
+
193811
+ const mybatisXmlSource = await this.#generateTmplFile("/prompts/meta/U.BuildMyBatisMapper.txt", "mybatis.xml", {
193812
+ userPrompt: userPrompt,
193813
+ originSrc: src.mybatis,
193814
+ resultType: srcPath.resultType,
193815
+ namespace: srcPath.namespace,
193816
+ tableDefinitions: columnInfo,
193817
+ });
193818
+ this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
193819
+
193820
+ const serviceSrc = await this.#generateTmplFile("/prompts/meta/U.BuildService.txt", "service.java", {
193821
+ userPrompt: userPrompt,
193822
+ originSrc: src.service,
193823
+ baseClass: srcPath.baseClass,
193824
+ myBatisPath: srcPath.mybatis,
193825
+ namespace: srcPath.namespace,
193826
+ package: srcPath.package + ".service",
193827
+ mybatisXmlSource: mybatisXmlSource,
193828
+ });
193829
+ this.#parent.addMessage("Java(Service) 소스파일을 생성했습니다.");
193830
+
193831
+
193832
+ const controllerSrc = await this.#generateTmplFile("/prompts/meta/U.BuildController.txt", "controller.java", {
193833
+ userPrompt: userPrompt,
193834
+ originSrc: src.controller,
193835
+ baseClass: srcPath.baseClass,
193836
+ menuUrl: where.menu.url,
193837
+ package: srcPath.package + ".controller",
193838
+ serviceSource: serviceSrc,
193839
+ });
193840
+ this.#parent.addMessage("Java(Controller) 소스파일을 생성했습니다.");
193841
+
193842
+
193843
+ await this.#generateTmplFile("/prompts/meta/U.BuildReactJsx.txt", "react.jsx", {
193844
+ userPrompt: userPrompt,
193845
+ originSrc: src.javascript,
193846
+ menuUrl: where.menu.url,
193847
+ menuName: where.menu.name,
193848
+ baseClass: srcPath.baseClass,
193849
+ controllerSource: controllerSrc,
193850
+ tableDefinitions: columnInfo,
193851
+ });
193852
+ this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
193786
193853
 
193787
193854
  console.log(src.javascript);
193788
193855
 
193789
- return;
193856
+ await this.#generateRealFile(srcPath);
193790
193857
  };
193791
193858
 
193792
193859
  generateSourceClient = async (userPrompt) => {
@@ -21,8 +21,12 @@ export class IdeAi
21
21
  #createModel = () => {
22
22
 
23
23
  switch (this.#parent.settings.server) {
24
+ case "chatopenai":
25
+ this.#model = new ChatOpenAI({ modelName: "deepseek-coder", openAIApiKey: this.#parent.settings.chatopenaiApiKey, });
26
+ break;
24
27
  case "gemini":
25
- this.#model = new ChatGoogleGenerativeAI({ model: this.#parent.settings.model, apiKey: this.#parent.settings.geminiApiKey, temperature: 0,});
28
+ this.#model = new ChatOpenAI({ modelName: "deepseek-coder", openAIApiKey: "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", });
29
+ //this.#model = new ChatGoogleGenerativeAI({ model: this.#parent.settings.model, apiKey: this.#parent.settings.geminiApiKey, temperature: 0,});
26
30
  break;
27
31
  case "openai":
28
32
  this.#model = new ChatOpenAI({ model: this.#parent.settings.model, apiKey: this.#parent.settings.openaiApiKey, temperature: 0, });
@@ -353,6 +357,7 @@ export class IdeAi
353
357
  const srcPath = this.#getSourcePath(href);
354
358
  console.log(srcPath);
355
359
 
360
+
356
361
  /**
357
362
  * {
358
363
  * "package": "ide.assi.be.tmpla",
@@ -369,12 +374,10 @@ export class IdeAi
369
374
  const src = await api.post("/api/source/read", srcPath);
370
375
  //console.log(src);
371
376
 
377
+ /**
372
378
  const response = await fetch(srcPath.javascript);
373
- src.javascript = await response.text();
374
-
375
- console.log(src.javascript);
379
+ src.javascript = await response.text();*/
376
380
 
377
- return;
378
381
 
379
382
  //console.log(src);
380
383
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.236.0",
4
+ "version": "0.238.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -21,8 +21,12 @@ export class IdeAi
21
21
  #createModel = () => {
22
22
 
23
23
  switch (this.#parent.settings.server) {
24
+ case "chatopenai":
25
+ this.#model = new ChatOpenAI({ modelName: "deepseek-coder", openAIApiKey: this.#parent.settings.chatopenaiApiKey, });
26
+ break;
24
27
  case "gemini":
25
- this.#model = new ChatGoogleGenerativeAI({ model: this.#parent.settings.model, apiKey: this.#parent.settings.geminiApiKey, temperature: 0,});
28
+ this.#model = new ChatOpenAI({ modelName: "deepseek-coder", openAIApiKey: "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", });
29
+ //this.#model = new ChatGoogleGenerativeAI({ model: this.#parent.settings.model, apiKey: this.#parent.settings.geminiApiKey, temperature: 0,});
26
30
  break;
27
31
  case "openai":
28
32
  this.#model = new ChatOpenAI({ model: this.#parent.settings.model, apiKey: this.#parent.settings.openaiApiKey, temperature: 0, });
@@ -353,6 +357,7 @@ export class IdeAi
353
357
  const srcPath = this.#getSourcePath(href);
354
358
  console.log(srcPath);
355
359
 
360
+
356
361
  /**
357
362
  * {
358
363
  * "package": "ide.assi.be.tmpla",
@@ -369,12 +374,10 @@ export class IdeAi
369
374
  const src = await api.post("/api/source/read", srcPath);
370
375
  //console.log(src);
371
376
 
377
+ /**
372
378
  const response = await fetch(srcPath.javascript);
373
- src.javascript = await response.text();
374
-
375
- console.log(src.javascript);
379
+ src.javascript = await response.text();*/
376
380
 
377
- return;
378
381
 
379
382
  //console.log(src);
380
383