@nine-lab/nine-mu 0.1.323 → 0.1.325

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.323",
3
+ "version": "0.1.325",
4
4
  "description": "AI-Driven Full-Stack Code Fabrication Engine",
5
5
  "type": "module",
6
6
  "main": "./dist/nine-mu.umd.js",
@@ -831,6 +831,21 @@
831
831
  }
832
832
  .btn { padding: 8px 20px; cursor: pointer; border-radius: 4px; border: 1px solid #ccc; font-weight: bold; }
833
833
  .btn-confirm { background: #007bff; color: white; border: none; }
834
+ .btn-confirm[disabled] {
835
+ /* 1. 마우스 커서를 불가능(금지) 모양으로 변경 */
836
+ cursor: not-allowed;
837
+
838
+ /* 2. 버튼을 반투명하게 만들어 비활성화된 느낌 부여 */
839
+ opacity: 0.5;
840
+
841
+ /* 3. 혹시 모를 마우스 클릭/호버 이벤트 완전히 차단 */
842
+ pointer-events: none;
843
+
844
+ /* 4. (선택사항) 배경색이나 보더를 더 연한 회색 톤으로 다운 */
845
+ background-color: #e0e0e0;
846
+ color: #a0a0a0;
847
+ border-color: #d0d0d0;
848
+ }
834
849
 
835
850
  .tab-pages .tab-page {
836
851
  height: 100%;
@@ -125,6 +125,7 @@ export class NineChat extends HTMLElement {
125
125
 
126
126
  const asis = await this.#manager.getRoutes();
127
127
 
128
+ /**
128
129
  if (parsed?.selected_tool === "generator-menu") {
129
130
  const hasCreated = parsed?.data.some(item => item.action === 'CREATE');
130
131
  const hasUpdated = parsed?.data.some(item => item.action === 'UPDATE');
@@ -140,7 +141,7 @@ export class NineChat extends HTMLElement {
140
141
  this.#showDiff(asis, tobe, "json");
141
142
  });
142
143
  }
143
- }
144
+ } */
144
145
 
145
146
  // 💡 만약 intent가 EXECUTE_TOOL이거나 NAVIGATE일 때 프론트에서
146
147
  // 화면 이동(Routing)이나 추가 액션을 해야 한다면 여기서 parsedData.target_path 등을 활용하면 됩니다!
@@ -36,31 +36,39 @@ export class NotificationHandler {
36
36
  // 2. 🚨 [나중에 100시간짜리 완벽을 채울 핵심 길목]
37
37
  // 데이터에 소스코드 알맹이(data.source)나 메타데이터가 실려 내려왔을 때의 행위를 여기서 격리 처리합니다.
38
38
 
39
+ /**
39
40
  switch (logger) {
40
41
  case "generate-source-brain":
41
- if (data && data.source) {
42
- //trace.log(`[시그널 감지] 설계 완료`, data);
43
- this.#generateSource(data);
44
- }
42
+ this.#generateSource(data);
45
43
  break;
46
44
 
47
45
  case "modify-source-brain":
48
- if (data && data.source) {
49
- this.#collectModifySource(data);
50
- }
46
+ this.#collectModifySource(data);
51
47
  break;
52
48
 
53
49
  case "modify-source-brain-completed":
54
- //trace.log(`[시그널 감지] 설계 완료`, data);
55
50
  this.#openDiffPopup();
56
51
  break;
57
- }
52
+ } */
53
+
54
+ // 자바의 -> 처럼 자바스크립트의 => (화살표 함수)를 활용한 매핑
55
+ const runAction = {
56
+ "generate-menu-completed": () => this.#generateMenu(data),
57
+ "generate-source-brain": () => this.#generateSource(data),
58
+ "modify-source-brain": () => this.#collectModifySource(data),
59
+ "modify-source-brain-completed": () => this.#openDiffPopup(),
60
+ }[logger];
61
+
62
+ runAction?.();
58
63
  }
59
64
 
60
65
  /**
61
66
  * 레이어별로 순차 도착하는 파일들을 유실 없이 배열 버퍼에 수집
62
67
  */
63
68
  #collectModifySource = (data) => {
69
+
70
+ if (!data || !data.source) return;
71
+
64
72
  const filePayload = {
65
73
  layer: data.layer || "Unknown",
66
74
  full_path: data.full_path || "unknown_file",
@@ -103,19 +111,40 @@ export class NotificationHandler {
103
111
  * [분리 비즈니스 로직 2] 수신된 소스코드 데이터 유효성 검증 및 추후 파일 저장 연동
104
112
  */
105
113
  #generateSource = async (data) => {
106
- // 소스코드 데이터가 정상적으로 확보되었는지 1%의 누락 검증
107
- if (data.layer) {
108
- //trace.warn("⚠️ 소스 또는 파일명 누락 데이터 수신됨", data);
109
- //return;
110
- }
114
+
115
+ if (!data.path || !data.source) return;
111
116
 
112
117
  const res = await api.post("/nine-mu/source/generateRealFileSingle", {
113
118
  //package_path: data.path,
114
119
  //file_name: data.file_name,
115
- currentPath: location.pathname,
120
+ currentPath: data.path,
116
121
  contents: data.source
117
122
  });
118
123
 
119
- trace.log(res)
124
+ trace.log(res);
125
+ }
126
+
127
+ #generateMenu = async (data) => {
128
+
129
+ //if (!data.path || !data.source) return;
130
+
131
+ trace.log(data);
132
+ /**
133
+ if (parsed?.selected_tool === "generator-menu") {
134
+ const hasCreated = parsed?.data.some(item => item.action === 'CREATE');
135
+ const hasUpdated = parsed?.data.some(item => item.action === 'UPDATE');
136
+ const hasDeleted = parsed?.data.some(item => item.action === 'DELETE');
137
+
138
+ if (hasUpdated || hasCreated || hasDeleted) {
139
+ // 진짜 메뉴명 변경이나 이동만 요청한 경우
140
+ nine.alert("메뉴 정리를 위한 라우터 정보 저장 화면으로 이동합니다.").then(res => {
141
+ const tobe = (parsed?.data || [])
142
+ .filter(item => item.action !== 'DELETE')
143
+ .map(({ isNew, action, ...rest }) => rest);
144
+
145
+ this.#showDiff(asis, tobe, "json");
146
+ });
147
+ }
148
+ } */
120
149
  }
121
150
  }