@nine-lab/nine-mu 0.1.164 → 0.1.166

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.164",
3
+ "version": "0.1.166",
4
4
  "description": "AI-Driven Full-Stack Code Fabrication Engine",
5
5
  "type": "module",
6
6
  "main": "./dist/nine-mu.umd.js",
@@ -208,7 +208,7 @@
208
208
  border: 1px solid green;
209
209
  }
210
210
  textarea:disabled {
211
- background-color: red; /* 연한 회색 배경 */
211
+ background-color: #f5f5f5; /* 연한 회색 배경 */
212
212
  color: #999; /* 글자색도 연하게 */
213
213
  cursor: not-allowed; /* 마우스 커서를 금지 모양으로 변경 */
214
214
  border-color: #ddd; /* 테두리 색상도 힘을 뺌 */
@@ -69,9 +69,7 @@ export class NineChat extends HTMLElement {
69
69
  // --- [그룹 2: Action] 엔터키 입력 시 서비스 호출 ---
70
70
  #initActions() {
71
71
 
72
- const $textarea = this.shadowRoot.querySelector('#q');
73
-
74
- $textarea.addEventListener('keypress', async (e) => {
72
+ this.shadowRoot.querySelector('#q').addEventListener('keypress', async (e) => {
75
73
  if (e.key === 'Enter' && !e.shiftKey) {
76
74
  e.preventDefault();
77
75
 
@@ -81,7 +79,6 @@ export class NineChat extends HTMLElement {
81
79
  //this.isProcessing = true;
82
80
  //e.target.disabled = true;
83
81
  e.target.setAttribute('disabled', 'disabled');
84
- trace.log("22222222222222")
85
82
 
86
83
  // 1. 즉시 UI 반영
87
84
  this.#$nineChatMessage.add("me", userInput);
@@ -93,7 +90,7 @@ export class NineChat extends HTMLElement {
93
90
  });
94
91
 
95
92
  // 3. nine.safe로 매니저 로직 실행
96
- const [_, err] = await nine.safe(this.#manager.handleChatSubmit($textarea));
93
+ const [_, err] = await nine.safe(this.#manager.handleChatSubmit(e.target));
97
94
 
98
95
  if (err) {
99
96
  console.error("Manager 실행 에러:", err);
@@ -102,8 +99,7 @@ export class NineChat extends HTMLElement {
102
99
  nine.alert("메시지 전송 중 오류가 발생했습니다.").rgb().shake();
103
100
  }
104
101
 
105
- //$textarea.disabled = false;
106
- //this.isProcessing = false;
102
+ e.target.removeAttribute('disabled');
107
103
  }
108
104
  });
109
105
  }
@@ -124,8 +124,12 @@ export class NineChatManager {
124
124
  async #callTool(toolName, args = {}) {
125
125
 
126
126
  this.#updateStatus("AI 분석 중...");
127
+ console.log(22222);
127
128
 
128
- this.#mcpClient.callTool({ name: toolName, arguments: args })
129
+ const response = this.#mcpClient.callTool({ name: toolName, arguments: args });
130
+ console.log(333333);
131
+ return response;
132
+ /**
129
133
  .then((res) => {
130
134
  trace.log(res);
131
135
  //this.#updateStatus("✅ MCP Connected");
@@ -134,7 +138,7 @@ export class NineChatManager {
134
138
  trace.error(err);
135
139
  this.#updateStatus("에러 발생");
136
140
  throw err;
137
- });
141
+ }); */
138
142
  }
139
143
 
140
144
  handleChatSubmit = async el => {
@@ -143,10 +147,16 @@ export class NineChatManager {
143
147
 
144
148
  const routes = [];
145
149
 
146
- this.#callTool("system-brain", {
150
+ console.log(1111111);
151
+
152
+ const response = await this.#callTool("system-brain", {
147
153
  user_input : el.value.trim(),
148
154
  routes : routes,
149
155
  current_path : "/group_member/student_management",
150
- })
156
+ });
157
+
158
+ console.log(44444);
159
+
160
+ return response;
151
161
  }
152
162
  }