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

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