@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/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 _getSourcePath, _service, _routes, _diffPopup, _packageName, _routesPath, _connectorUrl, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _makeMenuHandler, _sourceGenHandler, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _setupScrollSync, _applyDiffDecorations, _dialog, _diffView, _asisBackup, _host, _NineDiffPopup_instances, render_fn2, handleConfirm_fn, handleCancel_fn;
12
+ var _getSourcePath, _service, _routes, _diffPopup, _packageName, _routesPath, _connectorUrl, _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;
13
13
  import { trace, api, nine } from "@nine-lab/nine-util";
14
14
  class NineMuService {
15
15
  constructor(connectorUrl) {
@@ -110,7 +110,7 @@ class NineChat extends HTMLElement {
110
110
  __privateAdd(this, _routesPath);
111
111
  __privateAdd(this, _connectorUrl);
112
112
  __privateAdd(this, _makeMenuHandler, async (e) => {
113
- const prompt = await nine.prompt("메뉴생성시 필요한 AI 프롬프트를 입력하세요.");
113
+ const prompt = await nine.prompt("메뉴생성시 필요한 AI 프롬프트를 입력하세요.").rgb();
114
114
  if (prompt === null || prompt === void 0) return;
115
115
  const res = await api.post(`/nine-mu/source/readFile`, { path: __privateGet(this, _routesPath) });
116
116
  trace.log(res);
@@ -121,7 +121,9 @@ class NineChat extends HTMLElement {
121
121
  routes: jsonRoutes,
122
122
  prompt
123
123
  });
124
- trace.log("분석 완료. 생성할 태스크:", res2 == null ? void 0 : res2.tasks);
124
+ if (res2.success && (res2 == null ? void 0 : res2.tasks)) {
125
+ __privateGet(this, _showDiff).call(this, jsonRoutes, res2 == null ? void 0 : res2.tasks, "json");
126
+ }
125
127
  });
126
128
  __privateAdd(this, _sourceGenHandler, async (e) => {
127
129
  const command2 = "";
@@ -136,7 +138,7 @@ class NineChat extends HTMLElement {
136
138
  nine.alert(err.message).rgb().shake();
137
139
  }
138
140
  });
139
- __publicField(this, "showDiff", (asis, tobe, lang) => {
141
+ __privateAdd(this, _showDiff, (asis, tobe, lang) => {
140
142
  __privateGet(this, _diffPopup).popup().data(asis, tobe, lang);
141
143
  });
142
144
  this.attachShadow({ mode: "open" });
@@ -208,7 +210,7 @@ render_fn = function() {
208
210
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
209
211
  this.shadowRoot.innerHTML = `
210
212
  <style>
211
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.97"}/dist/css/nine-mu.css";
213
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.99"}/dist/css/nine-mu.css";
212
214
  ${customImport}
213
215
  </style>
214
216
  <div class="wrapper">
@@ -248,6 +250,7 @@ render_fn = function() {
248
250
  };
249
251
  _makeMenuHandler = new WeakMap();
250
252
  _sourceGenHandler = new WeakMap();
253
+ _showDiff = new WeakMap();
251
254
  if (!customElements.get("nine-chat")) {
252
255
  customElements.define("nine-chat", NineChat);
253
256
  }
@@ -26425,7 +26428,7 @@ class NineDiff extends HTMLElement {
26425
26428
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
26426
26429
  this.shadowRoot.innerHTML = `
26427
26430
  <style>
26428
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.97"}/dist/css/nine-mu.css";
26431
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.99"}/dist/css/nine-mu.css";
26429
26432
  ${customImport}
26430
26433
  </style>
26431
26434
 
@@ -26535,7 +26538,7 @@ render_fn2 = function() {
26535
26538
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
26536
26539
  this.shadowRoot.innerHTML = `
26537
26540
  <style>
26538
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.97"}/dist/css/nine-mu.css";
26541
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.99"}/dist/css/nine-mu.css";
26539
26542
  ${customImport}
26540
26543
  </style>
26541
26544
 
@@ -26574,7 +26577,7 @@ handleCancel_fn = function() {
26574
26577
  };
26575
26578
  customElements.define("nine-diff-popup", NineDiffPopup);
26576
26579
  const NineMu = {
26577
- version: "0.1.97",
26580
+ version: "0.1.99",
26578
26581
  init: (config) => {
26579
26582
  trace.log("🛠️ Nine-Mu Engine initialized", config);
26580
26583
  }