@nine-lab/nine-mu 0.1.158 → 0.1.160

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.158",
3
+ "version": "0.1.160",
4
4
  "description": "AI-Driven Full-Stack Code Fabrication Engine",
5
5
  "type": "module",
6
6
  "main": "./dist/nine-mu.umd.js",
@@ -207,6 +207,12 @@
207
207
  textarea:focus {
208
208
  border: 1px solid green;
209
209
  }
210
+ textarea:disabled {
211
+ background-color: #f5f5f5; /* 연한 회색 배경 */
212
+ color: #999; /* 글자색도 연하게 */
213
+ cursor: not-allowed; /* 마우스 커서를 금지 모양으로 변경 */
214
+ border-color: #ddd; /* 테두리 색상도 힘을 뺌 */
215
+ }
210
216
  }
211
217
  }
212
218
  }
@@ -72,7 +72,7 @@ export class NineChat extends HTMLElement {
72
72
  const $textarea = this.shadowRoot.querySelector('#q');
73
73
 
74
74
  // 중복 전송 방지 플래그
75
- this.isProcessing = false;
75
+ //this.isProcessing = false;
76
76
 
77
77
  $textarea.addEventListener('keypress', async (e) => {
78
78
  if (e.key === 'Enter' && !e.shiftKey) {
@@ -81,17 +81,20 @@ export class NineChat extends HTMLElement {
81
81
  const userInput = $textarea.value.trim();
82
82
  if (!userInput || this.isProcessing) return;
83
83
 
84
- this.isProcessing = true;
84
+ //this.isProcessing = true;
85
+ $textarea.disabled = true;
85
86
 
86
87
  // 1. 즉시 UI 반영
87
88
  this.#$nineChatMessage.add("me", userInput);
88
89
  this.#$nineChatMessage.add("ing", ""); // 로딩 상태
89
90
 
90
91
  // 2. 입력창 비우기
91
- $textarea.value = "";
92
+ setTimeout(() => {
93
+ $textarea.value = "";
94
+ });
92
95
 
93
96
  // 3. nine.safe로 매니저 로직 실행
94
- const [_, err] = await nine.safe(this.#manager.handleChatSubmit(userInput));
97
+ const [_, err] = await nine.safe(this.#manager.handleChatSubmit($textarea));
95
98
 
96
99
  if (err) {
97
100
  console.error("Manager 실행 에러:", err);
@@ -100,7 +103,8 @@ export class NineChat extends HTMLElement {
100
103
  nine.alert("메시지 전송 중 오류가 발생했습니다.").rgb().shake();
101
104
  }
102
105
 
103
- this.isProcessing = false;
106
+ $textarea.disabled = false;
107
+ //this.isProcessing = false;
104
108
  }
105
109
  });
106
110
  }