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