@nine-lab/nine-mu 0.1.241 → 0.1.243

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.241",
3
+ "version": "0.1.243",
4
4
  "description": "AI-Driven Full-Stack Code Fabrication Engine",
5
5
  "type": "module",
6
6
  "main": "./dist/nine-mu.umd.js",
@@ -155,8 +155,30 @@ export class NineChatManager {
155
155
 
156
156
  /** 백엔드 통신 */
157
157
  analyzeUnmappedRoutes = async (routes) => {
158
+ try {
159
+ // 1. 백엔드 Java 컨트롤러로 미개발 라우트 분석 요청
160
+ const res = await api.post("/nine-mu/config/getUnmappedRoutes", { routes: routes });
158
161
 
159
- const res = await api.post("/nine-mu/config/getUnmappedRoutes", { routes : routes });
160
- console.log(res);
162
+ // 백엔드 반환 데이터 안전하게 추출 (res.data 구조 확인 필요)
163
+ const unmappedRoutes = res?.data?.unmappedRoutes || res?.unmappedRoutes || [];
164
+
165
+ if (unmappedRoutes.length === 0) {
166
+ nine.alert("미개발된 라우터가 없습니다. 모두 매핑되어 있습니다.");
167
+ return;
168
+ }
169
+
170
+ return await this.#callTool("generator-source-brain", {
171
+ //user_input: `다음 미개발 라우트에 대한 백엔드 소스코드(Controller, Service, MyBatis)를 생성해줘.`,
172
+ //chat_history: "",
173
+ routes: unmappedRoutes, // 미개발된 해당 라우트 정보 객체
174
+ //current_path: route.path, // 현재 생성 기준 패스 명시
175
+ });
176
+
177
+ } catch (error) {
178
+ console.error("미개발 라우트 분석 중 오류 발생:", error);
179
+ if (nine && typeof nine.alert === 'function') {
180
+ nine.alert("소스 생성 분석 중 오류가 발생했습니다.");
181
+ }
182
+ }
161
183
  };
162
184
  }