@nine-lab/nine-mu 0.1.114 โ†’ 0.1.115

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,22 +10,21 @@ 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 _logger, _getSourcePath, _service, _routes, _diffPopup, _packageName, _routesPath, _connectorUrl, _mcpClient, _NineChat_instances, initInteractions_fn, initActions_fn, _initMcp, 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
- import { trace, api, nine } from "@nine-lab/nine-util";
14
- class NineMuTrace extends trace {
13
+ import { trace as trace$1, api, nine } from "@nine-lab/nine-util";
14
+ class NineMuTrace extends trace$1.constructor {
15
15
  constructor() {
16
16
  super();
17
17
  __privateAdd(this, _logger);
18
- this.init("nine-mu", "#0969da");
18
+ __privateSet(this, _logger, this.init("nine-mu", "#0969da"));
19
19
  }
20
- /**
21
20
  // ๐Ÿ”ด ๋ถ€๋ชจ์˜ log๋ฅผ ๋‚ด ๋ฆฌ๋ชจ์ปจ์˜ log๋กœ ๋ฎ์–ด์”Œ์›๋‹ˆ๋‹ค (Override)
22
21
  get log() {
23
- return this.#logger.log;
24
- } */
22
+ return __privateGet(this, _logger).log;
23
+ }
25
24
  // ํ•„์š”ํ•˜๋‹ค๋ฉด warn, error๋„ ๋˜‘๊ฐ™์ด...
26
25
  }
27
26
  _logger = new WeakMap();
28
- const trace1 = new NineMuTrace();
27
+ const trace = new NineMuTrace();
29
28
  class NineMuService {
30
29
  constructor(connectorUrl) {
31
30
  __privateAdd(this, _getSourcePath, (menuUrl) => {
@@ -41,7 +40,7 @@ class NineMuService {
41
40
  */
42
41
  async generate(command2, targets, currentRoutes) {
43
42
  try {
44
- trace.log(`๊ณต์ • ์‹œ์ž‘: "${command2}" [๋Œ€์ƒ: ${targets.join(", ")}]`);
43
+ trace$1.log(`๊ณต์ • ์‹œ์ž‘: "${command2}" [๋Œ€์ƒ: ${targets.join(", ")}]`);
45
44
  const response = await fetch(`${this.connectorUrl}/api/mu/generate`, {
46
45
  method: "POST",
47
46
  headers: { "Content-Type": "application/json" },
@@ -58,7 +57,7 @@ class NineMuService {
58
57
  }
59
58
  return result;
60
59
  } catch (error) {
61
- trace.error("NineMu Service Error:", error);
60
+ trace$1.error("NineMu Service Error:", error);
62
61
  throw error;
63
62
  }
64
63
  }
@@ -66,7 +65,7 @@ class NineMuService {
66
65
  }
67
66
  async generateAll_BAK(command2, targets, currentRoutes) {
68
67
  try {
69
- trace.log(`๊ณต์ • ์‹œ์ž‘: "${command2}" [๋Œ€์ƒ: ${targets.join(", ")}]`);
68
+ trace$1.log(`๊ณต์ • ์‹œ์ž‘: "${command2}" [๋Œ€์ƒ: ${targets.join(", ")}]`);
70
69
  const srcPath = __privateGet(this, _getSourcePath).call(this, "/admin/payment/order-list");
71
70
  const srcPath1 = {
72
71
  mybatis: "",
@@ -75,9 +74,9 @@ class NineMuService {
75
74
  javascriptFrom: "",
76
75
  javascriptTo: ""
77
76
  };
78
- trace.log(srcPath);
77
+ trace$1.log(srcPath);
79
78
  const src = await api.post("/nine-ai/source/read", srcPath);
80
- trace.log(src);
79
+ trace$1.log(src);
81
80
  const response = await fetch(`${this.connectorUrl}/api/mu/generateAll`, {
82
81
  method: "POST",
83
82
  headers: { "Content-Type": "application/json" },
@@ -88,14 +87,14 @@ class NineMuService {
88
87
  //currentRoutes
89
88
  })
90
89
  });
91
- trace.log(response);
90
+ trace$1.log(response);
92
91
  const result = await response.json();
93
92
  if (!result.success) {
94
93
  throw new Error(result.error || "์†Œ์Šค ์ƒ์„ฑ ์ค‘ ์„œ๋ฒ„ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค.");
95
94
  }
96
95
  return result;
97
96
  } catch (error) {
98
- trace.error("NineMu Service Error:", error);
97
+ trace$1.error("NineMu Service Error:", error);
99
98
  throw error;
100
99
  }
101
100
  }
@@ -108,7 +107,7 @@ class NineMuService {
108
107
  const res = await fetch(routeUrl);
109
108
  return await res.json();
110
109
  } catch (err) {
111
- trace.error("Route load fail", err);
110
+ trace$1.error("Route load fail", err);
112
111
  return [];
113
112
  }
114
113
  }
@@ -13617,21 +13616,21 @@ class NineChat extends HTMLElement {
13617
13616
  name: "nine-mcp-client",
13618
13617
  version: "1.0.0"
13619
13618
  }, { capabilities: { tools: {} } }));
13620
- trace1.log("Connecting to MCP via WebSocket...");
13619
+ trace.log("Connecting to MCP via WebSocket...");
13621
13620
  await __privateGet(this, _mcpClient).connect(transport);
13622
- trace1.log("โœ… Nine MCP Connected (WebSocket)");
13621
+ trace.log("โœ… Nine MCP Connected (WebSocket)");
13623
13622
  } catch (err) {
13624
- trace1.error("โŒ MCP ์ดˆ๊ธฐํ™” ์—๋Ÿฌ:", err);
13623
+ trace.error("โŒ MCP ์ดˆ๊ธฐํ™” ์—๋Ÿฌ:", err);
13625
13624
  }
13626
13625
  });
13627
13626
  __privateAdd(this, _makeMenuHandler, async (e) => {
13628
13627
  const prompt = await nine.prompt("๋ฉ”๋‰ด์ƒ์„ฑ์‹œ ํ•„์š”ํ•œ AI ํ”„๋กฌํ”„ํŠธ๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”.").rgb();
13629
13628
  if (prompt === null || prompt === void 0) return;
13630
13629
  const res = await api.post(`/nine-mu/source/readFile`, { path: __privateGet(this, _routesPath) });
13631
- trace1.log(res);
13630
+ trace.log(res);
13632
13631
  if (!res || !(res == null ? void 0 : res.contents)) return;
13633
13632
  const jsonRoutes = (res == null ? void 0 : res.contents) ? JSON.parse(res == null ? void 0 : res.contents) : {};
13634
- trace1.log(jsonRoutes);
13633
+ trace.log(jsonRoutes);
13635
13634
  const res2 = await api.post(`${__privateGet(this, _connectorUrl)}/api/source/missing`, {
13636
13635
  routes: jsonRoutes,
13637
13636
  prompt
@@ -13728,7 +13727,7 @@ render_fn = function() {
13728
13727
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
13729
13728
  this.shadowRoot.innerHTML = `
13730
13729
  <style>
13731
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.113"}/dist/css/nine-mu.css";
13730
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.114"}/dist/css/nine-mu.css";
13732
13731
  ${customImport}
13733
13732
  </style>
13734
13733
  <div class="wrapper">
@@ -39623,9 +39622,9 @@ class MergeButtonWidget extends WidgetType {
39623
39622
  button.className = "cm-merge-button accept";
39624
39623
  }
39625
39624
  button.addEventListener("click", () => {
39626
- trace.log(`๋ฒ„ํŠผ ํด๋ฆญ: ${this.isAsisButton ? "ASIS ์ชฝ (์‚ญ์ œ)" : "TOBE ์ชฝ (์ ์šฉ)"}`, this.textToApply);
39627
- trace.log("๋Œ€์ƒ ์—๋””ํ„ฐ:", this.targetEditorView === this.hostComponent.asisEditorView ? "ASIS" : "TOBE");
39628
- trace.log("๋Œ€์ƒ ๋ฒ”์œ„:", this.diffRange);
39625
+ trace$1.log(`๋ฒ„ํŠผ ํด๋ฆญ: ${this.isAsisButton ? "ASIS ์ชฝ (์‚ญ์ œ)" : "TOBE ์ชฝ (์ ์šฉ)"}`, this.textToApply);
39626
+ trace$1.log("๋Œ€์ƒ ์—๋””ํ„ฐ:", this.targetEditorView === this.hostComponent.asisEditorView ? "ASIS" : "TOBE");
39627
+ trace$1.log("๋Œ€์ƒ ๋ฒ”์œ„:", this.diffRange);
39629
39628
  this.applyChanges(this.textToApply, this.targetEditorView, this.diffRange);
39630
39629
  });
39631
39630
  const container = document.createElement("div");
@@ -39636,7 +39635,7 @@ class MergeButtonWidget extends WidgetType {
39636
39635
  // ์‹ค์ œ ๋ณ€๊ฒฝ ์ ์šฉ ๋กœ์ง
39637
39636
  applyChanges(text, editorView, range) {
39638
39637
  if (!editorView || !range) {
39639
- trace.error("Target editor view or range is undefined.", editorView, range);
39638
+ trace$1.error("Target editor view or range is undefined.", editorView, range);
39640
39639
  return;
39641
39640
  }
39642
39641
  editorView.dispatch({
@@ -39677,7 +39676,7 @@ class NineDiff extends HTMLElement {
39677
39676
  __privateSet(this, _asisEditorEl, this.shadowRoot.querySelector(".panel.asis"));
39678
39677
  __privateSet(this, _tobeEditorEl, this.shadowRoot.querySelector(".panel.tobe"));
39679
39678
  if (!__privateGet(this, _asisEditorEl) || !__privateGet(this, _tobeEditorEl)) {
39680
- trace.error("CodeMirror panel containers not found!");
39679
+ trace$1.error("CodeMirror panel containers not found!");
39681
39680
  return;
39682
39681
  }
39683
39682
  const basicExtensions = [
@@ -39718,7 +39717,7 @@ class NineDiff extends HTMLElement {
39718
39717
  EditorView.updateListener.of((update) => {
39719
39718
  if (update.view.contentDOM.firstChild && !update.view._initialAsisContentLoaded) {
39720
39719
  update.view._initialAsisContentLoaded = true;
39721
- trace.log("CodeMirror ASIS view is ready for initial content.");
39720
+ trace$1.log("CodeMirror ASIS view is ready for initial content.");
39722
39721
  asisReady = true;
39723
39722
  checkAllReady();
39724
39723
  }
@@ -39740,7 +39739,7 @@ class NineDiff extends HTMLElement {
39740
39739
  EditorView.updateListener.of((update) => {
39741
39740
  if (update.view.contentDOM.firstChild && !update.view._initialTobeContentLoaded) {
39742
39741
  update.view._initialTobeContentLoaded = true;
39743
- trace.log("CodeMirror TOBE view is ready for initial content.");
39742
+ trace$1.log("CodeMirror TOBE view is ready for initial content.");
39744
39743
  tobeReady = true;
39745
39744
  checkAllReady();
39746
39745
  }
@@ -39803,7 +39802,7 @@ class NineDiff extends HTMLElement {
39803
39802
  const tobeRangeStart = tobeCursor;
39804
39803
  switch (op) {
39805
39804
  case diffMatchPatchExports.diff_match_patch.DIFF_INSERT:
39806
- trace.log("DIFF_INSERT (TOBE added):", JSON.stringify(text));
39805
+ trace$1.log("DIFF_INSERT (TOBE added):", JSON.stringify(text));
39807
39806
  const tobeLines = text.split("\n");
39808
39807
  for (let i = 0; i < tobeLines.length; i++) {
39809
39808
  if (!(i === tobeLines.length - 1 && tobeLines[i] === "" && text.endsWith("\n"))) {
@@ -39831,7 +39830,7 @@ class NineDiff extends HTMLElement {
39831
39830
  );
39832
39831
  break;
39833
39832
  case diffMatchPatchExports.diff_match_patch.DIFF_DELETE:
39834
- trace.log("DIFF_DELETE (ASIS deleted):", JSON.stringify(text));
39833
+ trace$1.log("DIFF_DELETE (ASIS deleted):", JSON.stringify(text));
39835
39834
  const asisLines = text.split("\n");
39836
39835
  for (let i = 0; i < asisLines.length; i++) {
39837
39836
  if (!(i === asisLines.length - 1 && asisLines[i] === "" && text.endsWith("\n"))) {
@@ -39890,7 +39889,7 @@ class NineDiff extends HTMLElement {
39890
39889
  });
39891
39890
  __publicField(this, "initialize", (src1, src2, language2 = "javascript") => {
39892
39891
  if (!__privateGet(this, _asisEditorView) || !__privateGet(this, _tobeEditorView)) {
39893
- trace.warn("CodeMirror Editors not initialized yet.");
39892
+ trace$1.warn("CodeMirror Editors not initialized yet.");
39894
39893
  return;
39895
39894
  }
39896
39895
  __privateSet(this, _isScrollSyncActive, false);
@@ -39946,7 +39945,7 @@ class NineDiff extends HTMLElement {
39946
39945
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
39947
39946
  this.shadowRoot.innerHTML = `
39948
39947
  <style>
39949
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.113"}/dist/css/nine-mu.css";
39948
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.114"}/dist/css/nine-mu.css";
39950
39949
  ${customImport}
39951
39950
  </style>
39952
39951
 
@@ -39963,7 +39962,7 @@ class NineDiff extends HTMLElement {
39963
39962
  bubbles: true,
39964
39963
  composed: true
39965
39964
  }));
39966
- trace.log("dispatchEvent");
39965
+ trace$1.log("dispatchEvent");
39967
39966
  });
39968
39967
  }
39969
39968
  disconnectedCallback() {
@@ -40022,12 +40021,12 @@ class NineDiffPopup extends HTMLElement {
40022
40021
  if (typeof src === "string" && (src.startsWith("url:") || src.startsWith("file:"))) {
40023
40022
  const targetUrl = src.replace(/^(url:|file:)/, "");
40024
40023
  try {
40025
- trace.log(`๐Ÿ“ก ๋ฆฌ๋ชจํŠธ ๋กœ๋“œ: ${targetUrl}`);
40024
+ trace$1.log(`๐Ÿ“ก ๋ฆฌ๋ชจํŠธ ๋กœ๋“œ: ${targetUrl}`);
40026
40025
  const res = await fetch(targetUrl);
40027
40026
  if (!res.ok) throw new Error(`Status: ${res.status}`);
40028
40027
  return await res.text();
40029
40028
  } catch (e) {
40030
- trace.error(`๋กœ๋“œ ์‹คํŒจ [${targetUrl}]:`, e);
40029
+ trace$1.error(`๋กœ๋“œ ์‹คํŒจ [${targetUrl}]:`, e);
40031
40030
  return `// ๋กœ๋“œ ์‹คํŒจ: ${targetUrl}
40032
40031
  ${e.message}`;
40033
40032
  }
@@ -40056,7 +40055,7 @@ render_fn2 = function() {
40056
40055
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
40057
40056
  this.shadowRoot.innerHTML = `
40058
40057
  <style>
40059
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.113"}/dist/css/nine-mu.css";
40058
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.114"}/dist/css/nine-mu.css";
40060
40059
  ${customImport}
40061
40060
  </style>
40062
40061
 
@@ -40095,9 +40094,9 @@ handleCancel_fn = function() {
40095
40094
  };
40096
40095
  customElements.define("nine-diff-popup", NineDiffPopup);
40097
40096
  const NineMu = {
40098
- version: "0.1.113",
40097
+ version: "0.1.114",
40099
40098
  init: (config2) => {
40100
- trace.log("๐Ÿ› ๏ธ Nine-Mu Engine initialized", config2);
40099
+ trace$1.log("๐Ÿ› ๏ธ Nine-Mu Engine initialized", config2);
40101
40100
  }
40102
40101
  };
40103
40102
  export {