@nine-lab/nine-mu 0.1.240 → 0.1.242

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/dist/nine-mu.js CHANGED
@@ -10,7 +10,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
10
10
  var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
11
11
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
12
12
  var _mcpClient, _onAction, _onStatus, _onMessage, _owner, _routeUrl, _chatHistory, _NineChatManager_instances, connect_fn, updateStatus_fn, callTool_fn, _getSourcePath, _service, _packageName, _routesPath, _connectorUrl, _manager, _$nineChatMessage, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _makeMenuHandler, _sourceGenHandler, _showDiff, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _setupScrollSync, _applyDiffDecorations, _dialog, _diffView, _asisBackup, _host, _NineDiffPopup_instances, render_fn2, handleConfirm_fn, handleCancel_fn, _message, _data, _unique, _init, _message2, _init2, _progressData, _progressElements, _animationIntervals, _ProgressMessage_instances, updateCurrentActiveProgress_fn, renderProgress_fn, updateProgressItemVisuals_fn, startAnimation_fn, updateProgressItem_fn, _renderer, _init3;
13
- import { trace as trace$1, api, nine } from "@nine-lab/nine-util";
13
+ import { trace as trace$1, api, nine as nine$1 } from "@nine-lab/nine-util";
14
14
  class Trace extends trace$1.constructor {
15
15
  constructor() {
16
16
  super();
@@ -17102,8 +17102,27 @@ class NineChatManager {
17102
17102
  });
17103
17103
  /** 백엔드 통신 */
17104
17104
  __publicField(this, "analyzeUnmappedRoutes", async (routes) => {
17105
- const res = await api.post("/nine-mu/config/getUnmappedRoutes", { routes });
17106
- console.log(res);
17105
+ var _a2;
17106
+ try {
17107
+ const res = await api.post("/nine-mu/config/getUnmappedRoutes", { routes });
17108
+ const unmappedRoutes = ((_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.unmappedRoutes) || (res == null ? void 0 : res.unmappedRoutes) || [];
17109
+ if (unmappedRoutes.length === 0) {
17110
+ nine.alert("미개발된 라우터가 없습니다. 모두 매핑되어 있습니다.");
17111
+ return;
17112
+ }
17113
+ return await __privateMethod(this, _NineChatManager_instances, callTool_fn).call(this, "generator-source-brain", {
17114
+ //user_input: `다음 미개발 라우트에 대한 백엔드 소스코드(Controller, Service, MyBatis)를 생성해줘.`,
17115
+ //chat_history: "",
17116
+ routes: route
17117
+ // 미개발된 해당 라우트 정보 객체
17118
+ //current_path: route.path, // 현재 생성 기준 패스 명시
17119
+ });
17120
+ } catch (error) {
17121
+ console.error("미개발 라우트 분석 중 오류 발생:", error);
17122
+ if (nine && typeof nine.alert === "function") {
17123
+ nine.alert("소스 생성 분석 중 오류가 발생했습니다.");
17124
+ }
17125
+ }
17107
17126
  });
17108
17127
  __privateSet(this, _owner, owner);
17109
17128
  __privateSet(this, _routeUrl, __privateGet(this, _owner).getAttribute("route-url"));
@@ -17301,7 +17320,7 @@ class NineChat extends HTMLElement {
17301
17320
  __privateGet(this, _$nineChatMessage).add(who, message);
17302
17321
  });
17303
17322
  __privateAdd(this, _makeMenuHandler, async (e) => {
17304
- const prompt = await nine.prompt("메뉴생성시 필요한 AI 프롬프트를 입력하세요.").rgb();
17323
+ const prompt = await nine$1.prompt("메뉴생성시 필요한 AI 프롬프트를 입력하세요.").rgb();
17305
17324
  if (prompt === null || prompt === void 0) return;
17306
17325
  const res = await api.post(`/nine-mu/source/readFile`, { path: __privateGet(this, _routesPath) });
17307
17326
  trace.log(res);
@@ -17382,7 +17401,7 @@ initActions_fn = function() {
17382
17401
  target.setAttribute("disabled", "disabled");
17383
17402
  __privateGet(this, _$nineChatMessage).add("me", userInput);
17384
17403
  __privateGet(this, _$nineChatMessage).add("ing", "");
17385
- const [result, err] = await nine.safe(__privateGet(this, _manager).handleChatSubmit(target.value));
17404
+ const [result, err] = await nine$1.safe(__privateGet(this, _manager).handleChatSubmit(target.value));
17386
17405
  setTimeout(() => {
17387
17406
  target.value = "";
17388
17407
  });
@@ -17404,7 +17423,7 @@ initActions_fn = function() {
17404
17423
  const hasUpdated = parsed == null ? void 0 : parsed.data.some((item) => item.action === "UPDATE");
17405
17424
  const hasDeleted = parsed == null ? void 0 : parsed.data.some((item) => item.action === "DELETE");
17406
17425
  if (hasUpdated || hasCreated || hasDeleted) {
17407
- nine.alert("메뉴 정리를 위한 라우터 정보 저장 화면으로 이동합니다.").then((res) => {
17426
+ nine$1.alert("메뉴 정리를 위한 라우터 정보 저장 화면으로 이동합니다.").then((res) => {
17408
17427
  const tobe = ((parsed == null ? void 0 : parsed.data) || []).filter((item) => item.action !== "DELETE").map(({ isNew, action, ...rest }) => rest);
17409
17428
  __privateGet(this, _showDiff).call(this, asis, tobe, "json");
17410
17429
  });
@@ -17424,7 +17443,7 @@ render_fn = function() {
17424
17443
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
17425
17444
  this.shadowRoot.innerHTML = `
17426
17445
  <style>
17427
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.239"}/dist/css/nine-mu.css";
17446
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.241"}/dist/css/nine-mu.css";
17428
17447
  ${customImport}
17429
17448
  </style>
17430
17449
  <div class="wrapper">
@@ -43641,7 +43660,7 @@ class NineDiff extends HTMLElement {
43641
43660
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
43642
43661
  this.shadowRoot.innerHTML = `
43643
43662
  <style>
43644
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.239"}/dist/css/nine-mu.css";
43663
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.241"}/dist/css/nine-mu.css";
43645
43664
  ${customImport}
43646
43665
  </style>
43647
43666
 
@@ -43751,7 +43770,7 @@ render_fn2 = function() {
43751
43770
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
43752
43771
  this.shadowRoot.innerHTML = `
43753
43772
  <style>
43754
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.239"}/dist/css/nine-mu.css";
43773
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.241"}/dist/css/nine-mu.css";
43755
43774
  ${customImport}
43756
43775
  </style>
43757
43776
 
@@ -43779,7 +43798,7 @@ handleConfirm_fn = function() {
43779
43798
  contents: content2
43780
43799
  };
43781
43800
  api.post(`/nine-mu/source/generateJsonFile`, params).then((res) => {
43782
- nine.alert("소스를 변경하였습니다.").then((res2) => {
43801
+ nine$1.alert("소스를 변경하였습니다.").then((res2) => {
43783
43802
  __privateGet(this, _dialog).close();
43784
43803
  });
43785
43804
  });
@@ -44077,7 +44096,7 @@ class ChatMessageBody extends HTMLElement {
44077
44096
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
44078
44097
  this.shadowRoot.innerHTML = `
44079
44098
  <style>
44080
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.239"}/dist/css/nine-mu.css";
44099
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.241"}/dist/css/nine-mu.css";
44081
44100
  ${customImport}
44082
44101
  </style>
44083
44102
 
@@ -44171,7 +44190,7 @@ if (!customElements.get("nine-chat-progress")) {
44171
44190
  customElements.define("nine-chat-progress", ProgressMessage);
44172
44191
  }
44173
44192
  const NineMu = {
44174
- version: "0.1.239",
44193
+ version: "0.1.241",
44175
44194
  init: (config2) => {
44176
44195
  trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
44177
44196
  }