@nine-lab/nine-mu 0.1.138 → 0.1.139

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 _client, _connectorUrl, _onAction, _onStatus, _onMessage, _owner, _NineChatManager_instances, connect_fn, fetchRoutes_fn, pushMessage_fn, updateStatus_fn, _getSourcePath, _service, _routes, _diffPopup, _packageName, _routesPath, _connectorUrl2, _mcpClient, _manager, _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;
12
+ var _client, _onAction, _onStatus, _onMessage, _owner, _NineChatManager_instances, connect_fn, fetchRoutes_fn, pushMessage_fn, updateStatus_fn, _getSourcePath, _service, _routes, _diffPopup, _packageName, _routesPath, _connectorUrl, _mcpClient, _manager, _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
13
  import { trace as trace$1, api, nine } from "@nine-lab/nine-util";
14
14
  class Trace extends trace$1.constructor {
15
15
  constructor() {
@@ -13506,14 +13506,12 @@ class NineChatManager {
13506
13506
  constructor(owner, callbacks = {}) {
13507
13507
  __privateAdd(this, _NineChatManager_instances);
13508
13508
  __privateAdd(this, _client);
13509
- __privateAdd(this, _connectorUrl);
13510
13509
  __privateAdd(this, _onAction);
13511
13510
  __privateAdd(this, _onStatus);
13512
13511
  __privateAdd(this, _onMessage);
13513
13512
  // UI에 메시지를 뿌려줄 콜백 추가
13514
13513
  __privateAdd(this, _owner);
13515
13514
  __privateSet(this, _owner, owner);
13516
- __privateSet(this, _connectorUrl, __privateGet(this, _owner).getAttribute("connector-url"));
13517
13515
  __privateSet(this, _onAction, callbacks.onAction);
13518
13516
  __privateSet(this, _onStatus, callbacks.onStatus);
13519
13517
  __privateSet(this, _onMessage, callbacks.onMessage);
@@ -13562,7 +13560,6 @@ class NineChatManager {
13562
13560
  }
13563
13561
  }
13564
13562
  _client = new WeakMap();
13565
- _connectorUrl = new WeakMap();
13566
13563
  _onAction = new WeakMap();
13567
13564
  _onStatus = new WeakMap();
13568
13565
  _onMessage = new WeakMap();
@@ -13571,7 +13568,8 @@ _NineChatManager_instances = new WeakSet();
13571
13568
  connect_fn = async function() {
13572
13569
  if (__privateGet(this, _client)) return;
13573
13570
  try {
13574
- const transport = new WebSocketClientTransport(new URL(__privateGet(this, _connectorUrl)));
13571
+ const connectorUrl = __privateGet(this, _owner).getAttribute("connector-url");
13572
+ const transport = new WebSocketClientTransport(new URL(connectorUrl));
13575
13573
  __privateSet(this, _client, new Client({
13576
13574
  name: "nine-mu-client",
13577
13575
  version: "1.0.0"
@@ -13700,13 +13698,13 @@ class NineChat extends HTMLElement {
13700
13698
  __privateAdd(this, _diffPopup);
13701
13699
  __privateAdd(this, _packageName);
13702
13700
  __privateAdd(this, _routesPath);
13703
- __privateAdd(this, _connectorUrl2);
13701
+ __privateAdd(this, _connectorUrl);
13704
13702
  __privateAdd(this, _mcpClient);
13705
13703
  __privateAdd(this, _manager);
13706
13704
  __privateAdd(this, _initMcp, async () => {
13707
13705
  if (__privateGet(this, _mcpClient)) return;
13708
13706
  try {
13709
- const transport = new WebSocketClientTransport(new URL(__privateGet(this, _connectorUrl2)));
13707
+ const transport = new WebSocketClientTransport(new URL(__privateGet(this, _connectorUrl)));
13710
13708
  __privateSet(this, _mcpClient, new Client({
13711
13709
  name: "nine-mcp-client",
13712
13710
  version: "1.0.0"
@@ -13726,7 +13724,7 @@ class NineChat extends HTMLElement {
13726
13724
  if (!res || !(res == null ? void 0 : res.contents)) return;
13727
13725
  const jsonRoutes = (res == null ? void 0 : res.contents) ? JSON.parse(res == null ? void 0 : res.contents) : {};
13728
13726
  trace.log(jsonRoutes);
13729
- const res2 = await api.post(`${__privateGet(this, _connectorUrl2)}/api/source/missing`, {
13727
+ const res2 = await api.post(`${__privateGet(this, _connectorUrl)}/api/source/missing`, {
13730
13728
  routes: jsonRoutes,
13731
13729
  prompt
13732
13730
  });
@@ -13754,8 +13752,8 @@ class NineChat extends HTMLElement {
13754
13752
  }
13755
13753
  async connectedCallback() {
13756
13754
  __privateSet(this, _packageName, this.getAttribute("package-name"));
13757
- __privateSet(this, _connectorUrl2, this.getAttribute("connector-url") || "http://localhost:3002");
13758
- __privateSet(this, _service, new NineMuService(__privateGet(this, _connectorUrl2)));
13755
+ __privateSet(this, _connectorUrl, this.getAttribute("connector-url") || "http://localhost:3002");
13756
+ __privateSet(this, _service, new NineMuService(__privateGet(this, _connectorUrl)));
13759
13757
  __privateMethod(this, _NineChat_instances, render_fn).call(this);
13760
13758
  __privateMethod(this, _NineChat_instances, initInteractions_fn).call(this);
13761
13759
  __privateMethod(this, _NineChat_instances, initActions_fn).call(this);
@@ -13771,7 +13769,7 @@ _routes = new WeakMap();
13771
13769
  _diffPopup = new WeakMap();
13772
13770
  _packageName = new WeakMap();
13773
13771
  _routesPath = new WeakMap();
13774
- _connectorUrl2 = new WeakMap();
13772
+ _connectorUrl = new WeakMap();
13775
13773
  _mcpClient = new WeakMap();
13776
13774
  _manager = new WeakMap();
13777
13775
  _NineChat_instances = new WeakSet();
@@ -13823,7 +13821,7 @@ render_fn = function() {
13823
13821
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
13824
13822
  this.shadowRoot.innerHTML = `
13825
13823
  <style>
13826
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.137"}/dist/css/nine-mu.css";
13824
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.138"}/dist/css/nine-mu.css";
13827
13825
  ${customImport}
13828
13826
  </style>
13829
13827
  <div class="wrapper">
@@ -40041,7 +40039,7 @@ class NineDiff extends HTMLElement {
40041
40039
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
40042
40040
  this.shadowRoot.innerHTML = `
40043
40041
  <style>
40044
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.137"}/dist/css/nine-mu.css";
40042
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.138"}/dist/css/nine-mu.css";
40045
40043
  ${customImport}
40046
40044
  </style>
40047
40045
 
@@ -40151,7 +40149,7 @@ render_fn2 = function() {
40151
40149
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
40152
40150
  this.shadowRoot.innerHTML = `
40153
40151
  <style>
40154
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.137"}/dist/css/nine-mu.css";
40152
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.138"}/dist/css/nine-mu.css";
40155
40153
  ${customImport}
40156
40154
  </style>
40157
40155
 
@@ -40190,7 +40188,7 @@ handleCancel_fn = function() {
40190
40188
  };
40191
40189
  customElements.define("nine-diff-popup", NineDiffPopup);
40192
40190
  const NineMu = {
40193
- version: "0.1.137",
40191
+ version: "0.1.138",
40194
40192
  init: (config2) => {
40195
40193
  trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
40196
40194
  }