@nine-lab/nine-mu 0.1.94 → 0.1.95

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.94",
3
+ "version": "0.1.95",
4
4
  "description": "AI-Driven Full-Stack Code Fabrication Engine",
5
5
  "type": "module",
6
6
  "main": "./dist/nine-mu.umd.js",
@@ -21,13 +21,17 @@
21
21
  "release": "npm run build && npm version patch && npm publish"
22
22
  },
23
23
  "devDependencies": {
24
+ "@nine-lab/nine-ai": "*",
25
+ "@nine-lab/nine-nomenu": "*",
26
+ "@nine-lab/nine-util": "^0.9.117",
27
+ "@nine-lab/nine-ux": "*",
24
28
  "terser": "^5.31.0",
25
29
  "vite": "^6.0.0"
26
30
  },
27
31
  "peerDependencies": {
28
32
  "@nine-lab/nine-ai": "*",
29
33
  "@nine-lab/nine-nomenu": "*",
30
- "@nine-lab/nine-util": "^0.9.75",
34
+ "@nine-lab/nine-util": "*",
31
35
  "@nine-lab/nine-ux": "*"
32
36
  },
33
37
  "publishConfig": {
@@ -7,6 +7,7 @@ export class NineChat extends HTMLElement {
7
7
  #diffPopup;
8
8
  #packageName;
9
9
  #routesPath;
10
+ #connectorUrl;
10
11
 
11
12
  constructor() {
12
13
  super();
@@ -18,8 +19,9 @@ export class NineChat extends HTMLElement {
18
19
  this.#packageName = this.getAttribute('package-name');
19
20
 
20
21
  // 서비스 초기화
21
- const connectorUrl = this.getAttribute('connector-url') || 'http://localhost:3002';
22
- this.#service = new NineMuService(connectorUrl);
22
+ this.#connectorUrl = this.getAttribute('connector-url') || 'http://localhost:3002';
23
+
24
+ this.#service = new NineMuService(this.#connectorUrl);
23
25
 
24
26
  this.#render();
25
27
  this.#initInteractions(); // UI 토글 로직
@@ -143,15 +145,23 @@ export class NineChat extends HTMLElement {
143
145
 
144
146
  #makeMenuHandler = async e => {
145
147
 
146
- nine.prompt("aaa");
148
+ const prompt = await nine.prompt("메뉴생성시 필요한 AI 프롬프트를 입력하세요.");
149
+ if (prompt === null || prompt === undefined) return;
147
150
 
148
- const res = await api.post("/nine-mu/source/readFile", { path: this.#routesPath });
151
+ const res = await api.post(`/nine-mu/source/readFile`, { path: this.#routesPath });
149
152
  trace.log(res);
150
153
 
154
+ if (!rec || !res?.contents) return;
155
+
151
156
  const jsonRoutes = res?.contents ? JSON.parse(res?.contents) : {};
152
157
  trace.log(jsonRoutes);
153
158
 
154
-
159
+ // 1. 미생성 소스 분석 요청
160
+ const res2 = await api.post(`${this.#connectorUrl}/api/source/missing`, {
161
+ routes : jsonRoutes,
162
+ prompt : prompt
163
+ });
164
+ trace.log("분석 완료. 생성할 태스크:", res2?.tasks);
155
165
  }
156
166
 
157
167
  #sourceGenHandler = async e => {