@nine-lab/nine-mu 0.1.237 → 0.1.239
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 +20 -27
- 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/NineChat.js +7 -18
- package/src/components/NineChatManager.js +7 -0
package/dist/nine-mu.js
CHANGED
|
@@ -9,8 +9,8 @@ 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, _getSourcePath, _service,
|
|
13
|
-
import { trace as trace$1, api, nine } from "@nine-lab/nine-util";
|
|
12
|
+
var _mcpClient, _onAction, _onStatus, _onMessage, _owner, _routeUrl, _chatHistory, _NineChatManager_instances, connect_fn, updateStatus_fn, callTool_fn, _getSourcePath, _service, _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
|
+
import { trace as trace$1, api as api$1, nine } from "@nine-lab/nine-util";
|
|
14
14
|
class Trace extends trace$1.constructor {
|
|
15
15
|
constructor() {
|
|
16
16
|
super();
|
|
@@ -17100,6 +17100,11 @@ class NineChatManager {
|
|
|
17100
17100
|
current_path: currentPath
|
|
17101
17101
|
});
|
|
17102
17102
|
});
|
|
17103
|
+
/** 백엔드 통신 */
|
|
17104
|
+
__publicField(this, "analyzeUnmappedRoutes", async (routes) => {
|
|
17105
|
+
const res = await api.post("/nine-mu/config/getUnmappedRoutes", { routes });
|
|
17106
|
+
console.log(res);
|
|
17107
|
+
});
|
|
17103
17108
|
__privateSet(this, _owner, owner);
|
|
17104
17109
|
__privateSet(this, _routeUrl, __privateGet(this, _owner).getAttribute("route-url"));
|
|
17105
17110
|
__privateSet(this, _onAction, callbacks.onAction);
|
|
@@ -17244,7 +17249,7 @@ class NineMuService {
|
|
|
17244
17249
|
javascriptTo: ""
|
|
17245
17250
|
};
|
|
17246
17251
|
trace.log(srcPath);
|
|
17247
|
-
const src = await api.post("/nine-ai/source/read", srcPath);
|
|
17252
|
+
const src = await api$1.post("/nine-ai/source/read", srcPath);
|
|
17248
17253
|
trace.log(src);
|
|
17249
17254
|
const response = await fetch(`${this.connectorUrl}/api/mu/generateAll`, {
|
|
17250
17255
|
method: "POST",
|
|
@@ -17287,7 +17292,6 @@ class NineChat extends HTMLElement {
|
|
|
17287
17292
|
super();
|
|
17288
17293
|
__privateAdd(this, _NineChat_instances);
|
|
17289
17294
|
__privateAdd(this, _service, null);
|
|
17290
|
-
__privateAdd(this, _routes, []);
|
|
17291
17295
|
__privateAdd(this, _packageName);
|
|
17292
17296
|
__privateAdd(this, _routesPath);
|
|
17293
17297
|
__privateAdd(this, _connectorUrl);
|
|
@@ -17299,12 +17303,12 @@ class NineChat extends HTMLElement {
|
|
|
17299
17303
|
__privateAdd(this, _makeMenuHandler, async (e) => {
|
|
17300
17304
|
const prompt = await nine.prompt("메뉴생성시 필요한 AI 프롬프트를 입력하세요.").rgb();
|
|
17301
17305
|
if (prompt === null || prompt === void 0) return;
|
|
17302
|
-
const res = await api.post(`/nine-mu/source/readFile`, { path: __privateGet(this, _routesPath) });
|
|
17306
|
+
const res = await api$1.post(`/nine-mu/source/readFile`, { path: __privateGet(this, _routesPath) });
|
|
17303
17307
|
trace.log(res);
|
|
17304
17308
|
if (!res || !(res == null ? void 0 : res.contents)) return;
|
|
17305
17309
|
const jsonRoutes = (res == null ? void 0 : res.contents) ? JSON.parse(res == null ? void 0 : res.contents) : {};
|
|
17306
17310
|
trace.log(jsonRoutes);
|
|
17307
|
-
const res2 = await api.post(`${__privateGet(this, _connectorUrl)}/api/source/missing`, {
|
|
17311
|
+
const res2 = await api$1.post(`${__privateGet(this, _connectorUrl)}/api/source/missing`, {
|
|
17308
17312
|
routes: jsonRoutes,
|
|
17309
17313
|
prompt
|
|
17310
17314
|
});
|
|
@@ -17313,17 +17317,8 @@ class NineChat extends HTMLElement {
|
|
|
17313
17317
|
}
|
|
17314
17318
|
});
|
|
17315
17319
|
__privateAdd(this, _sourceGenHandler, async (e) => {
|
|
17316
|
-
const
|
|
17317
|
-
|
|
17318
|
-
try {
|
|
17319
|
-
const result = await __privateGet(this, _service).generateAll(command2, targets, __privateGet(this, _routes));
|
|
17320
|
-
$status.textContent = "✅ 완료";
|
|
17321
|
-
nine.alert("소스 생성 성공").rgb();
|
|
17322
|
-
this.dispatchEvent(new CustomEvent("nine-mu-completed", { detail: result, bubbles: true }));
|
|
17323
|
-
} catch (err) {
|
|
17324
|
-
$status.textContent = "❌ 실패";
|
|
17325
|
-
nine.alert(err.message).rgb().shake();
|
|
17326
|
-
}
|
|
17320
|
+
const routes = await __privateGet(this, _manager).getRoutes();
|
|
17321
|
+
await __privateGet(this, _manager).analyzeUnmappedRoutes(routes);
|
|
17327
17322
|
});
|
|
17328
17323
|
__privateAdd(this, _showDiff, (asis, tobe, lang) => {
|
|
17329
17324
|
const oldPopup = this.shadowRoot.querySelector("nine-diff-popup");
|
|
@@ -17344,14 +17339,12 @@ class NineChat extends HTMLElement {
|
|
|
17344
17339
|
__privateMethod(this, _NineChat_instances, render_fn).call(this);
|
|
17345
17340
|
__privateMethod(this, _NineChat_instances, initInteractions_fn).call(this);
|
|
17346
17341
|
__privateMethod(this, _NineChat_instances, initActions_fn).call(this);
|
|
17347
|
-
const res = await api.post("/nine-mu/config/get", {});
|
|
17342
|
+
const res = await api$1.post("/nine-mu/config/get", {});
|
|
17348
17343
|
__privateSet(this, _routesPath, (res == null ? void 0 : res.userDir) + "/" + __privateGet(this, _packageName) + "/public/prompts/data/routes.json");
|
|
17349
|
-
__privateSet(this, _routes, await __privateGet(this, _service).fetchRoutes(this.getAttribute("route-url")));
|
|
17350
17344
|
__privateSet(this, _manager, new NineChatManager(this));
|
|
17351
17345
|
}
|
|
17352
17346
|
}
|
|
17353
17347
|
_service = new WeakMap();
|
|
17354
|
-
_routes = new WeakMap();
|
|
17355
17348
|
_packageName = new WeakMap();
|
|
17356
17349
|
_routesPath = new WeakMap();
|
|
17357
17350
|
_connectorUrl = new WeakMap();
|
|
@@ -17412,7 +17405,7 @@ initActions_fn = function() {
|
|
|
17412
17405
|
const hasDeleted = parsed == null ? void 0 : parsed.data.some((item) => item.action === "DELETE");
|
|
17413
17406
|
if (hasUpdated || hasCreated || hasDeleted) {
|
|
17414
17407
|
nine.alert("메뉴 정리를 위한 라우터 정보 저장 화면으로 이동합니다.").then((res) => {
|
|
17415
|
-
const tobe = ((parsed == null ? void 0 : parsed.data) || []).map(({ isNew, action, ...rest }) => rest);
|
|
17408
|
+
const tobe = ((parsed == null ? void 0 : parsed.data) || []).filter((item) => item.action !== "DELETE").map(({ isNew, action, ...rest }) => rest);
|
|
17416
17409
|
__privateGet(this, _showDiff).call(this, asis, tobe, "json");
|
|
17417
17410
|
});
|
|
17418
17411
|
}
|
|
@@ -17431,7 +17424,7 @@ render_fn = function() {
|
|
|
17431
17424
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
17432
17425
|
this.shadowRoot.innerHTML = `
|
|
17433
17426
|
<style>
|
|
17434
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
17427
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.238"}/dist/css/nine-mu.css";
|
|
17435
17428
|
${customImport}
|
|
17436
17429
|
</style>
|
|
17437
17430
|
<div class="wrapper">
|
|
@@ -43648,7 +43641,7 @@ class NineDiff extends HTMLElement {
|
|
|
43648
43641
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
43649
43642
|
this.shadowRoot.innerHTML = `
|
|
43650
43643
|
<style>
|
|
43651
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
43644
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.238"}/dist/css/nine-mu.css";
|
|
43652
43645
|
${customImport}
|
|
43653
43646
|
</style>
|
|
43654
43647
|
|
|
@@ -43758,7 +43751,7 @@ render_fn2 = function() {
|
|
|
43758
43751
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
43759
43752
|
this.shadowRoot.innerHTML = `
|
|
43760
43753
|
<style>
|
|
43761
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
43754
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.238"}/dist/css/nine-mu.css";
|
|
43762
43755
|
${customImport}
|
|
43763
43756
|
</style>
|
|
43764
43757
|
|
|
@@ -43785,7 +43778,7 @@ handleConfirm_fn = function() {
|
|
|
43785
43778
|
packageName: __privateGet(this, _host).getAttribute("package-name"),
|
|
43786
43779
|
contents: content2
|
|
43787
43780
|
};
|
|
43788
|
-
api.post(`/nine-mu/source/generateJsonFile`, params).then((res) => {
|
|
43781
|
+
api$1.post(`/nine-mu/source/generateJsonFile`, params).then((res) => {
|
|
43789
43782
|
nine.alert("소스를 변경하였습니다.").then((res2) => {
|
|
43790
43783
|
__privateGet(this, _dialog).close();
|
|
43791
43784
|
});
|
|
@@ -44084,7 +44077,7 @@ class ChatMessageBody extends HTMLElement {
|
|
|
44084
44077
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
44085
44078
|
this.shadowRoot.innerHTML = `
|
|
44086
44079
|
<style>
|
|
44087
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
44080
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.238"}/dist/css/nine-mu.css";
|
|
44088
44081
|
${customImport}
|
|
44089
44082
|
</style>
|
|
44090
44083
|
|
|
@@ -44178,7 +44171,7 @@ if (!customElements.get("nine-chat-progress")) {
|
|
|
44178
44171
|
customElements.define("nine-chat-progress", ProgressMessage);
|
|
44179
44172
|
}
|
|
44180
44173
|
const NineMu = {
|
|
44181
|
-
version: "0.1.
|
|
44174
|
+
version: "0.1.238",
|
|
44182
44175
|
init: (config2) => {
|
|
44183
44176
|
trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
|
|
44184
44177
|
}
|