@nine-lab/nine-mu 0.1.144 → 0.1.146
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 +26 -18
- package/dist/nine-mu.js.map +1 -1
- package/dist/nine-mu.umd.js +3 -3
- package/dist/nine-mu.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/NineChatManager.js +26 -10
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, _NineChatManager_instances, connect_fn, fetchRoutes_fn, pushMessage_fn, updateStatus_fn, _getSourcePath, _service, _routes, _diffPopup, _packageName, _routesPath, _connectorUrl, _mcpClient2, _manager, _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;
|
|
12
|
+
var _mcpClient, _onAction, _onStatus, _onMessage, _owner, _NineChatManager_instances, connect_fn, fetchRoutes_fn, pushMessage_fn, updateStatus_fn, callTool_fn, _getSourcePath, _service, _routes, _diffPopup, _packageName, _routesPath, _connectorUrl, _mcpClient2, _manager, _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;
|
|
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() {
|
|
@@ -13512,15 +13512,12 @@ class NineChatManager {
|
|
|
13512
13512
|
// UI에 메시지를 뿌려줄 콜백 추가
|
|
13513
13513
|
__privateAdd(this, _owner);
|
|
13514
13514
|
__publicField(this, "handleChatSubmit", async (el) => {
|
|
13515
|
-
|
|
13516
|
-
|
|
13517
|
-
|
|
13518
|
-
|
|
13519
|
-
|
|
13520
|
-
// 현재 화면의 메뉴 정보
|
|
13521
|
-
}
|
|
13515
|
+
trace.log(__privateGet(this, _mcpClient));
|
|
13516
|
+
__privateMethod(this, _NineChatManager_instances, callTool_fn).call(this, "system-brain", {
|
|
13517
|
+
user_input: el.value.trim(),
|
|
13518
|
+
routes,
|
|
13519
|
+
current_path: "/group_member/student_management"
|
|
13522
13520
|
});
|
|
13523
|
-
console.log(response);
|
|
13524
13521
|
});
|
|
13525
13522
|
__privateSet(this, _owner, owner);
|
|
13526
13523
|
__privateSet(this, _onAction, callbacks.onAction);
|
|
@@ -13535,12 +13532,12 @@ class NineChatManager {
|
|
|
13535
13532
|
}
|
|
13536
13533
|
try {
|
|
13537
13534
|
__privateMethod(this, _NineChatManager_instances, pushMessage_fn).call(this, "user", userInput);
|
|
13538
|
-
const
|
|
13535
|
+
const routes2 = await __privateMethod(this, _NineChatManager_instances, fetchRoutes_fn).call(this);
|
|
13539
13536
|
const response = await __privateGet(this, _mcpClient).callTool({
|
|
13540
13537
|
name: "system-brain",
|
|
13541
13538
|
arguments: {
|
|
13542
13539
|
user_input: userInput,
|
|
13543
|
-
routes,
|
|
13540
|
+
routes: routes2,
|
|
13544
13541
|
current_path: window.location.pathname
|
|
13545
13542
|
// 실시간 경로 주입
|
|
13546
13543
|
}
|
|
@@ -13551,7 +13548,7 @@ class NineChatManager {
|
|
|
13551
13548
|
if (__privateGet(this, _onAction)) __privateGet(this, _onAction).call(this, result);
|
|
13552
13549
|
__privateMethod(this, _NineChatManager_instances, updateStatus_fn).call(this, "준비 완료");
|
|
13553
13550
|
} catch (err) {
|
|
13554
|
-
trace
|
|
13551
|
+
trace.error("❌ Ask Error:", err);
|
|
13555
13552
|
__privateMethod(this, _NineChatManager_instances, pushMessage_fn).call(this, "assistant", "분석 중 오류가 발생했습니다.");
|
|
13556
13553
|
__privateMethod(this, _NineChatManager_instances, updateStatus_fn).call(this, "에러 발생");
|
|
13557
13554
|
}
|
|
@@ -13584,10 +13581,11 @@ connect_fn = async function() {
|
|
|
13584
13581
|
name: "nine-mu-client",
|
|
13585
13582
|
version: "1.0.0"
|
|
13586
13583
|
}, { capabilities: { tools: {} } }));
|
|
13584
|
+
trace.log(__privateGet(this, _mcpClient));
|
|
13587
13585
|
__privateGet(this, _mcpClient).connect(transport).then(() => {
|
|
13588
13586
|
__privateMethod(this, _NineChatManager_instances, updateStatus_fn).call(this, "✅ MCP Connected");
|
|
13589
13587
|
}).catch((err) => {
|
|
13590
|
-
trace
|
|
13588
|
+
trace.error("❌ MCP 연결 실패", err);
|
|
13591
13589
|
__privateMethod(this, _NineChatManager_instances, updateStatus_fn).call(this, "❌ Connection Failed");
|
|
13592
13590
|
});
|
|
13593
13591
|
};
|
|
@@ -13609,7 +13607,17 @@ pushMessage_fn = function(role, content2, result = null) {
|
|
|
13609
13607
|
};
|
|
13610
13608
|
updateStatus_fn = function(msg) {
|
|
13611
13609
|
if (__privateGet(this, _onStatus)) __privateGet(this, _onStatus).call(this, msg);
|
|
13612
|
-
trace
|
|
13610
|
+
trace.log(`[Status]: ${msg}`);
|
|
13611
|
+
};
|
|
13612
|
+
callTool_fn = async function(toolName, args = {}) {
|
|
13613
|
+
__privateMethod(this, _NineChatManager_instances, updateStatus_fn).call(this, "AI 분석 중...");
|
|
13614
|
+
__privateGet(this, _mcpClient).callTool({ name: toolName, arguments: args }).then((res) => {
|
|
13615
|
+
trace.log(res);
|
|
13616
|
+
}).catch((err) => {
|
|
13617
|
+
trace.error(err);
|
|
13618
|
+
__privateMethod(this, _NineChatManager_instances, updateStatus_fn).call(this, "에러 발생");
|
|
13619
|
+
throw err;
|
|
13620
|
+
});
|
|
13613
13621
|
};
|
|
13614
13622
|
class NineMuService {
|
|
13615
13623
|
constructor(connectorUrl) {
|
|
@@ -13814,7 +13822,7 @@ render_fn = function() {
|
|
|
13814
13822
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
13815
13823
|
this.shadowRoot.innerHTML = `
|
|
13816
13824
|
<style>
|
|
13817
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
13825
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.145"}/dist/css/nine-mu.css";
|
|
13818
13826
|
${customImport}
|
|
13819
13827
|
</style>
|
|
13820
13828
|
<div class="wrapper">
|
|
@@ -40032,7 +40040,7 @@ class NineDiff extends HTMLElement {
|
|
|
40032
40040
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
40033
40041
|
this.shadowRoot.innerHTML = `
|
|
40034
40042
|
<style>
|
|
40035
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
40043
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.145"}/dist/css/nine-mu.css";
|
|
40036
40044
|
${customImport}
|
|
40037
40045
|
</style>
|
|
40038
40046
|
|
|
@@ -40142,7 +40150,7 @@ render_fn2 = function() {
|
|
|
40142
40150
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
40143
40151
|
this.shadowRoot.innerHTML = `
|
|
40144
40152
|
<style>
|
|
40145
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
40153
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.145"}/dist/css/nine-mu.css";
|
|
40146
40154
|
${customImport}
|
|
40147
40155
|
</style>
|
|
40148
40156
|
|
|
@@ -40181,7 +40189,7 @@ handleCancel_fn = function() {
|
|
|
40181
40189
|
};
|
|
40182
40190
|
customElements.define("nine-diff-popup", NineDiffPopup);
|
|
40183
40191
|
const NineMu = {
|
|
40184
|
-
version: "0.1.
|
|
40192
|
+
version: "0.1.145",
|
|
40185
40193
|
init: (config2) => {
|
|
40186
40194
|
trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
|
|
40187
40195
|
}
|