@nine-lab/nine-mu 0.1.324 → 0.1.325

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
@@ -9,7 +9,7 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
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
- var _owner, _collectedFiles, _NotificationHandler_instances, handleLoggingMessage_fn, _collectModifySource, _openDiffPopup, _generateSource, _mcpClient, _onAction, _onStatus, _onMessage, _owner2, _routeUrl, _chatHistory, _notiHandler, _NineChatManager_instances, connect_fn, updateStatus_fn, callTool_fn, _getSourcePath, _service, _packageName, _routesPath, _connectorUrl, _manager, _config, _$nineChatMessage, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _makeMenuHandler, _sourceGenHandler, _showDiff, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _isDirty, _initialAsisSrc, _initialTobeSrc, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _checkDirtyState, _setupScrollSync, _applyDiffDecorations, _dialog, _tabContainer, _fileList, _host, _NineDiffPopup_instances, renderScaffolding_fn, handleConfirmAll_fn, handleCancel_fn, _dialog2, _diffView, _asisBackup, _host2, _NineMenuDiffPopup_instances, render_fn2, handleConfirm_fn, handleCancel_fn2, _message, _data, _unique, _init, _message2, _init2, _progressData, _progressElements, _animationIntervals, _ProgressMessage_instances, updateCurrentActiveProgress_fn, renderProgress_fn, updateProgressItemVisuals_fn, startAnimation_fn, updateProgressItem_fn, _renderer, _init3;
12
+ var _owner, _collectedFiles, _NotificationHandler_instances, handleLoggingMessage_fn, _collectModifySource, _openDiffPopup, _generateSource, _generateMenu, _mcpClient, _onAction, _onStatus, _onMessage, _owner2, _routeUrl, _chatHistory, _notiHandler, _NineChatManager_instances, connect_fn, updateStatus_fn, callTool_fn, _getSourcePath, _service, _packageName, _routesPath, _connectorUrl, _manager, _config, _$nineChatMessage, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _makeMenuHandler, _sourceGenHandler, _showDiff, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _isDirty, _initialAsisSrc, _initialTobeSrc, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _checkDirtyState, _setupScrollSync, _applyDiffDecorations, _dialog, _tabContainer, _fileList, _host, _NineDiffPopup_instances, renderScaffolding_fn, handleConfirmAll_fn, handleCancel_fn, _dialog2, _diffView, _asisBackup, _host2, _NineMenuDiffPopup_instances, render_fn2, handleConfirm_fn, handleCancel_fn2, _message, _data, _unique, _init, _message2, _init2, _progressData, _progressElements, _animationIntervals, _ProgressMessage_instances, updateCurrentActiveProgress_fn, renderProgress_fn, updateProgressItemVisuals_fn, startAnimation_fn, updateProgressItem_fn, _renderer, _init3;
13
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() {
@@ -17085,6 +17085,7 @@ class NotificationHandler {
17085
17085
  * 레이어별로 순차 도착하는 파일들을 유실 없이 배열 버퍼에 수집
17086
17086
  */
17087
17087
  __privateAdd(this, _collectModifySource, (data) => {
17088
+ if (!data || !data.source) return;
17088
17089
  const filePayload = {
17089
17090
  layer: data.layer || "Unknown",
17090
17091
  full_path: data.full_path || "unknown_file",
@@ -17114,8 +17115,17 @@ class NotificationHandler {
17114
17115
  * [분리 비즈니스 로직 2] 수신된 소스코드 데이터 유효성 검증 및 추후 파일 저장 연동
17115
17116
  */
17116
17117
  __privateAdd(this, _generateSource, async (data) => {
17118
+ if (!data.path || !data.source) return;
17119
+ const res = await api.post("/nine-mu/source/generateRealFileSingle", {
17120
+ //package_path: data.path,
17121
+ //file_name: data.file_name,
17122
+ currentPath: data.path,
17123
+ contents: data.source
17124
+ });
17125
+ trace.log(res);
17126
+ });
17127
+ __privateAdd(this, _generateMenu, async (data) => {
17117
17128
  trace.log(data);
17118
- return;
17119
17129
  });
17120
17130
  __privateSet(this, _owner, owner);
17121
17131
  }
@@ -17141,23 +17151,18 @@ handleLoggingMessage_fn = function(params) {
17141
17151
  __privateGet(this, _owner).addMessage("ai", message);
17142
17152
  __privateGet(this, _owner).addMessage("ing", "");
17143
17153
  }
17144
- switch (logger) {
17145
- case "generate-source-brain":
17146
- __privateGet(this, _generateSource).call(this, data);
17147
- break;
17148
- case "modify-source-brain":
17149
- if (data && data.source) {
17150
- __privateGet(this, _collectModifySource).call(this, data);
17151
- }
17152
- break;
17153
- case "modify-source-brain-completed":
17154
- __privateGet(this, _openDiffPopup).call(this);
17155
- break;
17156
- }
17154
+ const runAction = {
17155
+ "generate-menu-completed": () => __privateGet(this, _generateMenu).call(this, data),
17156
+ "generate-source-brain": () => __privateGet(this, _generateSource).call(this, data),
17157
+ "modify-source-brain": () => __privateGet(this, _collectModifySource).call(this, data),
17158
+ "modify-source-brain-completed": () => __privateGet(this, _openDiffPopup).call(this)
17159
+ }[logger];
17160
+ runAction == null ? void 0 : runAction();
17157
17161
  };
17158
17162
  _collectModifySource = new WeakMap();
17159
17163
  _openDiffPopup = new WeakMap();
17160
17164
  _generateSource = new WeakMap();
17165
+ _generateMenu = new WeakMap();
17161
17166
  class NineChatManager {
17162
17167
  constructor(owner, callbacks = {}) {
17163
17168
  __privateAdd(this, _NineChatManager_instances);
@@ -17528,17 +17533,6 @@ initActions_fn = function() {
17528
17533
  __privateGet(this, _manager).addChatHistory(parsed.message);
17529
17534
  __privateGet(this, _$nineChatMessage).add("ai", parsed.message);
17530
17535
  const asis = await __privateGet(this, _manager).getRoutes();
17531
- if ((parsed == null ? void 0 : parsed.selected_tool) === "generator-menu") {
17532
- const hasCreated = parsed == null ? void 0 : parsed.data.some((item) => item.action === "CREATE");
17533
- const hasUpdated = parsed == null ? void 0 : parsed.data.some((item) => item.action === "UPDATE");
17534
- const hasDeleted = parsed == null ? void 0 : parsed.data.some((item) => item.action === "DELETE");
17535
- if (hasUpdated || hasCreated || hasDeleted) {
17536
- nine$1.alert("메뉴 정리를 위한 라우터 정보 저장 화면으로 이동합니다.").then((res) => {
17537
- const tobe = ((parsed == null ? void 0 : parsed.data) || []).filter((item) => item.action !== "DELETE").map(({ isNew, action, ...rest }) => rest);
17538
- __privateGet(this, _showDiff).call(this, asis, tobe, "json");
17539
- });
17540
- }
17541
- }
17542
17536
  } catch (err2) {
17543
17537
  trace.error(err2);
17544
17538
  const fallbackMessage = ((_d = (_c = result == null ? void 0 : result.content) == null ? void 0 : _c[0]) == null ? void 0 : _d.text) || "응답 데이터를 해석하지 못했습니다.";
@@ -17553,7 +17547,7 @@ render_fn = function() {
17553
17547
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
17554
17548
  this.shadowRoot.innerHTML = `
17555
17549
  <style>
17556
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.323"}/dist/css/nine-mu.css";
17550
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.324"}/dist/css/nine-mu.css";
17557
17551
  ${customImport}
17558
17552
  </style>
17559
17553
  <div class="wrapper">
@@ -43805,7 +43799,7 @@ class NineDiff extends HTMLElement {
43805
43799
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
43806
43800
  this.shadowRoot.innerHTML = `
43807
43801
  <style>
43808
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.323"}/dist/css/nine-mu.css";
43802
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.324"}/dist/css/nine-mu.css";
43809
43803
  ${customImport}
43810
43804
  </style>
43811
43805
 
@@ -43945,7 +43939,7 @@ renderScaffolding_fn = function() {
43945
43939
  const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
43946
43940
  this.shadowRoot.innerHTML = `
43947
43941
  <style>
43948
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.323"}/dist/css/nine-mu.css";
43942
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.324"}/dist/css/nine-mu.css";
43949
43943
  ${customImport}
43950
43944
  </style>
43951
43945
 
@@ -44054,7 +44048,7 @@ render_fn2 = function() {
44054
44048
  const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
44055
44049
  this.shadowRoot.innerHTML = `
44056
44050
  <style>
44057
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.323"}/dist/css/nine-mu.css";
44051
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.324"}/dist/css/nine-mu.css";
44058
44052
  ${customImport}
44059
44053
  </style>
44060
44054
 
@@ -44385,7 +44379,7 @@ class ChatMessageBody extends HTMLElement {
44385
44379
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
44386
44380
  this.shadowRoot.innerHTML = `
44387
44381
  <style>
44388
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.323"}/dist/css/nine-mu.css";
44382
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.324"}/dist/css/nine-mu.css";
44389
44383
  ${customImport}
44390
44384
  </style>
44391
44385
 
@@ -44479,7 +44473,7 @@ if (!customElements.get("nine-chat-progress")) {
44479
44473
  customElements.define("nine-chat-progress", ProgressMessage);
44480
44474
  }
44481
44475
  const NineMu = {
44482
- version: "0.1.323",
44476
+ version: "0.1.324",
44483
44477
  init: (config2) => {
44484
44478
  trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
44485
44479
  }