@nine-lab/nine-mu 0.1.262 → 0.1.264
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 +32 -13
- 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 -0
- package/src/components/NineChatManager.js +24 -9
- package/src/components/NineNatualQueryInput.js +266 -0
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, _NotificationHandler_instances, handleLoggingMessage_fn, _processSourceData, _mcpClient, _onAction, _onStatus, _onMessage, _owner2, _routeUrl, _chatHistory, _notiHandler, _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;
|
|
12
|
+
var _owner, _NotificationHandler_instances, handleLoggingMessage_fn, _processSourceData, _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, _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 as nine$1 } from "@nine-lab/nine-util";
|
|
14
14
|
class Trace extends trace$1.constructor {
|
|
15
15
|
constructor() {
|
|
@@ -17144,33 +17144,39 @@ class NineChatManager {
|
|
|
17144
17144
|
return chat.role === "user" ? `User: ${chat.text}` : `AI: ${chat.text}`;
|
|
17145
17145
|
}).join("\n");
|
|
17146
17146
|
const currentPath = window.location.pathname;
|
|
17147
|
+
const routes = await this.getRoutes();
|
|
17148
|
+
const unmappedRoutes = await this.getUnmappedRoutes(routes);
|
|
17147
17149
|
return await __privateMethod(this, _NineChatManager_instances, callTool_fn).call(this, "system-brain", {
|
|
17148
17150
|
user_input: userInput,
|
|
17149
17151
|
chat_history: formattedHistory,
|
|
17150
|
-
routes
|
|
17152
|
+
routes,
|
|
17153
|
+
unmapped_routes: unmappedRoutes,
|
|
17154
|
+
// 미개발된 해당 라우트 정보 객체
|
|
17151
17155
|
current_path: currentPath
|
|
17152
17156
|
});
|
|
17153
17157
|
});
|
|
17154
17158
|
/** 백엔드 통신 */
|
|
17155
17159
|
__publicField(this, "analyzeUnmappedRoutes", async (routes) => {
|
|
17156
17160
|
var _a2;
|
|
17157
|
-
const res = await api.post("/nine-mu/config/getUnmappedRoutes", {
|
|
17161
|
+
const res = await api.post("/nine-mu/config/getUnmappedRoutes", {
|
|
17162
|
+
routes
|
|
17163
|
+
});
|
|
17158
17164
|
trace.log(res);
|
|
17159
17165
|
const unmappedRoutes = ((_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.unmappedRoutes) || (res == null ? void 0 : res.unmappedRoutes) || [];
|
|
17160
17166
|
if (unmappedRoutes.length === 0) {
|
|
17161
17167
|
nine.alert("미개발된 라우터가 없습니다. 모두 매핑되어 있습니다.");
|
|
17162
17168
|
return;
|
|
17163
17169
|
}
|
|
17164
|
-
trace.log(unmappedRoutes);
|
|
17165
|
-
|
|
17170
|
+
trace.log(unmappedRoutes, __privateGet(this, _owner2).config);
|
|
17171
|
+
return await __privateMethod(this, _NineChatManager_instances, callTool_fn).call(this, "generate-source-brain", {
|
|
17166
17172
|
user_input: `다음 미개발 라우트에 대한 소스코드(Controller, Service, MyBatis, React)를 생성해줘.`,
|
|
17173
|
+
base_package: __privateGet(this, _owner2).config.basePackage,
|
|
17174
|
+
// nine.edu
|
|
17167
17175
|
//chat_history: "",
|
|
17168
|
-
|
|
17176
|
+
unmapped_routes: unmappedRoutes
|
|
17169
17177
|
// 미개발된 해당 라우트 정보 객체
|
|
17170
17178
|
//current_path: route.path, // 현재 생성 기준 패스 명시
|
|
17171
17179
|
});
|
|
17172
|
-
trace.log(a);
|
|
17173
|
-
return a;
|
|
17174
17180
|
});
|
|
17175
17181
|
__privateSet(this, _owner2, owner);
|
|
17176
17182
|
__privateSet(this, _routeUrl, __privateGet(this, _owner2).getAttribute("route-url"));
|
|
@@ -17197,6 +17203,13 @@ class NineChatManager {
|
|
|
17197
17203
|
const res = await fetch(__privateGet(this, _routeUrl));
|
|
17198
17204
|
return res.ok ? await res.json() : [];
|
|
17199
17205
|
}
|
|
17206
|
+
async getUnmappedRoutes(routes) {
|
|
17207
|
+
var _a2;
|
|
17208
|
+
const res = await api.post("/nine-mu/config/getUnmappedRoutes", {
|
|
17209
|
+
routes
|
|
17210
|
+
});
|
|
17211
|
+
return ((_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.unmappedRoutes) || (res == null ? void 0 : res.unmappedRoutes) || [];
|
|
17212
|
+
}
|
|
17200
17213
|
addChatHistory(message) {
|
|
17201
17214
|
__privateGet(this, _chatHistory).push({ role: "ai", text: message });
|
|
17202
17215
|
}
|
|
@@ -17363,6 +17376,7 @@ class NineChat extends HTMLElement {
|
|
|
17363
17376
|
__privateAdd(this, _routesPath);
|
|
17364
17377
|
__privateAdd(this, _connectorUrl);
|
|
17365
17378
|
__privateAdd(this, _manager);
|
|
17379
|
+
__privateAdd(this, _config);
|
|
17366
17380
|
__privateAdd(this, _$nineChatMessage);
|
|
17367
17381
|
__publicField(this, "addMessage", (who, message) => {
|
|
17368
17382
|
__privateGet(this, _$nineChatMessage).add(who, message);
|
|
@@ -17400,6 +17414,9 @@ class NineChat extends HTMLElement {
|
|
|
17400
17414
|
});
|
|
17401
17415
|
this.attachShadow({ mode: "open" });
|
|
17402
17416
|
}
|
|
17417
|
+
get config() {
|
|
17418
|
+
return __privateGet(this, _config);
|
|
17419
|
+
}
|
|
17403
17420
|
async connectedCallback() {
|
|
17404
17421
|
__privateSet(this, _packageName, this.getAttribute("package-name"));
|
|
17405
17422
|
__privateSet(this, _connectorUrl, this.getAttribute("connector-url") || "http://localhost:3002");
|
|
@@ -17408,6 +17425,7 @@ class NineChat extends HTMLElement {
|
|
|
17408
17425
|
__privateMethod(this, _NineChat_instances, initInteractions_fn).call(this);
|
|
17409
17426
|
__privateMethod(this, _NineChat_instances, initActions_fn).call(this);
|
|
17410
17427
|
const res = await api.post("/nine-mu/config/get", {});
|
|
17428
|
+
__privateSet(this, _config, res);
|
|
17411
17429
|
__privateSet(this, _routesPath, (res == null ? void 0 : res.userDir) + "/" + __privateGet(this, _packageName) + "/public/prompts/data/routes.json");
|
|
17412
17430
|
__privateSet(this, _manager, new NineChatManager(this));
|
|
17413
17431
|
}
|
|
@@ -17417,6 +17435,7 @@ _packageName = new WeakMap();
|
|
|
17417
17435
|
_routesPath = new WeakMap();
|
|
17418
17436
|
_connectorUrl = new WeakMap();
|
|
17419
17437
|
_manager = new WeakMap();
|
|
17438
|
+
_config = new WeakMap();
|
|
17420
17439
|
_$nineChatMessage = new WeakMap();
|
|
17421
17440
|
_NineChat_instances = new WeakSet();
|
|
17422
17441
|
// --- [그룹 1: Interaction] 화면 토글 및 메뉴 클릭 ---
|
|
@@ -17492,7 +17511,7 @@ render_fn = function() {
|
|
|
17492
17511
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
17493
17512
|
this.shadowRoot.innerHTML = `
|
|
17494
17513
|
<style>
|
|
17495
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
17514
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.263"}/dist/css/nine-mu.css";
|
|
17496
17515
|
${customImport}
|
|
17497
17516
|
</style>
|
|
17498
17517
|
<div class="wrapper">
|
|
@@ -43709,7 +43728,7 @@ class NineDiff extends HTMLElement {
|
|
|
43709
43728
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
43710
43729
|
this.shadowRoot.innerHTML = `
|
|
43711
43730
|
<style>
|
|
43712
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
43731
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.263"}/dist/css/nine-mu.css";
|
|
43713
43732
|
${customImport}
|
|
43714
43733
|
</style>
|
|
43715
43734
|
|
|
@@ -43819,7 +43838,7 @@ render_fn2 = function() {
|
|
|
43819
43838
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
43820
43839
|
this.shadowRoot.innerHTML = `
|
|
43821
43840
|
<style>
|
|
43822
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
43841
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.263"}/dist/css/nine-mu.css";
|
|
43823
43842
|
${customImport}
|
|
43824
43843
|
</style>
|
|
43825
43844
|
|
|
@@ -44145,7 +44164,7 @@ class ChatMessageBody extends HTMLElement {
|
|
|
44145
44164
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
44146
44165
|
this.shadowRoot.innerHTML = `
|
|
44147
44166
|
<style>
|
|
44148
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
44167
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.263"}/dist/css/nine-mu.css";
|
|
44149
44168
|
${customImport}
|
|
44150
44169
|
</style>
|
|
44151
44170
|
|
|
@@ -44239,7 +44258,7 @@ if (!customElements.get("nine-chat-progress")) {
|
|
|
44239
44258
|
customElements.define("nine-chat-progress", ProgressMessage);
|
|
44240
44259
|
}
|
|
44241
44260
|
const NineMu = {
|
|
44242
|
-
version: "0.1.
|
|
44261
|
+
version: "0.1.263",
|
|
44243
44262
|
init: (config2) => {
|
|
44244
44263
|
trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
|
|
44245
44264
|
}
|