@nine-lab/nine-mu 0.1.222 → 0.1.224
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 _mcpClient, _onAction, _onStatus, _onMessage, _owner, _routeUrl, _chatHistory, _NineChatManager_instances, connect_fn, updateStatus_fn, callTool_fn,
|
|
12
|
+
var _mcpClient, _onAction, _onStatus, _onMessage, _owner, _routeUrl, _chatHistory, _NineChatManager_instances, connect_fn, updateStatus_fn, callTool_fn, _getSourcePath, _service, _routes, _diffPopup, _packageName, _routesPath, _connectorUrl, _manager, _$nineChatMessage, _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, _message, _data, _unique, _init, _message2, _init2, _progressData, _progressElements, _animationIntervals, _ProgressMessage_instances, updateCurrentActiveProgress_fn, renderProgress_fn, updateProgressItemVisuals_fn, startAnimation_fn, updateProgressItem_fn, _renderer, _init3;
|
|
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() {
|
|
@@ -17096,7 +17096,7 @@ class NineChatManager {
|
|
|
17096
17096
|
return await __privateMethod(this, _NineChatManager_instances, callTool_fn).call(this, "system-brain", {
|
|
17097
17097
|
user_input: userInput,
|
|
17098
17098
|
chat_history: formattedHistory,
|
|
17099
|
-
routes: await
|
|
17099
|
+
routes: await this.getRoutes(),
|
|
17100
17100
|
current_path: currentPath
|
|
17101
17101
|
});
|
|
17102
17102
|
});
|
|
@@ -17120,6 +17120,10 @@ class NineChatManager {
|
|
|
17120
17120
|
return "";
|
|
17121
17121
|
}
|
|
17122
17122
|
}
|
|
17123
|
+
async getRoutes(toolName, args = {}) {
|
|
17124
|
+
const res = await fetch(__privateGet(this, _routeUrl));
|
|
17125
|
+
return res.ok ? await res.json() : [];
|
|
17126
|
+
}
|
|
17123
17127
|
addChatHistory(message) {
|
|
17124
17128
|
__privateGet(this, _chatHistory).push({ role: "ai", text: message });
|
|
17125
17129
|
}
|
|
@@ -17187,10 +17191,6 @@ updateStatus_fn = function(msg) {
|
|
|
17187
17191
|
callTool_fn = async function(toolName, args = {}) {
|
|
17188
17192
|
return __privateGet(this, _mcpClient).callTool({ name: toolName, arguments: args });
|
|
17189
17193
|
};
|
|
17190
|
-
getRoutes_fn = async function(toolName, args = {}) {
|
|
17191
|
-
const res = await fetch(__privateGet(this, _routeUrl));
|
|
17192
|
-
return res.ok ? await res.json() : [];
|
|
17193
|
-
};
|
|
17194
17194
|
class NineMuService {
|
|
17195
17195
|
constructor(connectorUrl) {
|
|
17196
17196
|
__privateAdd(this, _getSourcePath, (menuUrl) => {
|
|
@@ -17372,7 +17372,7 @@ initInteractions_fn = function() {
|
|
|
17372
17372
|
// --- [그룹 2: Action] 엔터키 입력 시 서비스 호출 ---
|
|
17373
17373
|
initActions_fn = function() {
|
|
17374
17374
|
this.shadowRoot.querySelector("#q").addEventListener("keypress", async (e) => {
|
|
17375
|
-
var _a2, _b, _c, _d
|
|
17375
|
+
var _a2, _b, _c, _d;
|
|
17376
17376
|
if (e.key === "Enter" && !e.shiftKey) {
|
|
17377
17377
|
e.preventDefault();
|
|
17378
17378
|
const target = e.target;
|
|
@@ -17394,18 +17394,18 @@ initActions_fn = function() {
|
|
|
17394
17394
|
trace.log(result);
|
|
17395
17395
|
try {
|
|
17396
17396
|
const rawText = (_b = (_a2 = result == null ? void 0 : result.content) == null ? void 0 : _a2[0]) == null ? void 0 : _b.text;
|
|
17397
|
-
trace.log(rawText);
|
|
17398
17397
|
const parsed = JSON.parse(rawText);
|
|
17399
17398
|
__privateGet(this, _manager).addChatHistory(parsed.message);
|
|
17400
17399
|
__privateGet(this, _$nineChatMessage).add("ai", parsed.message);
|
|
17401
|
-
|
|
17400
|
+
const currRoutes = await __privateGet(this, _$nineChatMessage).getRoutes();
|
|
17401
|
+
if ((parsed == null ? void 0 : parsed.selected_tool) === "source-missing") {
|
|
17402
17402
|
nine.alert("메뉴 정리를 위한 라우터 정보 저장 화면으로 이동합니다.").then((res) => {
|
|
17403
|
-
__privateGet(this, _showDiff).call(this,
|
|
17403
|
+
__privateGet(this, _showDiff).call(this, currRoutes, parsed == null ? void 0 : parsed.data, "json");
|
|
17404
17404
|
});
|
|
17405
17405
|
}
|
|
17406
17406
|
} catch (err2) {
|
|
17407
17407
|
trace.error(err2);
|
|
17408
|
-
const fallbackMessage = ((
|
|
17408
|
+
const fallbackMessage = ((_d = (_c = result == null ? void 0 : result.content) == null ? void 0 : _c[0]) == null ? void 0 : _d.text) || "응답 데이터를 해석하지 못했습니다.";
|
|
17409
17409
|
__privateGet(this, _$nineChatMessage).add("ai", fallbackMessage);
|
|
17410
17410
|
}
|
|
17411
17411
|
}
|
|
@@ -17417,7 +17417,7 @@ render_fn = function() {
|
|
|
17417
17417
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
17418
17418
|
this.shadowRoot.innerHTML = `
|
|
17419
17419
|
<style>
|
|
17420
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
17420
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.223"}/dist/css/nine-mu.css";
|
|
17421
17421
|
${customImport}
|
|
17422
17422
|
</style>
|
|
17423
17423
|
<div class="wrapper">
|
|
@@ -43636,7 +43636,7 @@ class NineDiff extends HTMLElement {
|
|
|
43636
43636
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
43637
43637
|
this.shadowRoot.innerHTML = `
|
|
43638
43638
|
<style>
|
|
43639
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
43639
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.223"}/dist/css/nine-mu.css";
|
|
43640
43640
|
${customImport}
|
|
43641
43641
|
</style>
|
|
43642
43642
|
|
|
@@ -43746,7 +43746,7 @@ render_fn2 = function() {
|
|
|
43746
43746
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
43747
43747
|
this.shadowRoot.innerHTML = `
|
|
43748
43748
|
<style>
|
|
43749
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
43749
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.223"}/dist/css/nine-mu.css";
|
|
43750
43750
|
${customImport}
|
|
43751
43751
|
</style>
|
|
43752
43752
|
|
|
@@ -44073,7 +44073,7 @@ class ChatMessageBody extends HTMLElement {
|
|
|
44073
44073
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
44074
44074
|
this.shadowRoot.innerHTML = `
|
|
44075
44075
|
<style>
|
|
44076
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
44076
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.223"}/dist/css/nine-mu.css";
|
|
44077
44077
|
${customImport}
|
|
44078
44078
|
</style>
|
|
44079
44079
|
|
|
@@ -44167,7 +44167,7 @@ if (!customElements.get("nine-chat-progress")) {
|
|
|
44167
44167
|
customElements.define("nine-chat-progress", ProgressMessage);
|
|
44168
44168
|
}
|
|
44169
44169
|
const NineMu = {
|
|
44170
|
-
version: "0.1.
|
|
44170
|
+
version: "0.1.223",
|
|
44171
44171
|
init: (config2) => {
|
|
44172
44172
|
trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
|
|
44173
44173
|
}
|