@nine-lab/nine-mu 0.1.337 β†’ 0.1.339

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, _openRouteDiffPopup, _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, _sourceGenHandler, _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, _lastPath, _hasError, _cssPath, _renderer2, _ExceptionHook_instances, injectShadowStylesheet_fn, _handleRuntimeError, _handlePromiseError, _handleLocationChange, _sendToAiAction, renderError_fn;
12
+ var _owner, _collectedFiles, _NotificationHandler_instances, handleLoggingMessage_fn, _collectModifySource, _openDiffPopup, _openRouteDiffPopup, _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, _sourceGenHandler, _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, _lastPath, _hasError, _cssPath, _oldOnError, _ExceptionHook_instances, setupGlobalSniffer_fn, _renderer2, injectShadowStylesheet_fn, _handleRuntimeError, _handlePromiseError, _handleLocationChange, _sendToAiAction, renderError_fn;
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() {
@@ -17537,7 +17537,7 @@ render_fn = function() {
17537
17537
  const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
17538
17538
  this.shadowRoot.innerHTML = `
17539
17539
  <style>
17540
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.336"}/dist/css/nine-mu.css";
17540
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.338"}/dist/css/nine-mu.css";
17541
17541
  ${customImport}
17542
17542
  </style>
17543
17543
  <div class="wrapper">
@@ -43787,7 +43787,7 @@ class NineDiff extends HTMLElement {
43787
43787
  const customImport = nine.cssPath ? `@import "${nine.cssPath}/nine-mu.css";` : "";
43788
43788
  this.shadowRoot.innerHTML = `
43789
43789
  <style>
43790
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.336"}/dist/css/nine-mu.css";
43790
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.338"}/dist/css/nine-mu.css";
43791
43791
  ${customImport}
43792
43792
  </style>
43793
43793
 
@@ -43927,7 +43927,7 @@ renderScaffolding_fn = function() {
43927
43927
  const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
43928
43928
  this.shadowRoot.innerHTML = `
43929
43929
  <style>
43930
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.336"}/dist/css/nine-mu.css";
43930
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.338"}/dist/css/nine-mu.css";
43931
43931
  ${customImport}
43932
43932
  </style>
43933
43933
 
@@ -44036,7 +44036,7 @@ render_fn2 = function() {
44036
44036
  const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
44037
44037
  this.shadowRoot.innerHTML = `
44038
44038
  <style>
44039
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.336"}/dist/css/nine-mu.css";
44039
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.338"}/dist/css/nine-mu.css";
44040
44040
  ${customImport}
44041
44041
  </style>
44042
44042
 
@@ -44366,7 +44366,7 @@ class ChatMessageBody extends HTMLElement {
44366
44366
  const customImport = nine.cssPath ? `@import "${nine.cssPath}/nine-mu.css";` : "";
44367
44367
  this.shadowRoot.innerHTML = `
44368
44368
  <style>
44369
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.336"}/dist/css/nine-mu.css";
44369
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.338"}/dist/css/nine-mu.css";
44370
44370
  ${customImport}
44371
44371
  </style>
44372
44372
 
@@ -44468,18 +44468,19 @@ class ExceptionHook extends HTMLElement {
44468
44468
  constructor() {
44469
44469
  super();
44470
44470
  __privateAdd(this, _ExceptionHook_instances);
44471
- // πŸ’‘ [핡심] λΉ„κ³΅κ°œ μΈμŠ€ν„΄μŠ€ ν•„λ“œλŠ” 클래슀 μ΅œμƒλ‹¨μ— λ¨Όμ € μ„ μ–Έν•΄μ•Ό ν•©λ‹ˆλ‹€.
44471
+ // πŸ’‘ λΉ„κ³΅κ°œ μΈμŠ€ν„΄μŠ€ ν•„λ“œ μ •μ˜
44472
44472
  __privateAdd(this, _lastPath, window.location.pathname);
44473
44473
  __privateAdd(this, _hasError, false);
44474
44474
  __privateAdd(this, _cssPath, "/css/nine-exception-hook.css");
44475
+ __privateAdd(this, _oldOnError, null);
44475
44476
  __privateAdd(this, _renderer2, () => {
44476
- const customImport = nine.cssPath ? `@import "${nine.cssPath}/nine-mu.css";` : "";
44477
+ const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
44477
44478
  this.shadowRoot.innerHTML = `
44478
- <style>
44479
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.336"}/dist/css/nine-mu.css";
44480
- ${customImport}
44481
- </style>
44482
-
44479
+ <style>
44480
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.338"}/dist/css/nine-mu.css";
44481
+ ${customImport}
44482
+ </style>
44483
+
44483
44484
  <div class="nine-hook-core">
44484
44485
  <slot></slot>
44485
44486
  </div>
@@ -44491,7 +44492,7 @@ class ExceptionHook extends HTMLElement {
44491
44492
  if (__privateGet(this, _hasError)) return;
44492
44493
  const errorMessage = ((_a2 = event.error) == null ? void 0 : _a2.message) || event.message || String(event);
44493
44494
  const errorStack = ((_b = event.error) == null ? void 0 : _b.stack) || "No stack trace available";
44494
- if (errorMessage) {
44495
+ if (errorMessage && errorMessage !== "Script error.") {
44495
44496
  __privateMethod(this, _ExceptionHook_instances, renderError_fn).call(this, errorMessage, errorStack);
44496
44497
  }
44497
44498
  });
@@ -44543,11 +44544,10 @@ class ExceptionHook extends HTMLElement {
44543
44544
  });
44544
44545
  this.attachShadow({ mode: "open" });
44545
44546
  }
44546
- // src/components/exception/ExceptionHook.js λ‚΄λΆ€ μˆ˜μ •
44547
44547
  connectedCallback() {
44548
44548
  __privateGet(this, _renderer2).call(this);
44549
44549
  __privateMethod(this, _ExceptionHook_instances, injectShadowStylesheet_fn).call(this);
44550
- window.addEventListener("error", __privateGet(this, _handleRuntimeError), true);
44550
+ __privateMethod(this, _ExceptionHook_instances, setupGlobalSniffer_fn).call(this);
44551
44551
  window.addEventListener("unhandledrejection", __privateGet(this, _handlePromiseError), true);
44552
44552
  window.addEventListener("popstate", __privateGet(this, _handleLocationChange));
44553
44553
  document.addEventListener("click", __privateGet(this, _handleLocationChange), true);
@@ -44557,13 +44557,32 @@ class ExceptionHook extends HTMLElement {
44557
44557
  window.removeEventListener("unhandledrejection", __privateGet(this, _handlePromiseError), true);
44558
44558
  window.removeEventListener("popstate", __privateGet(this, _handleLocationChange));
44559
44559
  document.removeEventListener("click", __privateGet(this, _handleLocationChange), true);
44560
+ if (window.onerror === __privateGet(this, _handleRuntimeError) || __privateGet(this, _oldOnError)) {
44561
+ window.onerror = __privateGet(this, _oldOnError);
44562
+ }
44560
44563
  }
44561
44564
  }
44562
44565
  _lastPath = new WeakMap();
44563
44566
  _hasError = new WeakMap();
44564
44567
  _cssPath = new WeakMap();
44565
- _renderer2 = new WeakMap();
44568
+ _oldOnError = new WeakMap();
44566
44569
  _ExceptionHook_instances = new WeakSet();
44570
+ setupGlobalSniffer_fn = function() {
44571
+ window.addEventListener("error", __privateGet(this, _handleRuntimeError), true);
44572
+ __privateSet(this, _oldOnError, window.onerror);
44573
+ window.onerror = (message, source, lineno, colno, error) => {
44574
+ if (!__privateGet(this, _hasError)) {
44575
+ const errorMessage = (error == null ? void 0 : error.message) || message || "μ•Œ 수 μ—†λŠ” λŸ°νƒ€μž„ μ˜ˆμ™Έ";
44576
+ const errorStack = (error == null ? void 0 : error.stack) || `${source}:${lineno}:${colno}`;
44577
+ __privateMethod(this, _ExceptionHook_instances, renderError_fn).call(this, errorMessage, errorStack);
44578
+ }
44579
+ if (__privateGet(this, _oldOnError)) {
44580
+ return __privateGet(this, _oldOnError).call(this, message, source, lineno, colno, error);
44581
+ }
44582
+ return false;
44583
+ };
44584
+ };
44585
+ _renderer2 = new WeakMap();
44567
44586
  injectShadowStylesheet_fn = function() {
44568
44587
  if (this.shadowRoot.querySelector(`link[href="${__privateGet(this, _cssPath)}"]`)) return;
44569
44588
  const link = document.createElement("link");
@@ -44583,19 +44602,19 @@ renderError_fn = function(errorMessage, errorStack) {
44583
44602
  const exceptionBoard = this.shadowRoot.querySelector(".nine-exception-board");
44584
44603
  if (!exceptionBoard) return;
44585
44604
  const errorHTML = `
44586
- <div class="nine-error-container">
44587
- <h3 class="nine-error-title">⚠️ μ‹œμŠ€ν…œ μ˜ˆμ™Έ 감지 (${this.tagName.toLowerCase()})</h3>
44588
- <p class="nine-error-label">[μ—λŸ¬ 원인 둜그]:</p>
44589
- <pre class="nine-error-log">${errorMessage}</pre>
44590
-
44591
- <div class="nine-action-area" style="margin-top: 20px; display: flex; align-items: center; gap: 15px;">
44592
- <button class="nine-ai-btn">πŸ€– AIμ—κ²Œ μ†ŒμŠ€μ½”λ“œ μˆ˜μ • μš”μ²­</button>
44593
- <div class="nine-error-footer">
44594
- λ²„νŠΌμ„ λˆ„λ₯΄λ©΄ AIκ°€ 둜그 및 μ»΄ν¬λ„ŒνŠΈ 맡을 μ—­μΆ”μ ν•˜μ—¬ μˆ˜μ •μ„ μ‹œμž‘ν•©λ‹ˆλ‹€.
44595
- </div>
44596
- </div>
44597
- </div>
44598
- `;
44605
+ <div class="nine-error-container">
44606
+ <h3 class="nine-error-title">⚠️ μ‹œμŠ€ν…œ μ˜ˆμ™Έ 감지 (${this.tagName.toLowerCase()})</h3>
44607
+ <p class="nine-error-label">[μ—λŸ¬ 원인 둜그]:</p>
44608
+ <pre class="nine-error-log">${errorMessage}</pre>
44609
+
44610
+ <div class="nine-action-area" style="margin-top: 20px; display: flex; align-items: center; gap: 15px;">
44611
+ <button class="nine-ai-btn">πŸ€– AIμ—κ²Œ μ†ŒμŠ€μ½”λ“œ μˆ˜μ • μš”μ²­</button>
44612
+ <div class="nine-error-footer">
44613
+ λ²„νŠΌμ„ λˆ„λ₯΄λ©΄ AIκ°€ 둜그 및 μ»΄ν¬λ„ŒνŠΈ 맡을 μ—­μΆ”μ ν•˜μ—¬ μˆ˜μ •μ„ μ‹œμž‘ν•©λ‹ˆλ‹€.
44614
+ </div>
44615
+ </div>
44616
+ </div>
44617
+ `;
44599
44618
  exceptionBoard.innerHTML = errorHTML;
44600
44619
  const aiBtn = this.shadowRoot.querySelector(".nine-ai-btn");
44601
44620
  if (aiBtn) {
@@ -44606,7 +44625,7 @@ if (!customElements.get("nine-exception-hook")) {
44606
44625
  customElements.define("nine-exception-hook", ExceptionHook);
44607
44626
  }
44608
44627
  const NineMu = {
44609
- version: "0.1.336",
44628
+ version: "0.1.338",
44610
44629
  init: (config2) => {
44611
44630
  trace$1.log("πŸ› οΈ Nine-Mu Engine initialized", config2);
44612
44631
  }