@nine-lab/nine-mu 0.1.94 → 0.1.96
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 +27 -19
- package/dist/nine-mu.js.map +1 -1
- package/dist/nine-mu.umd.js +1 -1
- package/dist/nine-mu.umd.js.map +1 -1
- package/package.json +6 -2
- package/src/components/NineChat.js +16 -7
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 _getSourcePath, _service, _routes, _diffPopup, _packageName, _routesPath, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _makeMenuHandler, _sourceGenHandler, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _setupScrollSync, _applyDiffDecorations, _dialog, _diffView, _asisBackup, _host, _NineDiffPopup_instances, render_fn2, handleConfirm_fn, handleCancel_fn;
|
|
12
|
+
var _getSourcePath, _service, _routes, _diffPopup, _packageName, _routesPath, _connectorUrl, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _makeMenuHandler, _sourceGenHandler, _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, api, nine } from "@nine-lab/nine-util";
|
|
14
14
|
class NineMuService {
|
|
15
15
|
constructor(connectorUrl) {
|
|
@@ -108,12 +108,20 @@ class NineChat extends HTMLElement {
|
|
|
108
108
|
__privateAdd(this, _diffPopup);
|
|
109
109
|
__privateAdd(this, _packageName);
|
|
110
110
|
__privateAdd(this, _routesPath);
|
|
111
|
+
__privateAdd(this, _connectorUrl);
|
|
111
112
|
__privateAdd(this, _makeMenuHandler, async (e) => {
|
|
112
|
-
nine.prompt("
|
|
113
|
-
|
|
113
|
+
const prompt = await nine.prompt("메뉴생성시 필요한 AI 프롬프트를 입력하세요.");
|
|
114
|
+
if (prompt === null || prompt === void 0) return;
|
|
115
|
+
const res = await api.post(`/nine-mu/source/readFile`, { path: __privateGet(this, _routesPath) });
|
|
114
116
|
trace.log(res);
|
|
117
|
+
if (!rec || !(res == null ? void 0 : res.contents)) return;
|
|
115
118
|
const jsonRoutes = (res == null ? void 0 : res.contents) ? JSON.parse(res == null ? void 0 : res.contents) : {};
|
|
116
119
|
trace.log(jsonRoutes);
|
|
120
|
+
const res2 = await api.post(`${__privateGet(this, _connectorUrl)}/api/source/missing`, {
|
|
121
|
+
routes: jsonRoutes,
|
|
122
|
+
prompt
|
|
123
|
+
});
|
|
124
|
+
trace.log("분석 완료. 생성할 태스크:", res2 == null ? void 0 : res2.tasks);
|
|
117
125
|
});
|
|
118
126
|
__privateAdd(this, _sourceGenHandler, async (e) => {
|
|
119
127
|
const command2 = "";
|
|
@@ -135,8 +143,8 @@ class NineChat extends HTMLElement {
|
|
|
135
143
|
}
|
|
136
144
|
async connectedCallback() {
|
|
137
145
|
__privateSet(this, _packageName, this.getAttribute("package-name"));
|
|
138
|
-
|
|
139
|
-
__privateSet(this, _service, new NineMuService(
|
|
146
|
+
__privateSet(this, _connectorUrl, this.getAttribute("connector-url") || "http://localhost:3002");
|
|
147
|
+
__privateSet(this, _service, new NineMuService(__privateGet(this, _connectorUrl)));
|
|
140
148
|
__privateMethod(this, _NineChat_instances, render_fn).call(this);
|
|
141
149
|
__privateMethod(this, _NineChat_instances, initInteractions_fn).call(this);
|
|
142
150
|
__privateMethod(this, _NineChat_instances, initActions_fn).call(this);
|
|
@@ -150,6 +158,7 @@ _routes = new WeakMap();
|
|
|
150
158
|
_diffPopup = new WeakMap();
|
|
151
159
|
_packageName = new WeakMap();
|
|
152
160
|
_routesPath = new WeakMap();
|
|
161
|
+
_connectorUrl = new WeakMap();
|
|
153
162
|
_NineChat_instances = new WeakSet();
|
|
154
163
|
// --- [그룹 1: Interaction] 화면 토글 및 메뉴 클릭 ---
|
|
155
164
|
initInteractions_fn = function() {
|
|
@@ -199,7 +208,7 @@ render_fn = function() {
|
|
|
199
208
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
200
209
|
this.shadowRoot.innerHTML = `
|
|
201
210
|
<style>
|
|
202
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
211
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.95"}/dist/css/nine-mu.css";
|
|
203
212
|
${customImport}
|
|
204
213
|
</style>
|
|
205
214
|
<div class="wrapper">
|
|
@@ -227,8 +236,7 @@ render_fn = function() {
|
|
|
227
236
|
<div class="menu-icon menu-filter"></div>
|
|
228
237
|
<div class="menu-icon menu-general active"></div>
|
|
229
238
|
<div class="menu-icon menu-setting"></div>
|
|
230
|
-
|
|
231
|
-
<div class="menu2">
|
|
239
|
+
|
|
232
240
|
<div class="menu-icon make-menu"></div>
|
|
233
241
|
<div class="menu-icon source-gen"></div>
|
|
234
242
|
</div>
|
|
@@ -10735,21 +10743,21 @@ class DOMObserver {
|
|
|
10735
10743
|
this.view.update([]);
|
|
10736
10744
|
return handled;
|
|
10737
10745
|
}
|
|
10738
|
-
readMutation(
|
|
10739
|
-
let tile = this.view.docView.tile.nearest(
|
|
10746
|
+
readMutation(rec2) {
|
|
10747
|
+
let tile = this.view.docView.tile.nearest(rec2.target);
|
|
10740
10748
|
if (!tile || tile.isWidget())
|
|
10741
10749
|
return null;
|
|
10742
|
-
tile.markDirty(
|
|
10743
|
-
if (
|
|
10744
|
-
let childBefore = findChild(tile,
|
|
10745
|
-
let childAfter = findChild(tile,
|
|
10750
|
+
tile.markDirty(rec2.type == "attributes");
|
|
10751
|
+
if (rec2.type == "childList") {
|
|
10752
|
+
let childBefore = findChild(tile, rec2.previousSibling || rec2.target.previousSibling, -1);
|
|
10753
|
+
let childAfter = findChild(tile, rec2.nextSibling || rec2.target.nextSibling, 1);
|
|
10746
10754
|
return {
|
|
10747
10755
|
from: childBefore ? tile.posAfter(childBefore) : tile.posAtStart,
|
|
10748
10756
|
to: childAfter ? tile.posBefore(childAfter) : tile.posAtEnd,
|
|
10749
10757
|
typeOver: false
|
|
10750
10758
|
};
|
|
10751
|
-
} else if (
|
|
10752
|
-
return { from: tile.posAtStart, to: tile.posAtEnd, typeOver:
|
|
10759
|
+
} else if (rec2.type == "characterData") {
|
|
10760
|
+
return { from: tile.posAtStart, to: tile.posAtEnd, typeOver: rec2.target.nodeValue == rec2.oldValue };
|
|
10753
10761
|
} else {
|
|
10754
10762
|
return null;
|
|
10755
10763
|
}
|
|
@@ -26417,7 +26425,7 @@ class NineDiff extends HTMLElement {
|
|
|
26417
26425
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
26418
26426
|
this.shadowRoot.innerHTML = `
|
|
26419
26427
|
<style>
|
|
26420
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
26428
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.95"}/dist/css/nine-mu.css";
|
|
26421
26429
|
${customImport}
|
|
26422
26430
|
</style>
|
|
26423
26431
|
|
|
@@ -26527,7 +26535,7 @@ render_fn2 = function() {
|
|
|
26527
26535
|
const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
|
|
26528
26536
|
this.shadowRoot.innerHTML = `
|
|
26529
26537
|
<style>
|
|
26530
|
-
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.
|
|
26538
|
+
@import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.95"}/dist/css/nine-mu.css";
|
|
26531
26539
|
${customImport}
|
|
26532
26540
|
</style>
|
|
26533
26541
|
|
|
@@ -26566,7 +26574,7 @@ handleCancel_fn = function() {
|
|
|
26566
26574
|
};
|
|
26567
26575
|
customElements.define("nine-diff-popup", NineDiffPopup);
|
|
26568
26576
|
const NineMu = {
|
|
26569
|
-
version: "0.1.
|
|
26577
|
+
version: "0.1.95",
|
|
26570
26578
|
init: (config) => {
|
|
26571
26579
|
trace.log("🛠️ Nine-Mu Engine initialized", config);
|
|
26572
26580
|
}
|