@nine-lab/nine-mu 0.1.70 → 0.1.72

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nine-lab/nine-mu",
3
- "version": "0.1.70",
3
+ "version": "0.1.72",
4
4
  "description": "AI-Driven Full-Stack Code Fabrication Engine",
5
5
  "type": "module",
6
6
  "main": "./dist/nine-mu.umd.js",
@@ -26,8 +26,9 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@nine-lab/nine-ai": "^0.1.78",
29
- "@nine-lab/nine-util": "^0.9.42",
30
- "@nine-lab/nine-ux": "^0.1.122"
29
+ "@nine-lab/nine-nomenu": "^0.1.15",
30
+ "@nine-lab/nine-util": "^0.9.43",
31
+ "@nine-lab/nine-ux": "^0.1.125"
31
32
  },
32
33
  "publishConfig": {
33
34
  "access": "public"
@@ -1,11 +1,11 @@
1
- import { trace } from '@nine-lab/nine-util';
1
+ import { trace, api } from '@nine-lab/nine-util';
2
2
  import '@nine-lab/nine-util';
3
3
 
4
4
  export class NineDiffPopup extends HTMLElement {
5
5
  #dialog = null;
6
6
  #diffView = null; // Container 대신 직접 에디터 뷰를 참조
7
- #resolve = null;
8
7
  #asisBackup = "";
8
+ #host;
9
9
 
10
10
  constructor() {
11
11
  super();
@@ -13,6 +13,11 @@ export class NineDiffPopup extends HTMLElement {
13
13
  }
14
14
 
15
15
  connectedCallback() {
16
+
17
+ this.#host = this.getRootNode().host;
18
+
19
+ console.log("찾은 호스트:", this.#host);
20
+
16
21
  this.render();
17
22
  }
18
23
 
@@ -32,7 +37,7 @@ export class NineDiffPopup extends HTMLElement {
32
37
  </div>
33
38
  <div class="footer">
34
39
  <button class="btn btn-cancel">취소</button>
35
- <button class="btn btn-confirm">최종 확정 및 저장</button>
40
+ <button class="btn btn-confirm">저장</button>
36
41
  </div>
37
42
  </div>
38
43
  </nine-dialog>
@@ -98,15 +103,25 @@ export class NineDiffPopup extends HTMLElement {
98
103
  #handleConfirm() {
99
104
  // 에디터에서 직접 콘텐츠 추출
100
105
  const finalContent = this.#diffView ? this.#diffView.getContents() : this.#asisBackup;
106
+
107
+ console.log(finalContent);
108
+
109
+ const params = [];
110
+
111
+ params.push({
112
+ path: "",
113
+ contents: finalContent,
114
+ });
115
+
116
+ api.post(`/nine-ai/source/generateRealFile`, { list: params }).then(res => {
117
+ ninegrid.alert("소스를 변경하였습니다.");
118
+ });
119
+
101
120
  this.#dialog.close();
102
- if (this.#resolve) this.#resolve(finalContent);
103
- this.remove();
104
121
  }
105
122
 
106
123
  #handleCancel() {
107
124
  this.#dialog.close();
108
- if (this.#resolve) this.#resolve(null);
109
- this.remove();
110
125
  }
111
126
  }
112
127