@nethru/kit 1.1.12 → 1.1.14
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/components/chat/AiChat.js +1 -1
- package/dist/components/chat/contexts/ChatContext.js +25 -5
- package/dist/components/chat/{ChatInput.js → input/ChatInput.js} +20 -10
- package/dist/components/chat/{ModelSelect.js → input/ModelSelect.js} +3 -4
- package/dist/components/chat/input/Options.js +72 -0
- package/package.json +1 -1
- package/dist/components/chat/mock.js +0 -1153
- package/dist/js/promptIntent.js +0 -22
|
@@ -2,7 +2,7 @@ import React, { useEffect } from 'react';
|
|
|
2
2
|
import { Stack } from "@mui/material";
|
|
3
3
|
import { useChatContext } from './contexts/ChatContext';
|
|
4
4
|
import ChatMessages from './ChatMessages';
|
|
5
|
-
import ChatInput from './ChatInput';
|
|
5
|
+
import ChatInput from './input/ChatInput';
|
|
6
6
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
7
|
function AiChat({
|
|
8
8
|
mainPageRef,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import React, { createContext, useContext, useEffect, useRef, useState } from 'react';
|
|
1
|
+
import React, { createContext, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
2
|
import { getConfig } from "../../../js/config";
|
|
3
|
-
import
|
|
3
|
+
import AutoStoriesIcon from "@mui/icons-material/AutoStories";
|
|
4
|
+
import WysiwygIcon from "@mui/icons-material/Wysiwyg";
|
|
4
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
6
|
const ChatContext = /*#__PURE__*/createContext();
|
|
6
7
|
export function ChatProvider({
|
|
@@ -16,6 +17,8 @@ export function ChatProvider({
|
|
|
16
17
|
const [provider, setProvider] = useState(defaultProvider);
|
|
17
18
|
const [providers, setProviders] = useState([]);
|
|
18
19
|
const [model, setModel] = useState(defaultModel);
|
|
20
|
+
const [option, setOption] = useState();
|
|
21
|
+
const options = useMemo(() => defaultOptions);
|
|
19
22
|
const [tools, setTools] = useState([]);
|
|
20
23
|
const chatContainerRef = useRef(null);
|
|
21
24
|
const mainPageRef = useRef(null);
|
|
@@ -68,7 +71,8 @@ export function ChatProvider({
|
|
|
68
71
|
conversationId: conversationId,
|
|
69
72
|
message: message,
|
|
70
73
|
provider: provider,
|
|
71
|
-
model: model
|
|
74
|
+
model: model,
|
|
75
|
+
option: option
|
|
72
76
|
})
|
|
73
77
|
});
|
|
74
78
|
return await response.json();
|
|
@@ -110,7 +114,7 @@ export function ChatProvider({
|
|
|
110
114
|
setInputValue('');
|
|
111
115
|
setIsLoading(true);
|
|
112
116
|
try {
|
|
113
|
-
let data =
|
|
117
|
+
let data = option === 'analyze' ? await analyzePage(message) : await answer(message);
|
|
114
118
|
setConversationId(data.conversationId);
|
|
115
119
|
setMessages(prev => [...prev, {
|
|
116
120
|
role: data.role,
|
|
@@ -145,6 +149,9 @@ export function ChatProvider({
|
|
|
145
149
|
setProvider,
|
|
146
150
|
model,
|
|
147
151
|
setModel,
|
|
152
|
+
options,
|
|
153
|
+
option,
|
|
154
|
+
setOption,
|
|
148
155
|
tools,
|
|
149
156
|
chatContainerRef,
|
|
150
157
|
mainPageRef,
|
|
@@ -164,4 +171,17 @@ export function useChatContext() {
|
|
|
164
171
|
}
|
|
165
172
|
return context;
|
|
166
173
|
}
|
|
167
|
-
export default ChatContext;
|
|
174
|
+
export default ChatContext;
|
|
175
|
+
const defaultOptions = [{
|
|
176
|
+
value: 'ANALYZE',
|
|
177
|
+
label: '페이지 요약 및 분석',
|
|
178
|
+
icon: /*#__PURE__*/_jsx(WysiwygIcon, {
|
|
179
|
+
fontSize: "small"
|
|
180
|
+
})
|
|
181
|
+
}, {
|
|
182
|
+
value: 'RAG',
|
|
183
|
+
label: '지식 베이스에서 문의',
|
|
184
|
+
icon: /*#__PURE__*/_jsx(AutoStoriesIcon, {
|
|
185
|
+
fontSize: "small"
|
|
186
|
+
})
|
|
187
|
+
}];
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
import { Box,
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { Box, IconButton, Stack, TextField } from '@mui/material';
|
|
3
3
|
import { Send as SendIcon } from '@mui/icons-material';
|
|
4
|
-
import { useChatContext } from "
|
|
4
|
+
import { useChatContext } from "../contexts/ChatContext";
|
|
5
5
|
import ModelSelect from "./ModelSelect";
|
|
6
|
+
import Options from "./Options";
|
|
6
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
8
|
const ChatInput = () => {
|
|
8
9
|
const inputRef = useRef(null);
|
|
@@ -11,7 +12,10 @@ const ChatInput = () => {
|
|
|
11
12
|
inputValue,
|
|
12
13
|
setInputValue,
|
|
13
14
|
isLoading,
|
|
14
|
-
sendMessage
|
|
15
|
+
sendMessage,
|
|
16
|
+
option,
|
|
17
|
+
setOption,
|
|
18
|
+
options
|
|
15
19
|
} = useChatContext();
|
|
16
20
|
const handleKeyPress = e => {
|
|
17
21
|
if (e.key === 'Enter' && !e.shiftKey) {
|
|
@@ -21,7 +25,7 @@ const ChatInput = () => {
|
|
|
21
25
|
};
|
|
22
26
|
useEffect(() => {
|
|
23
27
|
if (!isLoading && !selectOpen && inputRef.current) inputRef.current.focus();
|
|
24
|
-
}, [isLoading, selectOpen]);
|
|
28
|
+
}, [isLoading, selectOpen, option]);
|
|
25
29
|
return /*#__PURE__*/_jsx(Box, {
|
|
26
30
|
sx: styles.container,
|
|
27
31
|
children: /*#__PURE__*/_jsxs(Stack, {
|
|
@@ -45,15 +49,21 @@ const ChatInput = () => {
|
|
|
45
49
|
}), /*#__PURE__*/_jsxs(Stack, {
|
|
46
50
|
direction: "row",
|
|
47
51
|
gap: 2,
|
|
48
|
-
justifyContent: "
|
|
52
|
+
justifyContent: "space-between",
|
|
49
53
|
alignItems: "center",
|
|
50
|
-
children: [/*#__PURE__*/
|
|
51
|
-
|
|
52
|
-
|
|
54
|
+
children: [/*#__PURE__*/_jsxs(Stack, {
|
|
55
|
+
direction: "row",
|
|
56
|
+
alignItems: "center",
|
|
57
|
+
gap: 2,
|
|
58
|
+
children: [/*#__PURE__*/_jsx(Options, {
|
|
59
|
+
options: options,
|
|
60
|
+
option: option,
|
|
61
|
+
setOption: setOption
|
|
62
|
+
}), /*#__PURE__*/_jsx(ModelSelect, {
|
|
53
63
|
open: selectOpen,
|
|
54
64
|
onOpen: () => setSelectOpen(true),
|
|
55
65
|
onClose: () => setSelectOpen(false)
|
|
56
|
-
})
|
|
66
|
+
})]
|
|
57
67
|
}), /*#__PURE__*/_jsx(IconButton, {
|
|
58
68
|
onClick: sendMessage,
|
|
59
69
|
disabled: isLoading || !inputValue.trim(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Box, Divider, MenuItem, Select } from "@mui/material";
|
|
3
|
-
import { useChatContext } from "
|
|
3
|
+
import { useChatContext } from "../contexts/ChatContext";
|
|
4
4
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
export default function ModelSelect({
|
|
6
6
|
...props
|
|
@@ -70,12 +70,11 @@ function findModel(providers, value) {
|
|
|
70
70
|
const styles = {
|
|
71
71
|
select: {
|
|
72
72
|
color: '#666',
|
|
73
|
-
fontSize: '
|
|
74
|
-
fontWeight: 400
|
|
73
|
+
fontSize: '11px'
|
|
75
74
|
},
|
|
76
75
|
name: {
|
|
77
76
|
fontWeight: 400,
|
|
78
|
-
fontSize: '
|
|
77
|
+
fontSize: '12px'
|
|
79
78
|
},
|
|
80
79
|
desc: {
|
|
81
80
|
fontSize: '11px',
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ToggleButton, toggleButtonClasses, ToggleButtonGroup, toggleButtonGroupClasses, Tooltip, Typography } from "@mui/material";
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
const StyledToggleButtonGroup = styled(ToggleButtonGroup)(({
|
|
6
|
+
theme
|
|
7
|
+
}) => ({
|
|
8
|
+
gap: '5px',
|
|
9
|
+
[`& .${toggleButtonGroupClasses.firstButton}, & .${toggleButtonGroupClasses.middleButton}`]: {
|
|
10
|
+
borderTopRightRadius: '6px',
|
|
11
|
+
borderBottomRightRadius: '6px'
|
|
12
|
+
},
|
|
13
|
+
[`& .${toggleButtonGroupClasses.lastButton}, & .${toggleButtonGroupClasses.middleButton}`]: {
|
|
14
|
+
borderTopLeftRadius: '6px',
|
|
15
|
+
borderBottomLeftRadius: '6px'
|
|
16
|
+
},
|
|
17
|
+
[`& .${toggleButtonGroupClasses.lastButton}.${toggleButtonClasses.disabled}, & .${toggleButtonGroupClasses.middleButton}.${toggleButtonClasses.disabled}`]: {}
|
|
18
|
+
}));
|
|
19
|
+
export default function Options({
|
|
20
|
+
options = [],
|
|
21
|
+
option,
|
|
22
|
+
setOption,
|
|
23
|
+
...props
|
|
24
|
+
}) {
|
|
25
|
+
return /*#__PURE__*/_jsx(StyledToggleButtonGroup, {
|
|
26
|
+
exclusive: true,
|
|
27
|
+
value: option,
|
|
28
|
+
onChange: (_, value) => setOption(value),
|
|
29
|
+
children: options.map(o => /*#__PURE__*/_jsx(Tooltip, {
|
|
30
|
+
title: o.label,
|
|
31
|
+
slotProps: {
|
|
32
|
+
tooltip: {
|
|
33
|
+
sx: styles.tooltip
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
children: /*#__PURE__*/_jsxs(ToggleButton, {
|
|
37
|
+
value: o.value,
|
|
38
|
+
size: "small",
|
|
39
|
+
sx: styles.button(option === o.value),
|
|
40
|
+
...props,
|
|
41
|
+
children: [o.icon, option === o.value && /*#__PURE__*/_jsx(Typography, {
|
|
42
|
+
sx: styles.text,
|
|
43
|
+
children: o.label
|
|
44
|
+
})]
|
|
45
|
+
})
|
|
46
|
+
}, o.value))
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
const styles = {
|
|
50
|
+
button: selected => ({
|
|
51
|
+
border: 'none',
|
|
52
|
+
width: selected ? 'auto' : '25px',
|
|
53
|
+
height: '25px',
|
|
54
|
+
minWidth: 0,
|
|
55
|
+
padding: selected ? '0 8px' : '0',
|
|
56
|
+
'&.Mui-selected': {
|
|
57
|
+
backgroundColor: '#333',
|
|
58
|
+
color: 'white',
|
|
59
|
+
'&:hover': {
|
|
60
|
+
backgroundColor: 'black'
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}),
|
|
64
|
+
text: {
|
|
65
|
+
ml: 1,
|
|
66
|
+
fontSize: '11px',
|
|
67
|
+
whiteSpace: 'nowrap'
|
|
68
|
+
},
|
|
69
|
+
tooltip: {
|
|
70
|
+
fontSize: '10px'
|
|
71
|
+
}
|
|
72
|
+
};
|
package/package.json
CHANGED
|
@@ -1,1153 +0,0 @@
|
|
|
1
|
-
const mockSearchContainerByKeyword = {
|
|
2
|
-
"type": "tool",
|
|
3
|
-
"name": "search-container-by-keyword",
|
|
4
|
-
"arguments": {
|
|
5
|
-
"keyword": "와이즈컬렉터3"
|
|
6
|
-
},
|
|
7
|
-
"result": {
|
|
8
|
-
"code": "SUCCESS",
|
|
9
|
-
"message": "Found 1 container(s) matching keyword: '와이즈컬렉터3'",
|
|
10
|
-
"result": [{
|
|
11
|
-
"id": "00001",
|
|
12
|
-
"type": "WEB",
|
|
13
|
-
"name": "와이즈컬렉터3",
|
|
14
|
-
"url": "https://wc.nethru.co.kr",
|
|
15
|
-
"loggingId": "wc3",
|
|
16
|
-
"disabled": false
|
|
17
|
-
}]
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
const mockSearchTaskByKeyword = {
|
|
21
|
-
"type": "tool",
|
|
22
|
-
"name": "search-task-by-keyword",
|
|
23
|
-
"arguments": {
|
|
24
|
-
"keyword": "욜변환"
|
|
25
|
-
},
|
|
26
|
-
"result": {
|
|
27
|
-
"code": "SUCCESS",
|
|
28
|
-
"message": "Found 1 task(s) matching keyword: '욜변환'",
|
|
29
|
-
"result": [{
|
|
30
|
-
"taskId": "wc_convert_1",
|
|
31
|
-
"taskType": "convert",
|
|
32
|
-
"containerId": "00001",
|
|
33
|
-
"name": "욜변환",
|
|
34
|
-
"typeName": "KafkaSource",
|
|
35
|
-
"channelId": -1,
|
|
36
|
-
"runAgent": "-1",
|
|
37
|
-
"inputTopic": "wc_collect_1_wc3_output",
|
|
38
|
-
"outputTopic": "wc_convert_1_output_v4",
|
|
39
|
-
"filteredTopic": "wc_convert_1_filtered",
|
|
40
|
-
"issuedTopic": "wc_convert_1_issued"
|
|
41
|
-
}, {
|
|
42
|
-
"taskId": "wc_convert_2",
|
|
43
|
-
"taskType": "convert",
|
|
44
|
-
"containerId": "00001",
|
|
45
|
-
"name": "숨변환",
|
|
46
|
-
"typeName": "KafkaSource",
|
|
47
|
-
"channelId": -1,
|
|
48
|
-
"runAgent": "-1",
|
|
49
|
-
"inputTopic": "wc_collect_1_wc3_output",
|
|
50
|
-
"outputTopic": "wc_convert_1_output_v4",
|
|
51
|
-
"filteredTopic": "wc_convert_1_filtered",
|
|
52
|
-
"issuedTopic": "wc_convert_1_issued"
|
|
53
|
-
}]
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
const mockCollectSummary1 = {
|
|
57
|
-
"type": "tool",
|
|
58
|
-
"name": "query-summary-by-container-id",
|
|
59
|
-
"arguments": {
|
|
60
|
-
"containerId": "00001",
|
|
61
|
-
"from": "20251222",
|
|
62
|
-
"to": "20251222"
|
|
63
|
-
},
|
|
64
|
-
"result": {
|
|
65
|
-
"code": "SUCCESS",
|
|
66
|
-
"message": "",
|
|
67
|
-
"result": {
|
|
68
|
-
"input": 185,
|
|
69
|
-
"output": 85,
|
|
70
|
-
"filter": 50,
|
|
71
|
-
"error": 50
|
|
72
|
-
},
|
|
73
|
-
"queryTimestamp": "2025-12-22 15:06:20",
|
|
74
|
-
"cacheValidUntil": "2025-12-22 15:07:20"
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
const mockPrevTrend = {
|
|
78
|
-
"type": "tool",
|
|
79
|
-
"name": "query-trend-by-container-id",
|
|
80
|
-
"arguments": {
|
|
81
|
-
"containerId": "00001",
|
|
82
|
-
"from": "20251223",
|
|
83
|
-
"to": "20251223",
|
|
84
|
-
"unit": "60"
|
|
85
|
-
},
|
|
86
|
-
"result": {
|
|
87
|
-
"code": "SUCCESS",
|
|
88
|
-
"message": "",
|
|
89
|
-
"result": [{
|
|
90
|
-
"time": 1766415600000,
|
|
91
|
-
"metric": {
|
|
92
|
-
"input": 0,
|
|
93
|
-
"output": 0,
|
|
94
|
-
"filter": 0,
|
|
95
|
-
"error": 0
|
|
96
|
-
}
|
|
97
|
-
}, {
|
|
98
|
-
"time": 1766419200000,
|
|
99
|
-
"metric": {
|
|
100
|
-
"input": 0,
|
|
101
|
-
"output": 0,
|
|
102
|
-
"filter": 0,
|
|
103
|
-
"error": 0
|
|
104
|
-
}
|
|
105
|
-
}, {
|
|
106
|
-
"time": 1766422800000,
|
|
107
|
-
"metric": {
|
|
108
|
-
"input": 0,
|
|
109
|
-
"output": 0,
|
|
110
|
-
"filter": 0,
|
|
111
|
-
"error": 0
|
|
112
|
-
}
|
|
113
|
-
}, {
|
|
114
|
-
"time": 1766426400000,
|
|
115
|
-
"metric": {
|
|
116
|
-
"input": 0,
|
|
117
|
-
"output": 0,
|
|
118
|
-
"filter": 0,
|
|
119
|
-
"error": 0
|
|
120
|
-
}
|
|
121
|
-
}, {
|
|
122
|
-
"time": 1766430000000,
|
|
123
|
-
"metric": {
|
|
124
|
-
"input": 0,
|
|
125
|
-
"output": 0,
|
|
126
|
-
"filter": 0,
|
|
127
|
-
"error": 0
|
|
128
|
-
}
|
|
129
|
-
}, {
|
|
130
|
-
"time": 1766433600000,
|
|
131
|
-
"metric": {
|
|
132
|
-
"input": 0,
|
|
133
|
-
"output": 0,
|
|
134
|
-
"filter": 0,
|
|
135
|
-
"error": 0
|
|
136
|
-
}
|
|
137
|
-
}, {
|
|
138
|
-
"time": 1766437200000,
|
|
139
|
-
"metric": {
|
|
140
|
-
"input": 0,
|
|
141
|
-
"output": 0,
|
|
142
|
-
"filter": 0,
|
|
143
|
-
"error": 0
|
|
144
|
-
}
|
|
145
|
-
}, {
|
|
146
|
-
"time": 1766440800000,
|
|
147
|
-
"metric": {
|
|
148
|
-
"input": 0,
|
|
149
|
-
"output": 0,
|
|
150
|
-
"filter": 0,
|
|
151
|
-
"error": 0
|
|
152
|
-
}
|
|
153
|
-
}, {
|
|
154
|
-
"time": 1766444400000,
|
|
155
|
-
"metric": {
|
|
156
|
-
"input": 0,
|
|
157
|
-
"output": 0,
|
|
158
|
-
"filter": 0,
|
|
159
|
-
"error": 0
|
|
160
|
-
}
|
|
161
|
-
}, {
|
|
162
|
-
"time": 1766448000000,
|
|
163
|
-
"metric": {
|
|
164
|
-
"input": 21,
|
|
165
|
-
"output": 21,
|
|
166
|
-
"filter": 0,
|
|
167
|
-
"error": 0
|
|
168
|
-
}
|
|
169
|
-
}, {
|
|
170
|
-
"time": 1766451600000,
|
|
171
|
-
"metric": {
|
|
172
|
-
"input": 17,
|
|
173
|
-
"output": 17,
|
|
174
|
-
"filter": 0,
|
|
175
|
-
"error": 0
|
|
176
|
-
}
|
|
177
|
-
}, {
|
|
178
|
-
"time": 1766455200000,
|
|
179
|
-
"metric": {
|
|
180
|
-
"input": 7,
|
|
181
|
-
"output": 7,
|
|
182
|
-
"filter": 0,
|
|
183
|
-
"error": 0
|
|
184
|
-
}
|
|
185
|
-
}, {
|
|
186
|
-
"time": 1766458800000,
|
|
187
|
-
"metric": {
|
|
188
|
-
"input": 0,
|
|
189
|
-
"output": 0,
|
|
190
|
-
"filter": 0,
|
|
191
|
-
"error": 0
|
|
192
|
-
}
|
|
193
|
-
}, {
|
|
194
|
-
"time": 1766462400000,
|
|
195
|
-
"metric": {
|
|
196
|
-
"input": 0,
|
|
197
|
-
"output": 0,
|
|
198
|
-
"filter": 0,
|
|
199
|
-
"error": 0
|
|
200
|
-
}
|
|
201
|
-
}, {
|
|
202
|
-
"time": 1766466000000,
|
|
203
|
-
"metric": {
|
|
204
|
-
"input": 0,
|
|
205
|
-
"output": 0,
|
|
206
|
-
"filter": 0,
|
|
207
|
-
"error": 0
|
|
208
|
-
}
|
|
209
|
-
}, {
|
|
210
|
-
"time": 1766469600000,
|
|
211
|
-
"metric": {
|
|
212
|
-
"input": 23,
|
|
213
|
-
"output": 23,
|
|
214
|
-
"filter": 0,
|
|
215
|
-
"error": 0
|
|
216
|
-
}
|
|
217
|
-
}, {
|
|
218
|
-
"time": 1766473200000,
|
|
219
|
-
"metric": {
|
|
220
|
-
"input": 0,
|
|
221
|
-
"output": 0,
|
|
222
|
-
"filter": 0,
|
|
223
|
-
"error": 0
|
|
224
|
-
}
|
|
225
|
-
}, {
|
|
226
|
-
"time": 1766476800000,
|
|
227
|
-
"metric": {
|
|
228
|
-
"input": 0,
|
|
229
|
-
"output": 0,
|
|
230
|
-
"filter": 0,
|
|
231
|
-
"error": 0
|
|
232
|
-
}
|
|
233
|
-
}, {
|
|
234
|
-
"time": 1766480400000,
|
|
235
|
-
"metric": {
|
|
236
|
-
"input": 6,
|
|
237
|
-
"output": 6,
|
|
238
|
-
"filter": 0,
|
|
239
|
-
"error": 0
|
|
240
|
-
}
|
|
241
|
-
}, {
|
|
242
|
-
"time": 1766484000000,
|
|
243
|
-
"metric": {
|
|
244
|
-
"input": 0,
|
|
245
|
-
"output": 0,
|
|
246
|
-
"filter": 0,
|
|
247
|
-
"error": 0
|
|
248
|
-
}
|
|
249
|
-
}, {
|
|
250
|
-
"time": 1766487600000,
|
|
251
|
-
"metric": {
|
|
252
|
-
"input": 0,
|
|
253
|
-
"output": 0,
|
|
254
|
-
"filter": 0,
|
|
255
|
-
"error": 0
|
|
256
|
-
}
|
|
257
|
-
}, {
|
|
258
|
-
"time": 1766491200000,
|
|
259
|
-
"metric": {
|
|
260
|
-
"input": 0,
|
|
261
|
-
"output": 0,
|
|
262
|
-
"filter": 0,
|
|
263
|
-
"error": 0
|
|
264
|
-
}
|
|
265
|
-
}, {
|
|
266
|
-
"time": 1766494800000,
|
|
267
|
-
"metric": {
|
|
268
|
-
"input": 4,
|
|
269
|
-
"output": 4,
|
|
270
|
-
"filter": 0,
|
|
271
|
-
"error": 0
|
|
272
|
-
}
|
|
273
|
-
}, {
|
|
274
|
-
"time": 1766498400000,
|
|
275
|
-
"metric": {
|
|
276
|
-
"input": 0,
|
|
277
|
-
"output": 0,
|
|
278
|
-
"filter": 0,
|
|
279
|
-
"error": 0
|
|
280
|
-
}
|
|
281
|
-
}],
|
|
282
|
-
"queryTimestamp": "2025-12-24 16:25:36",
|
|
283
|
-
"cacheValidUntil": "2025-12-24 16:26:36"
|
|
284
|
-
}
|
|
285
|
-
};
|
|
286
|
-
const mockCurrentTrend = {
|
|
287
|
-
"type": "tool",
|
|
288
|
-
"name": "query-trend-by-container-id",
|
|
289
|
-
"arguments": {
|
|
290
|
-
"containerId": "00001",
|
|
291
|
-
"from": "20251224",
|
|
292
|
-
"to": "20251224",
|
|
293
|
-
"unit": "60"
|
|
294
|
-
},
|
|
295
|
-
"result": {
|
|
296
|
-
"code": "SUCCESS",
|
|
297
|
-
"message": "",
|
|
298
|
-
"result": [{
|
|
299
|
-
"time": 1766502000000,
|
|
300
|
-
"metric": {
|
|
301
|
-
"input": 0,
|
|
302
|
-
"output": 0,
|
|
303
|
-
"filter": 0,
|
|
304
|
-
"error": 0
|
|
305
|
-
}
|
|
306
|
-
}, {
|
|
307
|
-
"time": 1766505600000,
|
|
308
|
-
"metric": {
|
|
309
|
-
"input": 0,
|
|
310
|
-
"output": 0,
|
|
311
|
-
"filter": 0,
|
|
312
|
-
"error": 0
|
|
313
|
-
}
|
|
314
|
-
}, {
|
|
315
|
-
"time": 1766509200000,
|
|
316
|
-
"metric": {
|
|
317
|
-
"input": 0,
|
|
318
|
-
"output": 0,
|
|
319
|
-
"filter": 0,
|
|
320
|
-
"error": 0
|
|
321
|
-
}
|
|
322
|
-
}, {
|
|
323
|
-
"time": 1766512800000,
|
|
324
|
-
"metric": {
|
|
325
|
-
"input": 0,
|
|
326
|
-
"output": 0,
|
|
327
|
-
"filter": 0,
|
|
328
|
-
"error": 0
|
|
329
|
-
}
|
|
330
|
-
}, {
|
|
331
|
-
"time": 1766516400000,
|
|
332
|
-
"metric": {
|
|
333
|
-
"input": 0,
|
|
334
|
-
"output": 0,
|
|
335
|
-
"filter": 0,
|
|
336
|
-
"error": 0
|
|
337
|
-
}
|
|
338
|
-
}, {
|
|
339
|
-
"time": 1766520000000,
|
|
340
|
-
"metric": {
|
|
341
|
-
"input": 0,
|
|
342
|
-
"output": 0,
|
|
343
|
-
"filter": 0,
|
|
344
|
-
"error": 0
|
|
345
|
-
}
|
|
346
|
-
}, {
|
|
347
|
-
"time": 1766523600000,
|
|
348
|
-
"metric": {
|
|
349
|
-
"input": 0,
|
|
350
|
-
"output": 0,
|
|
351
|
-
"filter": 0,
|
|
352
|
-
"error": 0
|
|
353
|
-
}
|
|
354
|
-
}, {
|
|
355
|
-
"time": 1766527200000,
|
|
356
|
-
"metric": {
|
|
357
|
-
"input": 0,
|
|
358
|
-
"output": 0,
|
|
359
|
-
"filter": 0,
|
|
360
|
-
"error": 0
|
|
361
|
-
}
|
|
362
|
-
}, {
|
|
363
|
-
"time": 1766530800000,
|
|
364
|
-
"metric": {
|
|
365
|
-
"input": 0,
|
|
366
|
-
"output": 0,
|
|
367
|
-
"filter": 0,
|
|
368
|
-
"error": 0
|
|
369
|
-
}
|
|
370
|
-
}, {
|
|
371
|
-
"time": 1766534400000,
|
|
372
|
-
"metric": {
|
|
373
|
-
"input": 0,
|
|
374
|
-
"output": 0,
|
|
375
|
-
"filter": 0,
|
|
376
|
-
"error": 0
|
|
377
|
-
}
|
|
378
|
-
}, {
|
|
379
|
-
"time": 1766538000000,
|
|
380
|
-
"metric": {
|
|
381
|
-
"input": 0,
|
|
382
|
-
"output": 0,
|
|
383
|
-
"filter": 0,
|
|
384
|
-
"error": 0
|
|
385
|
-
}
|
|
386
|
-
}, {
|
|
387
|
-
"time": 1766541600000,
|
|
388
|
-
"metric": {
|
|
389
|
-
"input": 0,
|
|
390
|
-
"output": 0,
|
|
391
|
-
"filter": 0,
|
|
392
|
-
"error": 0
|
|
393
|
-
}
|
|
394
|
-
}, {
|
|
395
|
-
"time": 1766545200000,
|
|
396
|
-
"metric": {
|
|
397
|
-
"input": 0,
|
|
398
|
-
"output": 0,
|
|
399
|
-
"filter": 0,
|
|
400
|
-
"error": 0
|
|
401
|
-
}
|
|
402
|
-
}, {
|
|
403
|
-
"time": 1766548800000,
|
|
404
|
-
"metric": {
|
|
405
|
-
"input": 0,
|
|
406
|
-
"output": 0,
|
|
407
|
-
"filter": 0,
|
|
408
|
-
"error": 0
|
|
409
|
-
}
|
|
410
|
-
}, {
|
|
411
|
-
"time": 1766552400000,
|
|
412
|
-
"metric": {
|
|
413
|
-
"input": 60,
|
|
414
|
-
"output": 60,
|
|
415
|
-
"filter": 0,
|
|
416
|
-
"error": 0
|
|
417
|
-
}
|
|
418
|
-
}, {
|
|
419
|
-
"time": 1766556000000,
|
|
420
|
-
"metric": {
|
|
421
|
-
"input": 14,
|
|
422
|
-
"output": 14,
|
|
423
|
-
"filter": 0,
|
|
424
|
-
"error": 0
|
|
425
|
-
}
|
|
426
|
-
}, {
|
|
427
|
-
"time": 1766559600000,
|
|
428
|
-
"metric": {
|
|
429
|
-
"input": 13,
|
|
430
|
-
"output": 13,
|
|
431
|
-
"filter": 0,
|
|
432
|
-
"error": 0
|
|
433
|
-
}
|
|
434
|
-
}],
|
|
435
|
-
"queryTimestamp": "2025-12-24 16:25:37",
|
|
436
|
-
"cacheValidUntil": "2025-12-24 16:26:37"
|
|
437
|
-
}
|
|
438
|
-
};
|
|
439
|
-
const mockConvertSummary1 = {
|
|
440
|
-
"type": "tool",
|
|
441
|
-
"name": "query-summary-by-task-id",
|
|
442
|
-
"arguments": {
|
|
443
|
-
"taskId": "wc_convert_1",
|
|
444
|
-
"from": "20251203",
|
|
445
|
-
"to": "20251203"
|
|
446
|
-
},
|
|
447
|
-
"result": {
|
|
448
|
-
"code": "SUCCESS",
|
|
449
|
-
"message": "",
|
|
450
|
-
"result": [{
|
|
451
|
-
"id": "1",
|
|
452
|
-
"name": "에이전트1",
|
|
453
|
-
"metric": {
|
|
454
|
-
"input": 22,
|
|
455
|
-
"output": 13,
|
|
456
|
-
"filter": 10,
|
|
457
|
-
"error": 5
|
|
458
|
-
}
|
|
459
|
-
}],
|
|
460
|
-
"queryTimestamp": "2025-12-04 09:33:48",
|
|
461
|
-
"cacheValidUntil": "2025-12-04 09:34:48"
|
|
462
|
-
}
|
|
463
|
-
};
|
|
464
|
-
const mockConvertSummary2 = {
|
|
465
|
-
"type": "tool",
|
|
466
|
-
"name": "query-summary-by-task-id",
|
|
467
|
-
"arguments": {
|
|
468
|
-
"taskId": "wc_convert_1",
|
|
469
|
-
"from": "20251204",
|
|
470
|
-
"to": "20251204"
|
|
471
|
-
},
|
|
472
|
-
"result": {
|
|
473
|
-
"code": "SUCCESS",
|
|
474
|
-
"message": "",
|
|
475
|
-
"result": [{
|
|
476
|
-
"id": "1",
|
|
477
|
-
"name": "에이전트1",
|
|
478
|
-
"metric": {
|
|
479
|
-
"input": 20,
|
|
480
|
-
"output": 13,
|
|
481
|
-
"filter": 5,
|
|
482
|
-
"error": 2
|
|
483
|
-
}
|
|
484
|
-
}],
|
|
485
|
-
"queryTimestamp": "2025-12-04 09:33:48",
|
|
486
|
-
"cacheValidUntil": "2025-12-04 09:34:48"
|
|
487
|
-
}
|
|
488
|
-
};
|
|
489
|
-
const mockConvertTrend1 = {
|
|
490
|
-
"type": "tool",
|
|
491
|
-
"name": "query-trend-by-task-id",
|
|
492
|
-
"arguments": {
|
|
493
|
-
"taskId": "wc_convert_1",
|
|
494
|
-
"from": "20251210",
|
|
495
|
-
"to": "20251210",
|
|
496
|
-
"unit": "30"
|
|
497
|
-
},
|
|
498
|
-
"result": {
|
|
499
|
-
"code": "SUCCESS",
|
|
500
|
-
"message": "",
|
|
501
|
-
"result": [{
|
|
502
|
-
"time": 1765292400000,
|
|
503
|
-
"metric": {
|
|
504
|
-
"input": 0,
|
|
505
|
-
"output": 0,
|
|
506
|
-
"filter": 0,
|
|
507
|
-
"error": 0
|
|
508
|
-
}
|
|
509
|
-
}, {
|
|
510
|
-
"time": 1765294200000,
|
|
511
|
-
"metric": {
|
|
512
|
-
"input": 0,
|
|
513
|
-
"output": 0,
|
|
514
|
-
"filter": 0,
|
|
515
|
-
"error": 0
|
|
516
|
-
}
|
|
517
|
-
}, {
|
|
518
|
-
"time": 1765296000000,
|
|
519
|
-
"metric": {
|
|
520
|
-
"input": 0,
|
|
521
|
-
"output": 0,
|
|
522
|
-
"filter": 0,
|
|
523
|
-
"error": 0
|
|
524
|
-
}
|
|
525
|
-
}, {
|
|
526
|
-
"time": 1765297800000,
|
|
527
|
-
"metric": {
|
|
528
|
-
"input": 0,
|
|
529
|
-
"output": 0,
|
|
530
|
-
"filter": 0,
|
|
531
|
-
"error": 0
|
|
532
|
-
}
|
|
533
|
-
}, {
|
|
534
|
-
"time": 1765299600000,
|
|
535
|
-
"metric": {
|
|
536
|
-
"input": 0,
|
|
537
|
-
"output": 0,
|
|
538
|
-
"filter": 0,
|
|
539
|
-
"error": 0
|
|
540
|
-
}
|
|
541
|
-
}, {
|
|
542
|
-
"time": 1765301400000,
|
|
543
|
-
"metric": {
|
|
544
|
-
"input": 0,
|
|
545
|
-
"output": 0,
|
|
546
|
-
"filter": 0,
|
|
547
|
-
"error": 0
|
|
548
|
-
}
|
|
549
|
-
}, {
|
|
550
|
-
"time": 1765303200000,
|
|
551
|
-
"metric": {
|
|
552
|
-
"input": 0,
|
|
553
|
-
"output": 0,
|
|
554
|
-
"filter": 0,
|
|
555
|
-
"error": 0
|
|
556
|
-
}
|
|
557
|
-
}, {
|
|
558
|
-
"time": 1765305000000,
|
|
559
|
-
"metric": {
|
|
560
|
-
"input": 0,
|
|
561
|
-
"output": 0,
|
|
562
|
-
"filter": 0,
|
|
563
|
-
"error": 0
|
|
564
|
-
}
|
|
565
|
-
}, {
|
|
566
|
-
"time": 1765306800000,
|
|
567
|
-
"metric": {
|
|
568
|
-
"input": 0,
|
|
569
|
-
"output": 0,
|
|
570
|
-
"filter": 0,
|
|
571
|
-
"error": 0
|
|
572
|
-
}
|
|
573
|
-
}, {
|
|
574
|
-
"time": 1765308600000,
|
|
575
|
-
"metric": {
|
|
576
|
-
"input": 0,
|
|
577
|
-
"output": 0,
|
|
578
|
-
"filter": 0,
|
|
579
|
-
"error": 0
|
|
580
|
-
}
|
|
581
|
-
}, {
|
|
582
|
-
"time": 1765310400000,
|
|
583
|
-
"metric": {
|
|
584
|
-
"input": 0,
|
|
585
|
-
"output": 0,
|
|
586
|
-
"filter": 0,
|
|
587
|
-
"error": 0
|
|
588
|
-
}
|
|
589
|
-
}, {
|
|
590
|
-
"time": 1765312200000,
|
|
591
|
-
"metric": {
|
|
592
|
-
"input": 0,
|
|
593
|
-
"output": 0,
|
|
594
|
-
"filter": 0,
|
|
595
|
-
"error": 0
|
|
596
|
-
}
|
|
597
|
-
}, {
|
|
598
|
-
"time": 1765314000000,
|
|
599
|
-
"metric": {
|
|
600
|
-
"input": 0,
|
|
601
|
-
"output": 0,
|
|
602
|
-
"filter": 0,
|
|
603
|
-
"error": 0
|
|
604
|
-
}
|
|
605
|
-
}, {
|
|
606
|
-
"time": 1765315800000,
|
|
607
|
-
"metric": {
|
|
608
|
-
"input": 0,
|
|
609
|
-
"output": 0,
|
|
610
|
-
"filter": 0,
|
|
611
|
-
"error": 0
|
|
612
|
-
}
|
|
613
|
-
}, {
|
|
614
|
-
"time": 1765317600000,
|
|
615
|
-
"metric": {
|
|
616
|
-
"input": 0,
|
|
617
|
-
"output": 0,
|
|
618
|
-
"filter": 0,
|
|
619
|
-
"error": 0
|
|
620
|
-
}
|
|
621
|
-
}, {
|
|
622
|
-
"time": 1765319400000,
|
|
623
|
-
"metric": {
|
|
624
|
-
"input": 0,
|
|
625
|
-
"output": 0,
|
|
626
|
-
"filter": 0,
|
|
627
|
-
"error": 0
|
|
628
|
-
}
|
|
629
|
-
}, {
|
|
630
|
-
"time": 1765321200000,
|
|
631
|
-
"metric": {
|
|
632
|
-
"input": 0,
|
|
633
|
-
"output": 0,
|
|
634
|
-
"filter": 0,
|
|
635
|
-
"error": 0
|
|
636
|
-
}
|
|
637
|
-
}, {
|
|
638
|
-
"time": 1765323000000,
|
|
639
|
-
"metric": {
|
|
640
|
-
"input": 22,
|
|
641
|
-
"output": 22,
|
|
642
|
-
"filter": 0,
|
|
643
|
-
"error": 0
|
|
644
|
-
}
|
|
645
|
-
}, {
|
|
646
|
-
"time": 1765324800000,
|
|
647
|
-
"metric": {
|
|
648
|
-
"input": 16,
|
|
649
|
-
"output": 16,
|
|
650
|
-
"filter": 0,
|
|
651
|
-
"error": 0
|
|
652
|
-
}
|
|
653
|
-
}, {
|
|
654
|
-
"time": 1765326600000,
|
|
655
|
-
"metric": {
|
|
656
|
-
"input": 0,
|
|
657
|
-
"output": 0,
|
|
658
|
-
"filter": 0,
|
|
659
|
-
"error": 0
|
|
660
|
-
}
|
|
661
|
-
}, {
|
|
662
|
-
"time": 1765328400000,
|
|
663
|
-
"metric": {
|
|
664
|
-
"input": 32,
|
|
665
|
-
"output": 32,
|
|
666
|
-
"filter": 0,
|
|
667
|
-
"error": 0
|
|
668
|
-
}
|
|
669
|
-
}, {
|
|
670
|
-
"time": 1765330200000,
|
|
671
|
-
"metric": {
|
|
672
|
-
"input": 0,
|
|
673
|
-
"output": 0,
|
|
674
|
-
"filter": 0,
|
|
675
|
-
"error": 0
|
|
676
|
-
}
|
|
677
|
-
}, {
|
|
678
|
-
"time": 1765332000000,
|
|
679
|
-
"metric": {
|
|
680
|
-
"input": 0,
|
|
681
|
-
"output": 0,
|
|
682
|
-
"filter": 0,
|
|
683
|
-
"error": 0
|
|
684
|
-
}
|
|
685
|
-
}, {
|
|
686
|
-
"time": 1765333800000,
|
|
687
|
-
"metric": {
|
|
688
|
-
"input": 0,
|
|
689
|
-
"output": 0,
|
|
690
|
-
"filter": 0,
|
|
691
|
-
"error": 0
|
|
692
|
-
}
|
|
693
|
-
}, {
|
|
694
|
-
"time": 1765335600000,
|
|
695
|
-
"metric": {
|
|
696
|
-
"input": 0,
|
|
697
|
-
"output": 0,
|
|
698
|
-
"filter": 0,
|
|
699
|
-
"error": 0
|
|
700
|
-
}
|
|
701
|
-
}, {
|
|
702
|
-
"time": 1765337400000,
|
|
703
|
-
"metric": {
|
|
704
|
-
"input": 0,
|
|
705
|
-
"output": 0,
|
|
706
|
-
"filter": 0,
|
|
707
|
-
"error": 0
|
|
708
|
-
}
|
|
709
|
-
}, {
|
|
710
|
-
"time": 1765339200000,
|
|
711
|
-
"metric": {
|
|
712
|
-
"input": 0,
|
|
713
|
-
"output": 0,
|
|
714
|
-
"filter": 0,
|
|
715
|
-
"error": 0
|
|
716
|
-
}
|
|
717
|
-
}, {
|
|
718
|
-
"time": 1765341000000,
|
|
719
|
-
"metric": {
|
|
720
|
-
"input": 2,
|
|
721
|
-
"output": 2,
|
|
722
|
-
"filter": 0,
|
|
723
|
-
"error": 0
|
|
724
|
-
}
|
|
725
|
-
}, {
|
|
726
|
-
"time": 1765342800000,
|
|
727
|
-
"metric": {
|
|
728
|
-
"input": 0,
|
|
729
|
-
"output": 0,
|
|
730
|
-
"filter": 0,
|
|
731
|
-
"error": 0
|
|
732
|
-
}
|
|
733
|
-
}, {
|
|
734
|
-
"time": 1765344600000,
|
|
735
|
-
"metric": {
|
|
736
|
-
"input": 0,
|
|
737
|
-
"output": 0,
|
|
738
|
-
"filter": 0,
|
|
739
|
-
"error": 0
|
|
740
|
-
}
|
|
741
|
-
}, {
|
|
742
|
-
"time": 1765346400000,
|
|
743
|
-
"metric": {
|
|
744
|
-
"input": 0,
|
|
745
|
-
"output": 0,
|
|
746
|
-
"filter": 0,
|
|
747
|
-
"error": 0
|
|
748
|
-
}
|
|
749
|
-
}, {
|
|
750
|
-
"time": 1765348200000,
|
|
751
|
-
"metric": {
|
|
752
|
-
"input": 3,
|
|
753
|
-
"output": 3,
|
|
754
|
-
"filter": 0,
|
|
755
|
-
"error": 0
|
|
756
|
-
}
|
|
757
|
-
}, {
|
|
758
|
-
"time": 1765350000000,
|
|
759
|
-
"metric": {
|
|
760
|
-
"input": 0,
|
|
761
|
-
"output": 0,
|
|
762
|
-
"filter": 0,
|
|
763
|
-
"error": 0
|
|
764
|
-
}
|
|
765
|
-
}, {
|
|
766
|
-
"time": 1765351800000,
|
|
767
|
-
"metric": {
|
|
768
|
-
"input": 144,
|
|
769
|
-
"output": 144,
|
|
770
|
-
"filter": 0,
|
|
771
|
-
"error": 0
|
|
772
|
-
}
|
|
773
|
-
}, {
|
|
774
|
-
"time": 1765353600000,
|
|
775
|
-
"metric": {
|
|
776
|
-
"input": 240,
|
|
777
|
-
"output": 240,
|
|
778
|
-
"filter": 0,
|
|
779
|
-
"error": 0
|
|
780
|
-
}
|
|
781
|
-
}, {
|
|
782
|
-
"time": 1765355400000,
|
|
783
|
-
"metric": {
|
|
784
|
-
"input": 451,
|
|
785
|
-
"output": 451,
|
|
786
|
-
"filter": 0,
|
|
787
|
-
"error": 0
|
|
788
|
-
}
|
|
789
|
-
}, {
|
|
790
|
-
"time": 1765357200000,
|
|
791
|
-
"metric": {
|
|
792
|
-
"input": 559,
|
|
793
|
-
"output": 559,
|
|
794
|
-
"filter": 0,
|
|
795
|
-
"error": 0
|
|
796
|
-
}
|
|
797
|
-
}, {
|
|
798
|
-
"time": 1765359000000,
|
|
799
|
-
"metric": {
|
|
800
|
-
"input": 88,
|
|
801
|
-
"output": 88,
|
|
802
|
-
"filter": 0,
|
|
803
|
-
"error": 0
|
|
804
|
-
}
|
|
805
|
-
}, {
|
|
806
|
-
"time": 1765360800000,
|
|
807
|
-
"metric": {
|
|
808
|
-
"input": 26,
|
|
809
|
-
"output": 26,
|
|
810
|
-
"filter": 0,
|
|
811
|
-
"error": 0
|
|
812
|
-
}
|
|
813
|
-
}, {
|
|
814
|
-
"time": 1765362600000,
|
|
815
|
-
"metric": {
|
|
816
|
-
"input": 112,
|
|
817
|
-
"output": 112,
|
|
818
|
-
"filter": 0,
|
|
819
|
-
"error": 0
|
|
820
|
-
}
|
|
821
|
-
}, {
|
|
822
|
-
"time": 1765364400000,
|
|
823
|
-
"metric": {
|
|
824
|
-
"input": 86,
|
|
825
|
-
"output": 86,
|
|
826
|
-
"filter": 0,
|
|
827
|
-
"error": 0
|
|
828
|
-
}
|
|
829
|
-
}, {
|
|
830
|
-
"time": 1765366200000,
|
|
831
|
-
"metric": {
|
|
832
|
-
"input": 568,
|
|
833
|
-
"output": 568,
|
|
834
|
-
"filter": 0,
|
|
835
|
-
"error": 0
|
|
836
|
-
}
|
|
837
|
-
}, {
|
|
838
|
-
"time": 1765368000000,
|
|
839
|
-
"metric": {
|
|
840
|
-
"input": 623,
|
|
841
|
-
"output": 623,
|
|
842
|
-
"filter": 0,
|
|
843
|
-
"error": 0
|
|
844
|
-
}
|
|
845
|
-
}, {
|
|
846
|
-
"time": 1765369800000,
|
|
847
|
-
"metric": {
|
|
848
|
-
"input": 593,
|
|
849
|
-
"output": 593,
|
|
850
|
-
"filter": 0,
|
|
851
|
-
"error": 0
|
|
852
|
-
}
|
|
853
|
-
}, {
|
|
854
|
-
"time": 1765371600000,
|
|
855
|
-
"metric": {
|
|
856
|
-
"input": 415,
|
|
857
|
-
"output": 415,
|
|
858
|
-
"filter": 0,
|
|
859
|
-
"error": 0
|
|
860
|
-
}
|
|
861
|
-
}, {
|
|
862
|
-
"time": 1765373400000,
|
|
863
|
-
"metric": {
|
|
864
|
-
"input": 449,
|
|
865
|
-
"output": 449,
|
|
866
|
-
"filter": 0,
|
|
867
|
-
"error": 0
|
|
868
|
-
}
|
|
869
|
-
}, {
|
|
870
|
-
"time": 1765375200000,
|
|
871
|
-
"metric": {
|
|
872
|
-
"input": 168,
|
|
873
|
-
"output": 168,
|
|
874
|
-
"filter": 0,
|
|
875
|
-
"error": 0
|
|
876
|
-
}
|
|
877
|
-
}, {
|
|
878
|
-
"time": 1765377000000,
|
|
879
|
-
"metric": {
|
|
880
|
-
"input": 150,
|
|
881
|
-
"output": 150,
|
|
882
|
-
"filter": 0,
|
|
883
|
-
"error": 0
|
|
884
|
-
}
|
|
885
|
-
}],
|
|
886
|
-
"queryTimestamp": "2025-12-11 13:07:30",
|
|
887
|
-
"cacheValidUntil": "2025-12-11 13:08:30"
|
|
888
|
-
}
|
|
889
|
-
};
|
|
890
|
-
const mockConvertTrend2 = {
|
|
891
|
-
"type": "tool",
|
|
892
|
-
"name": "query-trend-by-task-id",
|
|
893
|
-
"arguments": {
|
|
894
|
-
"taskId": "wc_convert_1",
|
|
895
|
-
"from": "20251211",
|
|
896
|
-
"to": "20251211",
|
|
897
|
-
"unit": "30"
|
|
898
|
-
},
|
|
899
|
-
"result": {
|
|
900
|
-
"code": "SUCCESS",
|
|
901
|
-
"message": "",
|
|
902
|
-
"result": [{
|
|
903
|
-
"time": 1765378800000,
|
|
904
|
-
"metric": {
|
|
905
|
-
"input": 188,
|
|
906
|
-
"output": 188,
|
|
907
|
-
"filter": 0,
|
|
908
|
-
"error": 0
|
|
909
|
-
}
|
|
910
|
-
}, {
|
|
911
|
-
"time": 1765380600000,
|
|
912
|
-
"metric": {
|
|
913
|
-
"input": 154,
|
|
914
|
-
"output": 154,
|
|
915
|
-
"filter": 0,
|
|
916
|
-
"error": 0
|
|
917
|
-
}
|
|
918
|
-
}, {
|
|
919
|
-
"time": 1765382400000,
|
|
920
|
-
"metric": {
|
|
921
|
-
"input": 155,
|
|
922
|
-
"output": 155,
|
|
923
|
-
"filter": 0,
|
|
924
|
-
"error": 0
|
|
925
|
-
}
|
|
926
|
-
}, {
|
|
927
|
-
"time": 1765384200000,
|
|
928
|
-
"metric": {
|
|
929
|
-
"input": 157,
|
|
930
|
-
"output": 157,
|
|
931
|
-
"filter": 0,
|
|
932
|
-
"error": 0
|
|
933
|
-
}
|
|
934
|
-
}, {
|
|
935
|
-
"time": 1765386000000,
|
|
936
|
-
"metric": {
|
|
937
|
-
"input": 184,
|
|
938
|
-
"output": 184,
|
|
939
|
-
"filter": 0,
|
|
940
|
-
"error": 0
|
|
941
|
-
}
|
|
942
|
-
}, {
|
|
943
|
-
"time": 1765387800000,
|
|
944
|
-
"metric": {
|
|
945
|
-
"input": 149,
|
|
946
|
-
"output": 149,
|
|
947
|
-
"filter": 0,
|
|
948
|
-
"error": 0
|
|
949
|
-
}
|
|
950
|
-
}, {
|
|
951
|
-
"time": 1765389600000,
|
|
952
|
-
"metric": {
|
|
953
|
-
"input": 145,
|
|
954
|
-
"output": 145,
|
|
955
|
-
"filter": 0,
|
|
956
|
-
"error": 0
|
|
957
|
-
}
|
|
958
|
-
}, {
|
|
959
|
-
"time": 1765391400000,
|
|
960
|
-
"metric": {
|
|
961
|
-
"input": 145,
|
|
962
|
-
"output": 145,
|
|
963
|
-
"filter": 0,
|
|
964
|
-
"error": 0
|
|
965
|
-
}
|
|
966
|
-
}, {
|
|
967
|
-
"time": 1765393200000,
|
|
968
|
-
"metric": {
|
|
969
|
-
"input": 157,
|
|
970
|
-
"output": 157,
|
|
971
|
-
"filter": 0,
|
|
972
|
-
"error": 0
|
|
973
|
-
}
|
|
974
|
-
}, {
|
|
975
|
-
"time": 1765395000000,
|
|
976
|
-
"metric": {
|
|
977
|
-
"input": 150,
|
|
978
|
-
"output": 150,
|
|
979
|
-
"filter": 0,
|
|
980
|
-
"error": 0
|
|
981
|
-
}
|
|
982
|
-
}, {
|
|
983
|
-
"time": 1765396800000,
|
|
984
|
-
"metric": {
|
|
985
|
-
"input": 186,
|
|
986
|
-
"output": 186,
|
|
987
|
-
"filter": 0,
|
|
988
|
-
"error": 0
|
|
989
|
-
}
|
|
990
|
-
}, {
|
|
991
|
-
"time": 1765398600000,
|
|
992
|
-
"metric": {
|
|
993
|
-
"input": 162,
|
|
994
|
-
"output": 162,
|
|
995
|
-
"filter": 0,
|
|
996
|
-
"error": 0
|
|
997
|
-
}
|
|
998
|
-
}, {
|
|
999
|
-
"time": 1765400400000,
|
|
1000
|
-
"metric": {
|
|
1001
|
-
"input": 80,
|
|
1002
|
-
"output": 80,
|
|
1003
|
-
"filter": 0,
|
|
1004
|
-
"error": 0
|
|
1005
|
-
}
|
|
1006
|
-
}, {
|
|
1007
|
-
"time": 1765402200000,
|
|
1008
|
-
"metric": {
|
|
1009
|
-
"input": 264,
|
|
1010
|
-
"output": 264,
|
|
1011
|
-
"filter": 0,
|
|
1012
|
-
"error": 0
|
|
1013
|
-
}
|
|
1014
|
-
}, {
|
|
1015
|
-
"time": 1765404000000,
|
|
1016
|
-
"metric": {
|
|
1017
|
-
"input": 314,
|
|
1018
|
-
"output": 314,
|
|
1019
|
-
"filter": 0,
|
|
1020
|
-
"error": 0
|
|
1021
|
-
}
|
|
1022
|
-
}, {
|
|
1023
|
-
"time": 1765405800000,
|
|
1024
|
-
"metric": {
|
|
1025
|
-
"input": 147,
|
|
1026
|
-
"output": 147,
|
|
1027
|
-
"filter": 0,
|
|
1028
|
-
"error": 0
|
|
1029
|
-
}
|
|
1030
|
-
}, {
|
|
1031
|
-
"time": 1765407600000,
|
|
1032
|
-
"metric": {
|
|
1033
|
-
"input": 183,
|
|
1034
|
-
"output": 183,
|
|
1035
|
-
"filter": 0,
|
|
1036
|
-
"error": 0
|
|
1037
|
-
}
|
|
1038
|
-
}, {
|
|
1039
|
-
"time": 1765409400000,
|
|
1040
|
-
"metric": {
|
|
1041
|
-
"input": 79,
|
|
1042
|
-
"output": 79,
|
|
1043
|
-
"filter": 0,
|
|
1044
|
-
"error": 0
|
|
1045
|
-
}
|
|
1046
|
-
}, {
|
|
1047
|
-
"time": 1765411200000,
|
|
1048
|
-
"metric": {
|
|
1049
|
-
"input": 1728,
|
|
1050
|
-
"output": 1728,
|
|
1051
|
-
"filter": 0,
|
|
1052
|
-
"error": 0
|
|
1053
|
-
}
|
|
1054
|
-
}, {
|
|
1055
|
-
"time": 1765413000000,
|
|
1056
|
-
"metric": {
|
|
1057
|
-
"input": 5,
|
|
1058
|
-
"output": 5,
|
|
1059
|
-
"filter": 0,
|
|
1060
|
-
"error": 0
|
|
1061
|
-
}
|
|
1062
|
-
}, {
|
|
1063
|
-
"time": 1765414800000,
|
|
1064
|
-
"metric": {
|
|
1065
|
-
"input": 8,
|
|
1066
|
-
"output": 8,
|
|
1067
|
-
"filter": 0,
|
|
1068
|
-
"error": 0
|
|
1069
|
-
}
|
|
1070
|
-
}, {
|
|
1071
|
-
"time": 1765416600000,
|
|
1072
|
-
"metric": {
|
|
1073
|
-
"input": 17,
|
|
1074
|
-
"output": 17,
|
|
1075
|
-
"filter": 0,
|
|
1076
|
-
"error": 0
|
|
1077
|
-
}
|
|
1078
|
-
}, {
|
|
1079
|
-
"time": 1765418400000,
|
|
1080
|
-
"metric": {
|
|
1081
|
-
"input": 2,
|
|
1082
|
-
"output": 2,
|
|
1083
|
-
"filter": 0,
|
|
1084
|
-
"error": 0
|
|
1085
|
-
}
|
|
1086
|
-
}, {
|
|
1087
|
-
"time": 1765420200000,
|
|
1088
|
-
"metric": {
|
|
1089
|
-
"input": 0,
|
|
1090
|
-
"output": 0,
|
|
1091
|
-
"filter": 0,
|
|
1092
|
-
"error": 0
|
|
1093
|
-
}
|
|
1094
|
-
}, {
|
|
1095
|
-
"time": 1765422000000,
|
|
1096
|
-
"metric": {
|
|
1097
|
-
"input": 0,
|
|
1098
|
-
"output": 0,
|
|
1099
|
-
"filter": 0,
|
|
1100
|
-
"error": 0
|
|
1101
|
-
}
|
|
1102
|
-
}, {
|
|
1103
|
-
"time": 1765423800000,
|
|
1104
|
-
"metric": {
|
|
1105
|
-
"input": 0,
|
|
1106
|
-
"output": 0,
|
|
1107
|
-
"filter": 0,
|
|
1108
|
-
"error": 0
|
|
1109
|
-
}
|
|
1110
|
-
}, {
|
|
1111
|
-
"time": 1765425600000,
|
|
1112
|
-
"metric": {
|
|
1113
|
-
"input": 0,
|
|
1114
|
-
"output": 0,
|
|
1115
|
-
"filter": 0,
|
|
1116
|
-
"error": 0
|
|
1117
|
-
}
|
|
1118
|
-
}],
|
|
1119
|
-
"queryTimestamp": "2025-12-11 13:07:30",
|
|
1120
|
-
"cacheValidUntil": "2025-12-11 13:08:30"
|
|
1121
|
-
}
|
|
1122
|
-
};
|
|
1123
|
-
const sampleTable = {
|
|
1124
|
-
"type": "text",
|
|
1125
|
-
"value": "현재 등록된 컨테이너 목록은 아래와 같습니다 👇 \n\n| ID | 유형 | 이름 | URL | 활성화 여부 |\n|----|------|------|------|--------------|\n| 00001 | WEB | 와이즈컬렉터3 | [https://wc.nethru.co.kr](https://wc.nethru.co.kr) | ✅ 활성 |\n| 00003 | WEB | 넷스루 홈페이지 | [http://www.nethru.co.kr](http://www.nethru.co.kr) | ✅ 활성 |\n| 00004 | WEB | WC몰 | [https://wcmall.nethru.co.kr](https://wcmall.nethru.co.kr) | ✅ 활성 |\n| 00005 | WEB | Google Arts & Culture | [https://artsandculture.google.com](https://artsandculture.google.com) | ✅ 활성 |\n| 00006 | MOBILE | OmniNotes | [https://www.omnintes.com](https://www.omnintes.com) | ✅ 활성 |\n| 00007 | MOBILE | Plaid | [https://www.plaid.com](https://www.plaid.com) | ✅ 활성 |\n| 00008 | MOBILE | 안드로이드 샘플앱 | [http://www.androidtest.com](http://www.androidtest.com) | ✅ 활성 |\n| 00009 | MOBILE | 엄니노트 | [https://www.omnintes.com](https://www.omnintes.com) | ✅ 활성 |\n| 00026 | WEB | 신수민티스토리 | [https://nethoomru.tistory.com](https://nethoomru.tistory.com) | ✅ 활성 |\n| 00710 | WEB | solmin_test2 | [https://wc-solmin.tistory.com](https://wc-solmin.tistory.com) | ✅ 활성 |\n| 00711 | MOBILE | KB Pay | [https://kbpay.kbcard.com](https://kbpay.kbcard.com) | ✅ 활성 |\n| 00712 | MOBILE | OmniNotes2 | [https://www.omnintes.com](https://www.omnintes.com) | ✅ 활성 |\n| 00715 | WEB | test2 | [https://wc-solmin.tistory.com](https://wc-solmin.tistory.com) | ❌ 비활성 |\n| 00718 | MOBILE | iOS 샘플앱 | [http://www.iostest.com](http://www.iostest.com) | ✅ 활성 |\n| 00742 | MOBILE | 모바일 샘플앱 250903 (iOS 테스트 임시) | [http://www.androidtest.com](http://www.androidtest.com) | ✅ 활성 |\n| 00743 | MOBILE | 요기요 | [https://www.yogiyo.co.kr](https://www.yogiyo.co.kr) | ✅ 활성 |\n| 00744 | MOBILE | 사내 TFT 예제 - KBPay | [https://www.tftex1.co.kr](https://www.tftex1.co.kr) | ✅ 활성 |\n| 00745 | MOBILE | OmniNotes-soomsoom | [https://www.omnintes.com](https://www.omnintes.com) | ✅ 활성 |\n| 00746 | MOBILE | 믿고걸_뉴스 | [http://www.worthskippingnews.com](http://www.worthskippingnews.com) | ✅ 활성 |\n| 00747 | WEB | KB 은행 | [https://www.kbstar.com](https://www.kbstar.com) | ✅ 활성 |\n| 00748 | MOBILE | test251127 | [http://www.test251127.com](http://www.test251127.com) | ❌ 비활성 |\n| 00764 | MOBILE | test749 | [http://w.a.com](http://w.a.com) | ❌ 비활성 |\n| 00765 | MOBILE | test750 | [http://www.test.com](http://www.test.com) | ❌ 비활성 |\n\n총 **24개 컨테이너**가 등록되어 있으며, 이 중 **18개는 활성화**, **6개는 비활성화** 상태입니다. \n\n특정 컨테이너(예: “KB Pay”나 “와이즈컬렉터3”)의 **태스크 목록이나 설정 세부 정보**를 보고 싶으신가요?"
|
|
1126
|
-
};
|
|
1127
|
-
const sampleMarkdowns = {
|
|
1128
|
-
type: "text",
|
|
1129
|
-
value: "# Hello\n" + "https://example.org\n" + "```sh\n" + "# Code block\n" + "const func = () => {};\n" + "```\n" + "\n" + "\n" + "~~strike~~ this\n" + "\n" + "[MIT](license) © [Titus Wormer](https://wooorm.com)\n" + "## TODO\n" + "\n" + "* [ ] This\n" + "* [ ] That\n" + "* [x] The other\n" + "\n" + "|Fahrenheit|Celsius|Kelvin|\n" + "|---:|---:|---:|\n" + "|-459.67|-273.15|0|\n" + "|-40|-40|233.15|\n" + "|32|0|273.15|\n" + "|212|100|373.15|\n"
|
|
1130
|
-
};
|
|
1131
|
-
export const defaultMessages = [{
|
|
1132
|
-
role: 'assistant',
|
|
1133
|
-
// kinds: [],
|
|
1134
|
-
kinds: ['COMPARE'],
|
|
1135
|
-
content: [
|
|
1136
|
-
// mockCollectSummary1,
|
|
1137
|
-
// mockConvertSummary1,
|
|
1138
|
-
// mockConvertSummary2,
|
|
1139
|
-
|
|
1140
|
-
// PeriodCompareChart
|
|
1141
|
-
mockPrevTrend, mockCurrentTrend,
|
|
1142
|
-
// StackedAreadTrendChart
|
|
1143
|
-
// mockConvertTrend1,
|
|
1144
|
-
// mockConvertTrend1,
|
|
1145
|
-
|
|
1146
|
-
mockSearchContainerByKeyword, mockSearchTaskByKeyword,
|
|
1147
|
-
// sampleTable,
|
|
1148
|
-
// sampleMarkdowns,
|
|
1149
|
-
{
|
|
1150
|
-
type: 'text',
|
|
1151
|
-
value: '안녕하세요! 저는 회사 내부 정보와 다양한 기능에 접근할 수 있는 AI 어시스턴트입니다.\n무엇을 도와드릴까요?'
|
|
1152
|
-
}]
|
|
1153
|
-
}];
|
package/dist/js/promptIntent.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export function isPageAnalysisIntent(userPrompt) {
|
|
2
|
-
if (!userPrompt || userPrompt.trim() === "") return false;
|
|
3
|
-
const analysisKeywords = ["요약", "정리", "분석", "설명", "페이지", "화면", "글", "기사", "문서", "내용", "포스트", "블로그", "뭐야", "뭔가", "무엇", "어떤", "핵심", "주요", "포인트", "요점", "이", "현재", "지금", "여기", "summarize", "summary", "analyze", "analysis", "explain", "this page", "current page", "this article", "this post"];
|
|
4
|
-
const excludeKeywords = ["http://", "https://", "www.", "날씨", "weather", "뉴스", "news", "코드", "code", "프로그램", "program"];
|
|
5
|
-
const prompt = userPrompt.toLowerCase();
|
|
6
|
-
|
|
7
|
-
// 제외 키워드 포함 시, "이 페이지" 패턴만 예외 허용
|
|
8
|
-
if (excludeKeywords.some(k => prompt.includes(k))) {
|
|
9
|
-
if (!(prompt.includes("이") && prompt.includes("페이지"))) {
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
const matchedKeywords = analysisKeywords.filter(k => prompt.includes(k));
|
|
14
|
-
|
|
15
|
-
// 최소 2개 이상의 키워드 매칭
|
|
16
|
-
if (matchedKeywords.length >= 2) return true;
|
|
17
|
-
|
|
18
|
-
// 단일 키워드지만 강한 패턴
|
|
19
|
-
const strongPatterns = ["요약해", "정리해", "분석해", "설명해", "요약 해", "정리 해", "분석 해", "설명 해", "페이지 요약", "페이지 정리", "페이지 분석", "summarize this", "analyze this", "explain this"];
|
|
20
|
-
if (strongPatterns.some(p => prompt.includes(p))) return true;
|
|
21
|
-
return false;
|
|
22
|
-
}
|