@nine-lab/nine-mu 0.1.98 → 0.1.100

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nine-lab/nine-mu",
3
- "version": "0.1.98",
3
+ "version": "0.1.100",
4
4
  "description": "AI-Driven Full-Stack Code Fabrication Engine",
5
5
  "type": "module",
6
6
  "main": "./dist/nine-mu.umd.js",
@@ -144,7 +144,7 @@ export class NineChat extends HTMLElement {
144
144
 
145
145
  #makeMenuHandler = async e => {
146
146
 
147
- const prompt = await nine.prompt("메뉴생성시 필요한 AI 프롬프트를 입력하세요.");
147
+ const prompt = await nine.prompt("메뉴생성시 필요한 AI 프롬프트를 입력하세요.").rgb();
148
148
  if (prompt === null || prompt === undefined) return;
149
149
 
150
150
  const res = await api.post(`/nine-mu/source/readFile`, { path: this.#routesPath });
@@ -160,7 +160,24 @@ export class NineChat extends HTMLElement {
160
160
  routes : jsonRoutes,
161
161
  prompt : prompt
162
162
  });
163
- trace.log("분석 완료. 생성할 태스크:", res2?.tasks);
163
+ //trace.log("분석 완료. 생성할 태스크:", res2?.tasks);
164
+
165
+ if (res2.success && res2?.tasks) {
166
+ /**
167
+ // 2. 이미 만들어두신 자바 컨트롤러의 saveRoutes 호출
168
+ const saveRes = await api.post("/nine-mu/source/generateTmplFile", {
169
+ //basePath: "/Users/nandoo/nine-edu/nine-edu-web/nine-edu-be/tmpl",
170
+ fileNm: "routes.json",
171
+ contents: JSON.stringify(res.tasks, null, 2),
172
+ //routes: res.tasks,
173
+ //feProjectName: "nine-edu-fe-admin" // 현재 프로젝트명
174
+ });
175
+
176
+ trace.log(saveRes);
177
+ */
178
+ //this.#showDiff(jsonRoutes, JSON.stringify(res2?.tasks, null, 2), "json");
179
+ this.#showDiff(jsonRoutes, res2?.tasks, "json");
180
+ }
164
181
  }
165
182
 
166
183
  #sourceGenHandler = async e => {
@@ -181,7 +198,7 @@ export class NineChat extends HTMLElement {
181
198
  }
182
199
  }
183
200
 
184
- showDiff = (asis, tobe, lang) => {
201
+ #showDiff = (asis, tobe, lang) => {
185
202
  this.#diffPopup.popup().data(asis, tobe, lang);
186
203
  }
187
204
  }