@nine-lab/nine-mu 0.1.405 → 0.1.407
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/css/nine-mu.css +2 -2
- package/dist/nine-mu.js +15 -43
- package/dist/nine-mu.js.map +1 -1
- package/dist/nine-mu.umd.js +3 -3
- package/dist/nine-mu.umd.js.map +1 -1
- package/package.json +1 -1
- package/public/css/nine-mu.css +2 -2
- package/src/components/ai/NineNaturalQuery.js +0 -38
package/package.json
CHANGED
package/public/css/nine-mu.css
CHANGED
|
@@ -1030,7 +1030,7 @@
|
|
|
1030
1030
|
100% { opacity: 0.6; }
|
|
1031
1031
|
}
|
|
1032
1032
|
|
|
1033
|
-
:host(nine-
|
|
1033
|
+
:host(nine-natural-query) {
|
|
1034
1034
|
.input-wrapper {
|
|
1035
1035
|
position: relative;
|
|
1036
1036
|
width: 100%;
|
|
@@ -1078,7 +1078,7 @@
|
|
|
1078
1078
|
}
|
|
1079
1079
|
}
|
|
1080
1080
|
|
|
1081
|
-
:host(nine-
|
|
1081
|
+
:host(nine-natural-query-result) {
|
|
1082
1082
|
display: block;
|
|
1083
1083
|
width: 100%;
|
|
1084
1084
|
height: 100%;
|
|
@@ -4,9 +4,6 @@ import { TipPopup } from '@nine-lab/nine-ai';
|
|
|
4
4
|
|
|
5
5
|
export class NineNaturalQuery extends HTMLElement {
|
|
6
6
|
|
|
7
|
-
#schema = null;
|
|
8
|
-
#connectorUrl = '';
|
|
9
|
-
#aiProcessor = null;
|
|
10
7
|
#tipPopup;
|
|
11
8
|
|
|
12
9
|
constructor() {
|
|
@@ -15,45 +12,10 @@ export class NineNaturalQuery extends HTMLElement {
|
|
|
15
12
|
}
|
|
16
13
|
|
|
17
14
|
async connectedCallback() {
|
|
18
|
-
// 속성에서 커넥터 주소 읽기 (기본값 설정 가능)
|
|
19
|
-
this.#connectorUrl = this.getAttribute('connector-url') || 'http://localhost:3001';
|
|
20
|
-
|
|
21
15
|
this.#render();
|
|
22
16
|
}
|
|
23
17
|
|
|
24
18
|
|
|
25
|
-
/**
|
|
26
|
-
* 서버(Connector)에 생성된 SQL 실행 요청
|
|
27
|
-
*/
|
|
28
|
-
async #runQuery(sql) {
|
|
29
|
-
try {
|
|
30
|
-
trace.log("🚀 쿼리 실행 요청:", sql);
|
|
31
|
-
|
|
32
|
-
const response = await fetch(`${this.#connectorUrl}/api/query`, {
|
|
33
|
-
method: 'POST',
|
|
34
|
-
headers: { 'Content-Type': 'application/json' },
|
|
35
|
-
body: JSON.stringify({ sql: sql })
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
trace.log(response);
|
|
39
|
-
|
|
40
|
-
if (!response.ok) throw new Error('쿼리 실행 실패');
|
|
41
|
-
|
|
42
|
-
const result = await response.json();
|
|
43
|
-
|
|
44
|
-
if (result.success) {
|
|
45
|
-
trace.log("✅ 쿼리 실행 결과:", result.data);
|
|
46
|
-
|
|
47
|
-
return result.data;
|
|
48
|
-
// TODO: 결과를 UI(표 등)에 출력하는 로직 추가
|
|
49
|
-
} else {
|
|
50
|
-
throw new Error(result.error || '쿼리 실행 중 오류 발생');
|
|
51
|
-
}
|
|
52
|
-
} catch (error) {
|
|
53
|
-
trace.error("❌ 쿼리 실행 실패:", error.message);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
19
|
|
|
58
20
|
#render() {
|
|
59
21
|
|