st-comp 0.0.273 → 0.0.275
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/es/ChartLayout.js +4 -4
- package/es/CustomFunction.cjs +1 -1
- package/es/CustomFunction.js +70 -71
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +35 -36
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +19 -20
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +28 -29
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +49 -50
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +18 -19
- package/es/KlinePlus.cjs +1 -1
- package/es/KlinePlus.js +21 -22
- package/es/MonacoEditor.cjs +1 -1
- package/es/MonacoEditor.js +26 -27
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +76 -77
- package/es/PasswordPrompt.js +3 -3
- package/es/Table.cjs +1 -1
- package/es/Table.js +37 -38
- package/es/User.cjs +1 -1
- package/es/User.js +141 -142
- package/es/VarSelectDialog.cjs +1 -1
- package/es/VarSelectDialog.js +27 -28
- package/es/VarietyAiHelper.cjs +4 -4
- package/es/VarietyAiHelper.js +472 -473
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +12 -13
- package/es/VarietySearch.cjs +9 -9
- package/es/VarietySearch.js +323 -298
- package/es/{VarietySelect-7da473c5.cjs → VarietySelect-610903f0.cjs} +1 -1
- package/es/{VarietySelect-b01281d3.js → VarietySelect-6a166293.js} +4 -4
- package/es/VarietyTextCopy.cjs +1 -1
- package/es/VarietyTextCopy.js +22 -23
- package/es/VirtualTable.js +14 -14
- package/es/{_initCloneObject-6243b839.js → _initCloneObject-152b4f4e.js} +3 -3
- package/es/aiTools-0c653fa6.js +113 -0
- package/es/aiTools-336e4de3.cjs +2 -0
- package/es/aiTools.js +8 -2
- package/es/{base-29f73b05.js → base-a5af3db3.js} +2 -2
- package/es/{castArray-609a313e.js → castArray-7741a212.js} +1 -1
- package/es/{config-provider-20b05e99.js → config-provider-7a3aca55.js} +4 -4
- package/es/{debounce-a09ce9a3.js → debounce-8d53f4dd.js} +1 -1
- package/es/{dropdown-f8d9fe56.js → dropdown-01e09205.js} +19 -20
- package/es/dropdown-987c47fb.cjs +1 -0
- package/es/el-autocomplete-16f66b34.cjs +1 -0
- package/es/{el-autocomplete-3f34a1c3.js → el-autocomplete-342ae823.js} +17 -18
- package/es/{el-button-cd144ee1.js → el-button-314171a0.js} +4 -4
- package/es/{el-checkbox-d6c883f4.js → el-checkbox-5899681f.js} +4 -4
- package/es/el-checkbox-bdf64663.cjs +1 -0
- package/es/el-dialog-0ef95df6.cjs +1 -0
- package/es/{el-dialog-59a23c2b.js → el-dialog-86a3eec2.js} +6 -6
- package/es/{el-divider-523e5874.js → el-divider-4e059794.js} +1 -1
- package/es/{el-empty-f5a1607a.js → el-empty-33cb66f1.js} +3 -3
- package/es/{el-form-item-3475aaad.cjs → el-form-item-77ef6784.cjs} +1 -1
- package/es/{el-form-item-a9556441.js → el-form-item-cda4d93c.js} +8 -8
- package/es/el-input-89222943.cjs +1 -0
- package/es/{el-input-1f14a6e2.js → el-input-fa1445ad.js} +14 -14
- package/es/{el-input-number-411ac93d.js → el-input-number-8f6dbf74.js} +6 -6
- package/es/el-input-number-d3338e5e.cjs +1 -0
- package/es/{el-loading-cbeb3b86.js → el-loading-9b671203.js} +2 -2
- package/es/el-menu-item-4531fd0e.cjs +1 -0
- package/es/{el-menu-item-77152904.js → el-menu-item-535fef90.js} +17 -18
- package/es/{el-message-box-a26e3ed4.js → el-message-box-621ed2f1.js} +11 -11
- package/es/el-message-box-f5717070.cjs +1 -0
- package/es/el-overlay-151708cb.cjs +1 -0
- package/es/{el-overlay-465cd11e.js → el-overlay-23de4324.js} +19 -19
- package/es/el-popconfirm-b8aa490e.cjs +1 -0
- package/es/{el-popconfirm-289b3e89.js → el-popconfirm-bcff0aa5.js} +20 -21
- package/es/el-popper-03988662.js +2094 -0
- package/es/el-popper-43ec37f4.cjs +1 -0
- package/es/el-segmented-79a1367c.cjs +1 -0
- package/es/{el-segmented-598b92b0.js → el-segmented-db3a86be.js} +4 -4
- package/es/{el-select-d47b5923.js → el-select-4bd0010d.js} +43 -44
- package/es/el-select-ec04e7ce.cjs +1 -0
- package/es/el-table-column-35e47229.cjs +14 -0
- package/es/{el-table-column-f1017e75.js → el-table-column-7af2bec7.js} +24 -25
- package/es/el-tag-5d5608e0.cjs +1 -0
- package/es/{el-tag-0a4197f5.js → el-tag-bef9e83d.js} +13 -13
- package/es/{el-text-c3ee80fe.js → el-text-f998902c.js} +2 -2
- package/es/{index-67180968.js → index-102edf6c.js} +3 -3
- package/es/{index-0ff5fe69.cjs → index-2d7ac156.cjs} +2 -2
- package/es/{index-1b97095f.js → index-5c44d71a.js} +1 -1
- package/es/{index-d3e9a6f2.js → index-5ed42e9c.js} +11 -11
- package/es/{index-3301d870.js → index-6290ae0f.js} +3 -3
- package/es/{index-a17c90c5.js → index-936e7dec.js} +2 -2
- package/es/{index-8391a3df.js → index-960806da.js} +3 -3
- package/es/index-a00e0534.cjs +1 -0
- package/es/{index-33430c9f.js → index-a83ec4b7.js} +3 -3
- package/es/index-c58e90e9.cjs +1 -0
- package/es/{index-499cf989.js → index-ce21e2ce.js} +17 -17
- package/es/index-cfd00899.cjs +1 -0
- package/es/{index-afc4a1e5.js → index-d1b554ac.js} +3 -3
- package/es/{index-de24705f.js → index-d77a7336.js} +1 -1
- package/es/{index-3ed7914e.cjs → index-db846633.cjs} +1 -1
- package/es/{index-89cc0265.js → index-f3f6ee27.js} +10 -10
- package/es/{python-c00abcbd.js → python-6cc6ec1b.js} +28 -29
- package/es/{python-e528f42b.cjs → python-71f59893.cjs} +1 -1
- package/es/{raf-744cf95a.js → raf-80ef0c0a.js} +1 -1
- package/es/{scroll-6799bafc.js → scroll-679bd6bf.js} +1 -1
- package/es/style.css +1 -1
- package/es/{use-form-common-props-dd9617de.js → use-form-common-props-76a09d89.js} +28 -28
- package/es/{use-global-config-4dfc7236.js → use-global-config-0f43458b.js} +4 -4
- package/es/{validator-029bfc98.js → validator-0e037618.js} +1 -1
- package/es/{vnode-a83e6de8.js → vnode-5ddb7ed1.js} +1 -1
- package/es/{zh-cn-89e434f9.js → zh-cn-1227eb8a.js} +2 -2
- package/lib/aiTools.js +8 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +172 -172
- package/lib/{index-ae71be8d.js → index-298ca804.js} +14431 -14406
- package/lib/{python-74871600.js → python-4b8051bd.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/VarietyAiHelper/images/like.png +0 -0
- package/packages/VarietyAiHelper/images/like_no.png +0 -0
- package/packages/VarietyAiHelper/index.vue +342 -410
- package/packages/VarietySearch/config.js +25 -0
- package/packages/VarietySearch/index.vue +1 -1
- package/public/aiTools.js +8 -2
- package/es/aiTools-4412c56c.cjs +0 -2
- package/es/aiTools-e6e4e996.js +0 -111
- package/es/dropdown-33c19e56.cjs +0 -1
- package/es/el-autocomplete-525ca867.cjs +0 -1
- package/es/el-checkbox-95325acd.cjs +0 -1
- package/es/el-dialog-4056070b.cjs +0 -1
- package/es/el-input-c7bf8e44.cjs +0 -1
- package/es/el-input-number-9d810842.cjs +0 -1
- package/es/el-menu-item-18d7d869.cjs +0 -1
- package/es/el-message-box-e4b8cc99.cjs +0 -1
- package/es/el-overlay-d26a1b98.cjs +0 -1
- package/es/el-popconfirm-12f6f35c.cjs +0 -1
- package/es/el-popper-c7648df6.cjs +0 -1
- package/es/el-popper-f96fc206.js +0 -1662
- package/es/el-segmented-f0bce6f2.cjs +0 -1
- package/es/el-select-f3cc464f.cjs +0 -1
- package/es/el-table-column-220ae131.cjs +0 -14
- package/es/el-tag-51bd491c.cjs +0 -1
- package/es/index-09ce1753.cjs +0 -1
- package/es/index-4b95bae1.cjs +0 -1
- package/es/index-68798830.cjs +0 -1
- package/es/index-8e88a0bd.js +0 -440
- package/es/index-d2cfd4a3.cjs +0 -1
|
@@ -6,7 +6,6 @@ import { inject, ref, nextTick, watch, reactive, computed } from "vue";
|
|
|
6
6
|
import { sendToNodeVarietyAiHelper } from "../../public/aiTools";
|
|
7
7
|
import { UserFilled, Service, Promotion, Refresh, SuccessFilled } from "@element-plus/icons-vue";
|
|
8
8
|
|
|
9
|
-
// ==================== 基础配置 ====================
|
|
10
9
|
const stConfig = inject("stConfig");
|
|
11
10
|
const userData = reactive(getUserData());
|
|
12
11
|
const visible = ref(false);
|
|
@@ -19,137 +18,40 @@ const props = defineProps({
|
|
|
19
18
|
},
|
|
20
19
|
});
|
|
21
20
|
|
|
22
|
-
// ==================== 响应式数据 ====================
|
|
23
21
|
const isSending = ref(false);
|
|
24
22
|
const isThinking = ref(false);
|
|
25
|
-
const nodeProgressList = ref([]);
|
|
26
23
|
const showFinalResult = ref(false);
|
|
27
24
|
const messageListRef = ref(null);
|
|
28
25
|
const messageList = ref([
|
|
29
26
|
{
|
|
30
|
-
role: "
|
|
27
|
+
role: "defaultMessage", // defaultMessage-组件内置, assistant-智能体, user-用户
|
|
31
28
|
content: props.defaultMessage,
|
|
32
29
|
userContent: null,
|
|
33
30
|
showFeedback: false,
|
|
34
|
-
hasFeedback: false,
|
|
35
31
|
createTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
|
|
36
32
|
resTime: 0,
|
|
37
33
|
firstPackageTime: 0,
|
|
38
34
|
},
|
|
39
35
|
]);
|
|
40
|
-
|
|
36
|
+
const sessionId = ref(null);
|
|
41
37
|
const userInput = ref("");
|
|
38
|
+
|
|
39
|
+
// 反馈相关
|
|
42
40
|
const feedbackDialogVisible = ref(false);
|
|
43
41
|
const feedbackContent = ref("");
|
|
44
42
|
const feedbackMessageIndex = ref({});
|
|
45
43
|
|
|
46
|
-
//
|
|
47
|
-
const
|
|
44
|
+
// 节点相关
|
|
45
|
+
const nodeProgressList = ref([]);
|
|
48
46
|
const totalCount = computed(() => nodeProgressList.value.length);
|
|
47
|
+
const completedCount = computed(() => nodeProgressList.value.filter((n) => n.status === "success").length);
|
|
49
48
|
const progressPercent = computed(() => (totalCount.value ? (completedCount.value / totalCount.value) * 100 : 0));
|
|
50
49
|
const currentStepName = computed(() => {
|
|
51
50
|
const running = nodeProgressList.value.find((n) => n.status === "executing");
|
|
52
51
|
return running ? running.name : "处理中";
|
|
53
52
|
});
|
|
54
53
|
|
|
55
|
-
//
|
|
56
|
-
const isJSONSerializable = (str) => {
|
|
57
|
-
if (typeof str !== "string") return false;
|
|
58
|
-
try {
|
|
59
|
-
const parsed = JSON.parse(str);
|
|
60
|
-
return parsed !== null && typeof parsed === "object";
|
|
61
|
-
} catch {
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
const formatJSONContent = (content) => {
|
|
67
|
-
if (!isJSONSerializable(content)) return null;
|
|
68
|
-
try {
|
|
69
|
-
const jsonData = JSON.parse(content);
|
|
70
|
-
const { parsedConditions, ...webParams } = jsonData;
|
|
71
|
-
return { parsedConditions, webParams };
|
|
72
|
-
} catch {
|
|
73
|
-
return null;
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
const renderJSONContent = (jsonData) => {
|
|
78
|
-
if (!jsonData) return "";
|
|
79
|
-
let html = "";
|
|
80
|
-
if (jsonData.parsedConditions?.length) {
|
|
81
|
-
html += '<div class="parsed-conditions">';
|
|
82
|
-
jsonData.parsedConditions.forEach((text) => {
|
|
83
|
-
html += `<div class="parsed-conditions-item">${text}</div>`;
|
|
84
|
-
});
|
|
85
|
-
html += "</div>";
|
|
86
|
-
}
|
|
87
|
-
return html;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
// ==================== 反馈处理 ====================
|
|
91
|
-
const handleFeedbackAction = async (action, messageIndex) => {
|
|
92
|
-
switch (action) {
|
|
93
|
-
case "satisfied": {
|
|
94
|
-
const message = messageList.value[messageIndex];
|
|
95
|
-
await stConfig.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
|
|
96
|
-
userName: userData.username,
|
|
97
|
-
userContent: message.userContent,
|
|
98
|
-
aiContent: message.content,
|
|
99
|
-
type: 1,
|
|
100
|
-
createTime: message.createTime,
|
|
101
|
-
resTime: message.resTime,
|
|
102
|
-
firstPackageTime: message.firstPackageTime,
|
|
103
|
-
isSolved: 1,
|
|
104
|
-
logOrigin: 1,
|
|
105
|
-
});
|
|
106
|
-
ElMessage.success("感谢您的评价!");
|
|
107
|
-
messageList.value[messageIndex].hasFeedback = true;
|
|
108
|
-
break;
|
|
109
|
-
}
|
|
110
|
-
case "open": {
|
|
111
|
-
feedbackMessageIndex.value = messageIndex;
|
|
112
|
-
feedbackDialogVisible.value = true;
|
|
113
|
-
break;
|
|
114
|
-
}
|
|
115
|
-
case "unsatisfied": {
|
|
116
|
-
const message = messageList.value[messageIndex];
|
|
117
|
-
await stConfig.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
|
|
118
|
-
userName: userData.username,
|
|
119
|
-
userContent: message.userContent,
|
|
120
|
-
userSuggestion: feedbackContent.value,
|
|
121
|
-
aiContent: message.content,
|
|
122
|
-
type: 2,
|
|
123
|
-
resTime: message.resTime,
|
|
124
|
-
createTime: message.createTime,
|
|
125
|
-
firstPackageTime: message.firstPackageTime,
|
|
126
|
-
isSolved: 0,
|
|
127
|
-
logOrigin: 1,
|
|
128
|
-
});
|
|
129
|
-
ElMessage.success("感谢您的反馈!我们将持续跟踪并进行优化");
|
|
130
|
-
feedbackDialogVisible.value = false;
|
|
131
|
-
messageList.value[messageIndex].hasFeedback = true;
|
|
132
|
-
break;
|
|
133
|
-
}
|
|
134
|
-
case "default": {
|
|
135
|
-
const message = messageList.value[messageIndex];
|
|
136
|
-
await stConfig.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
|
|
137
|
-
userName: userData.username,
|
|
138
|
-
userContent: message.userContent,
|
|
139
|
-
userSuggestion: feedbackContent.value,
|
|
140
|
-
aiContent: message.content,
|
|
141
|
-
type: null,
|
|
142
|
-
resTime: message.resTime,
|
|
143
|
-
createTime: message.createTime,
|
|
144
|
-
firstPackageTime: message.firstPackageTime,
|
|
145
|
-
isSolved: 1,
|
|
146
|
-
logOrigin: 1,
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
// ==================== 消息发送 ====================
|
|
54
|
+
// 发送消息
|
|
153
55
|
const sendMessage = async () => {
|
|
154
56
|
const content = userInput.value.trim();
|
|
155
57
|
if (!content) return ElMessage.warning("请输入消息内容");
|
|
@@ -171,7 +73,6 @@ const sendMessage = async () => {
|
|
|
171
73
|
content: "",
|
|
172
74
|
userContent: content,
|
|
173
75
|
showFeedback: false,
|
|
174
|
-
hasFeedback: false,
|
|
175
76
|
createTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
|
|
176
77
|
resTime: 0,
|
|
177
78
|
firstPackageTime: 0,
|
|
@@ -190,24 +91,10 @@ const sendMessage = async () => {
|
|
|
190
91
|
baseUrl: stConfig.env.VITE_BASE_URL,
|
|
191
92
|
token: getToken(),
|
|
192
93
|
value: content,
|
|
94
|
+
sessionId: sessionId.value,
|
|
193
95
|
callback: (type, data) => {
|
|
194
|
-
if (type === "
|
|
195
|
-
|
|
196
|
-
isSending.value = false;
|
|
197
|
-
messageList.value.pop();
|
|
198
|
-
messageList.value.push({
|
|
199
|
-
role: "assistant",
|
|
200
|
-
userContent: content,
|
|
201
|
-
content: `❌ ${data}`,
|
|
202
|
-
showFeedback: false,
|
|
203
|
-
hasFeedback: false,
|
|
204
|
-
createTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
|
|
205
|
-
resTime: new Date().getTime() - resTime,
|
|
206
|
-
firstPackageTime: 0,
|
|
207
|
-
});
|
|
208
|
-
handleFeedbackAction("default", messageList.value.length - 1);
|
|
209
|
-
scrollToBottom();
|
|
210
|
-
return;
|
|
96
|
+
if (type === "session") {
|
|
97
|
+
sessionId.value = data;
|
|
211
98
|
}
|
|
212
99
|
if (type === "node") {
|
|
213
100
|
if (!firstNodeReceived) {
|
|
@@ -246,16 +133,23 @@ const sendMessage = async () => {
|
|
|
246
133
|
lastMessage.resTime = new Date().getTime() - resTime;
|
|
247
134
|
handleFeedbackAction("default", messageList.value.length - 1);
|
|
248
135
|
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
136
|
+
}
|
|
137
|
+
if (type === "error") {
|
|
138
|
+
isThinking.value = false;
|
|
139
|
+
isSending.value = false;
|
|
140
|
+
messageList.value.pop();
|
|
141
|
+
messageList.value.push({
|
|
142
|
+
role: "assistant",
|
|
143
|
+
userContent: content,
|
|
144
|
+
content: `❌ ${data}`,
|
|
145
|
+
showFeedback: false,
|
|
146
|
+
createTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
|
|
147
|
+
resTime: new Date().getTime() - resTime,
|
|
148
|
+
firstPackageTime: 0,
|
|
149
|
+
});
|
|
150
|
+
handleFeedbackAction("default", messageList.value.length - 1);
|
|
151
|
+
scrollToBottom();
|
|
152
|
+
return;
|
|
259
153
|
}
|
|
260
154
|
},
|
|
261
155
|
});
|
|
@@ -267,7 +161,6 @@ const sendMessage = async () => {
|
|
|
267
161
|
userContent: content,
|
|
268
162
|
content: "❌ 抱歉,AI服务响应异常,请稍后重试。",
|
|
269
163
|
showFeedback: true,
|
|
270
|
-
hasFeedback: false,
|
|
271
164
|
createTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
|
|
272
165
|
resTime: new Date().getTime() - resTime,
|
|
273
166
|
firstPackageTime: 0,
|
|
@@ -278,8 +171,74 @@ const sendMessage = async () => {
|
|
|
278
171
|
isThinking.value = false;
|
|
279
172
|
}
|
|
280
173
|
};
|
|
281
|
-
|
|
282
|
-
|
|
174
|
+
// 查看结果
|
|
175
|
+
const lookResult = (content) => {
|
|
176
|
+
const { parsedConditions, ...webParams } = JSON.parse(content);
|
|
177
|
+
console.log({ parsedConditions, webParams });
|
|
178
|
+
emit("callBack", webParams);
|
|
179
|
+
};
|
|
180
|
+
// 用户反馈
|
|
181
|
+
const handleFeedbackAction = async (action, messageIndex) => {
|
|
182
|
+
switch (action) {
|
|
183
|
+
case "satisfied": {
|
|
184
|
+
const message = messageList.value[messageIndex];
|
|
185
|
+
await stConfig.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
|
|
186
|
+
userName: userData.username,
|
|
187
|
+
userContent: message.userContent,
|
|
188
|
+
aiContent: message.content,
|
|
189
|
+
type: 1,
|
|
190
|
+
createTime: message.createTime,
|
|
191
|
+
resTime: message.resTime,
|
|
192
|
+
firstPackageTime: message.firstPackageTime,
|
|
193
|
+
isSolved: 1,
|
|
194
|
+
logOrigin: 1,
|
|
195
|
+
});
|
|
196
|
+
ElMessage.success("感谢您的评价!");
|
|
197
|
+
messageList.value[messageIndex].showFeedback = false;
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
case "open": {
|
|
201
|
+
feedbackMessageIndex.value = messageIndex;
|
|
202
|
+
feedbackDialogVisible.value = true;
|
|
203
|
+
break;
|
|
204
|
+
}
|
|
205
|
+
case "unsatisfied": {
|
|
206
|
+
const message = messageList.value[messageIndex];
|
|
207
|
+
await stConfig.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
|
|
208
|
+
userName: userData.username,
|
|
209
|
+
userContent: message.userContent,
|
|
210
|
+
userSuggestion: feedbackContent.value,
|
|
211
|
+
aiContent: message.content,
|
|
212
|
+
type: 2,
|
|
213
|
+
resTime: message.resTime,
|
|
214
|
+
createTime: message.createTime,
|
|
215
|
+
firstPackageTime: message.firstPackageTime,
|
|
216
|
+
isSolved: 0,
|
|
217
|
+
logOrigin: 1,
|
|
218
|
+
});
|
|
219
|
+
ElMessage.success("感谢您的反馈!我们将持续跟踪并进行优化");
|
|
220
|
+
feedbackDialogVisible.value = false;
|
|
221
|
+
messageList.value[messageIndex].showFeedback = false;
|
|
222
|
+
break;
|
|
223
|
+
}
|
|
224
|
+
case "default": {
|
|
225
|
+
const message = messageList.value[messageIndex];
|
|
226
|
+
await stConfig.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
|
|
227
|
+
userName: userData.username,
|
|
228
|
+
userContent: message.userContent,
|
|
229
|
+
userSuggestion: feedbackContent.value,
|
|
230
|
+
aiContent: message.content,
|
|
231
|
+
type: null,
|
|
232
|
+
resTime: message.resTime,
|
|
233
|
+
createTime: message.createTime,
|
|
234
|
+
firstPackageTime: message.firstPackageTime,
|
|
235
|
+
isSolved: 1,
|
|
236
|
+
logOrigin: 1,
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
// 键盘事件
|
|
283
242
|
const handleKeydown = (event) => {
|
|
284
243
|
if (event.key === "Enter") {
|
|
285
244
|
if (event.ctrlKey) {
|
|
@@ -297,14 +256,37 @@ const handleKeydown = (event) => {
|
|
|
297
256
|
}
|
|
298
257
|
}
|
|
299
258
|
};
|
|
300
|
-
|
|
301
|
-
// ==================== 滚动 & 初始化 ====================
|
|
259
|
+
// 滚动到底部
|
|
302
260
|
const scrollToBottom = async () => {
|
|
303
261
|
await nextTick();
|
|
304
262
|
if (messageListRef.value) {
|
|
305
263
|
messageListRef.value.scrollTop = messageListRef.value.scrollHeight;
|
|
306
264
|
}
|
|
307
265
|
};
|
|
266
|
+
// 校验是否支持JSON解析
|
|
267
|
+
const isJSONSerializable = (str) => {
|
|
268
|
+
if (typeof str !== "string") return false;
|
|
269
|
+
try {
|
|
270
|
+
const parsed = JSON.parse(str);
|
|
271
|
+
return parsed !== null && typeof parsed === "object";
|
|
272
|
+
} catch {
|
|
273
|
+
return false;
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
// 动态生成渲染DOM
|
|
277
|
+
const renderJSONContent = (content) => {
|
|
278
|
+
const { parsedConditions } = JSON.parse(content);
|
|
279
|
+
// 创建DOM
|
|
280
|
+
let html = "";
|
|
281
|
+
if (parsedConditions?.length) {
|
|
282
|
+
html += '<div class="parsed-conditions">';
|
|
283
|
+
parsedConditions.forEach((text) => {
|
|
284
|
+
html += `<div class="parsed-conditions-item">${text}</div>`;
|
|
285
|
+
});
|
|
286
|
+
html += "</div>";
|
|
287
|
+
}
|
|
288
|
+
return html;
|
|
289
|
+
};
|
|
308
290
|
|
|
309
291
|
watch(
|
|
310
292
|
() => messageList.value,
|
|
@@ -313,7 +295,6 @@ watch(
|
|
|
313
295
|
},
|
|
314
296
|
{ deep: true },
|
|
315
297
|
);
|
|
316
|
-
|
|
317
298
|
watch(
|
|
318
299
|
() => feedbackDialogVisible.value,
|
|
319
300
|
(newValue) => {
|
|
@@ -344,6 +325,7 @@ defineExpose({
|
|
|
344
325
|
:modal-penetrable="true"
|
|
345
326
|
>
|
|
346
327
|
<div class="ai-dialog-body">
|
|
328
|
+
<!-- 对话展示 -->
|
|
347
329
|
<div
|
|
348
330
|
ref="messageListRef"
|
|
349
331
|
class="message-list"
|
|
@@ -355,14 +337,16 @@ defineExpose({
|
|
|
355
337
|
class="message-item"
|
|
356
338
|
>
|
|
357
339
|
<template v-if="message.content || (index === messageList.length - 1 && message.role === 'assistant' && nodeProgressList.length > 0)">
|
|
340
|
+
<!-- 头像 -->
|
|
358
341
|
<div class="avatar">
|
|
359
342
|
<el-avatar
|
|
360
343
|
:size="32"
|
|
361
344
|
:icon="message.role === 'user' ? UserFilled : Service"
|
|
362
345
|
/>
|
|
363
346
|
</div>
|
|
364
|
-
|
|
347
|
+
<!-- 响应 -->
|
|
365
348
|
<div class="message-content">
|
|
349
|
+
<!-- 节点展示 -->
|
|
366
350
|
<div
|
|
367
351
|
v-if="index === messageList.length - 1 && message.role === 'assistant' && nodeProgressList.length > 0 && !showFinalResult"
|
|
368
352
|
class="node-progress"
|
|
@@ -397,60 +381,67 @@ defineExpose({
|
|
|
397
381
|
<span class="progress-text">第 {{ completedCount }}/{{ totalCount }} 步 · {{ currentStepName }}</span>
|
|
398
382
|
</div>
|
|
399
383
|
</div>
|
|
400
|
-
|
|
384
|
+
<!-- 成功结果展示 -->
|
|
401
385
|
<div
|
|
402
386
|
v-if="isJSONSerializable(message.content)"
|
|
403
|
-
class="message-json"
|
|
387
|
+
class="message-content-json"
|
|
404
388
|
:class="{ 'result-animation': index === messageList.length - 1 && showFinalResult }"
|
|
405
|
-
v-html="renderJSONContent(
|
|
406
|
-
|
|
407
|
-
|
|
389
|
+
v-html="renderJSONContent(message.content)"
|
|
390
|
+
/>
|
|
391
|
+
<!-- 失败结果展示 -->
|
|
408
392
|
<div
|
|
409
393
|
v-else-if="message.content"
|
|
410
|
-
class="message-text"
|
|
394
|
+
class="message-content-text"
|
|
411
395
|
:class="{ 'result-animation': index === messageList.length - 1 && showFinalResult }"
|
|
412
396
|
>
|
|
413
397
|
{{ message.content }}
|
|
414
398
|
</div>
|
|
415
399
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
400
|
+
<!-- 消息底部按钮 -->
|
|
401
|
+
<div
|
|
402
|
+
v-if="message.role === 'assistant'"
|
|
403
|
+
class="message-content-footer"
|
|
404
|
+
>
|
|
405
|
+
<!-- 反馈按钮 -->
|
|
406
|
+
<div
|
|
407
|
+
v-if="message.showFeedback"
|
|
408
|
+
class="feedback-box"
|
|
409
|
+
>
|
|
410
|
+
<el-tooltip
|
|
411
|
+
content="满意"
|
|
412
|
+
placement="bottom"
|
|
413
|
+
>
|
|
414
|
+
<img
|
|
415
|
+
src="./images/like.png"
|
|
416
|
+
alt="满意"
|
|
424
417
|
@click="handleFeedbackAction('satisfied', index)"
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
418
|
+
/>
|
|
419
|
+
</el-tooltip>
|
|
420
|
+
<el-tooltip
|
|
421
|
+
content="满意"
|
|
422
|
+
placement="bottom"
|
|
423
|
+
>
|
|
424
|
+
<img
|
|
425
|
+
src="./images/like_no.png"
|
|
426
|
+
alt="不满意"
|
|
431
427
|
@click="handleFeedbackAction('open', index)"
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
428
|
+
/>
|
|
429
|
+
</el-tooltip>
|
|
430
|
+
</div>
|
|
431
|
+
<!-- 查看结果 -->
|
|
432
|
+
<el-button
|
|
433
|
+
v-if="isJSONSerializable(message.content)"
|
|
434
|
+
class="confirm-btn"
|
|
435
|
+
@click="lookResult(message.content)"
|
|
436
|
+
>
|
|
437
|
+
查看结果
|
|
438
|
+
</el-button>
|
|
439
|
+
</div>
|
|
442
440
|
</div>
|
|
443
441
|
</template>
|
|
444
442
|
</div>
|
|
445
|
-
|
|
446
|
-
<div
|
|
447
|
-
v-if="isThinking && nodeProgressList.length === 0 && !messageList[messageList.length - 1]?.content"
|
|
448
|
-
class="thinking-placeholder"
|
|
449
|
-
>
|
|
450
|
-
🤔 正在分析您的需求...
|
|
451
|
-
</div>
|
|
452
443
|
</div>
|
|
453
|
-
|
|
444
|
+
<!-- 用户输入 -->
|
|
454
445
|
<div class="input-area">
|
|
455
446
|
<el-input
|
|
456
447
|
class="message-input"
|
|
@@ -480,6 +471,7 @@ defineExpose({
|
|
|
480
471
|
</div>
|
|
481
472
|
</el-dialog>
|
|
482
473
|
|
|
474
|
+
<!-- 窗口: 反馈意见 -->
|
|
483
475
|
<el-dialog
|
|
484
476
|
v-model="feedbackDialogVisible"
|
|
485
477
|
title="📝 反馈意见"
|
|
@@ -515,12 +507,11 @@ defineExpose({
|
|
|
515
507
|
flex-direction: column;
|
|
516
508
|
height: 480px;
|
|
517
509
|
background: transparent;
|
|
518
|
-
|
|
510
|
+
// 对话展示
|
|
519
511
|
.message-list {
|
|
520
512
|
flex: 1;
|
|
521
513
|
overflow-y: auto;
|
|
522
514
|
padding: 20px 24px;
|
|
523
|
-
|
|
524
515
|
&::-webkit-scrollbar {
|
|
525
516
|
width: 6px;
|
|
526
517
|
}
|
|
@@ -535,11 +526,9 @@ defineExpose({
|
|
|
535
526
|
background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
|
|
536
527
|
}
|
|
537
528
|
}
|
|
538
|
-
|
|
539
529
|
.message-item {
|
|
540
530
|
display: flex;
|
|
541
531
|
margin-bottom: 20px;
|
|
542
|
-
|
|
543
532
|
.avatar {
|
|
544
533
|
flex-shrink: 0;
|
|
545
534
|
:deep(.el-avatar) {
|
|
@@ -551,258 +540,201 @@ defineExpose({
|
|
|
551
540
|
}
|
|
552
541
|
}
|
|
553
542
|
}
|
|
554
|
-
|
|
555
543
|
.message-content {
|
|
544
|
+
width: calc(100% - 88px);
|
|
556
545
|
display: flex;
|
|
557
546
|
flex-direction: column;
|
|
558
|
-
max-width: 70%;
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
.user {
|
|
563
|
-
flex-direction: row-reverse;
|
|
564
|
-
.avatar {
|
|
565
|
-
margin-left: 12px;
|
|
566
|
-
margin-right: 0;
|
|
567
|
-
}
|
|
568
|
-
.message-content {
|
|
569
|
-
align-items: flex-end;
|
|
570
|
-
.message-text {
|
|
571
|
-
color: white;
|
|
572
|
-
border-radius: 18px 18px 4px 18px;
|
|
573
|
-
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
574
|
-
}
|
|
575
|
-
.message-createTime {
|
|
576
|
-
text-align: right;
|
|
577
|
-
}
|
|
578
547
|
}
|
|
579
548
|
}
|
|
580
|
-
|
|
549
|
+
// 智能体
|
|
550
|
+
.defaultMessage,
|
|
581
551
|
.assistant {
|
|
582
552
|
.avatar {
|
|
583
553
|
margin-right: 12px;
|
|
584
554
|
}
|
|
585
555
|
.message-content {
|
|
586
556
|
align-items: flex-start;
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
557
|
+
.node-progress {
|
|
558
|
+
background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
|
|
559
|
+
border: 1px solid rgba(102, 126, 234, 0.15);
|
|
560
|
+
border-radius: 16px;
|
|
561
|
+
padding: 12px 16px;
|
|
562
|
+
margin-bottom: 8px;
|
|
563
|
+
min-width: 200px;
|
|
564
|
+
animation: breathe 2s ease-in-out infinite;
|
|
565
|
+
|
|
566
|
+
.node-progress-item {
|
|
567
|
+
display: flex;
|
|
568
|
+
align-items: center;
|
|
569
|
+
gap: 10px;
|
|
570
|
+
padding: 6px 0;
|
|
571
|
+
position: relative;
|
|
572
|
+
animation: slideIn 0.3s ease-out;
|
|
573
|
+
|
|
574
|
+
&:not(:last-child)::after {
|
|
575
|
+
content: "";
|
|
576
|
+
position: absolute;
|
|
577
|
+
left: 9px;
|
|
578
|
+
top: 28px;
|
|
579
|
+
width: 2px;
|
|
580
|
+
height: calc(100% - 8px);
|
|
581
|
+
background: linear-gradient(to bottom, #c7d2fe, transparent);
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.node-status-icon {
|
|
585
|
+
position: relative;
|
|
586
|
+
z-index: 1;
|
|
587
|
+
border-radius: 50%;
|
|
588
|
+
width: 20px;
|
|
589
|
+
height: 20px;
|
|
590
|
+
display: inline-flex;
|
|
591
|
+
align-items: center;
|
|
592
|
+
justify-content: center;
|
|
593
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
.node-icon {
|
|
597
|
+
font-size: 12px;
|
|
598
|
+
&.done {
|
|
599
|
+
color: #22c55e;
|
|
600
|
+
}
|
|
601
|
+
&.running {
|
|
602
|
+
color: #667eea;
|
|
603
|
+
animation: spin 0.6s linear infinite;
|
|
604
|
+
}
|
|
605
|
+
&.waiting {
|
|
606
|
+
color: #d1d5db;
|
|
607
|
+
animation: spin 0.8s linear infinite;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
.node-name {
|
|
612
|
+
font-size: 13px;
|
|
613
|
+
color: #6b7280;
|
|
614
|
+
line-height: 20px;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
&:has(.running) .node-name {
|
|
618
|
+
font-weight: 500;
|
|
619
|
+
color: #667eea;
|
|
620
|
+
}
|
|
621
|
+
}
|
|
629
622
|
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
623
|
+
.progress-footer {
|
|
624
|
+
margin-top: 12px;
|
|
625
|
+
padding-top: 8px;
|
|
626
|
+
border-top: 1px solid rgba(102, 126, 234, 0.1);
|
|
627
|
+
|
|
628
|
+
:deep(.el-progress) {
|
|
629
|
+
margin-bottom: 6px;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
.progress-text {
|
|
633
|
+
font-size: 11px;
|
|
634
|
+
color: #9ca3af;
|
|
635
|
+
display: block;
|
|
636
|
+
text-align: center;
|
|
637
|
+
}
|
|
638
|
+
}
|
|
634
639
|
}
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
640
|
+
.message-content-json {
|
|
641
|
+
width: 100%;
|
|
642
|
+
overflow: hidden;
|
|
643
|
+
:deep(.parsed-conditions) {
|
|
644
|
+
margin: 0;
|
|
645
|
+
padding: 0;
|
|
646
|
+
.parsed-conditions-item {
|
|
647
|
+
text-align: center;
|
|
648
|
+
color: #f56c6c;
|
|
649
|
+
margin-bottom: 8px;
|
|
650
|
+
padding: 8px 12px;
|
|
651
|
+
background: linear-gradient(135deg, #ffebeb 0%, #ffe0e0 100%);
|
|
652
|
+
border-radius: 12px;
|
|
653
|
+
font-weight: 500;
|
|
654
|
+
transition: all 0.2s ease;
|
|
655
|
+
&:last-child {
|
|
656
|
+
margin-bottom: 0;
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
}
|
|
638
660
|
}
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
661
|
+
.message-content-footer {
|
|
662
|
+
width: 100%;
|
|
663
|
+
display: flex;
|
|
664
|
+
align-items: center;
|
|
665
|
+
justify-content: space-between;
|
|
666
|
+
.feedback-box {
|
|
667
|
+
display: flex;
|
|
668
|
+
align-items: center;
|
|
669
|
+
margin-top: 10px;
|
|
670
|
+
img {
|
|
671
|
+
cursor: pointer;
|
|
672
|
+
width: 26px;
|
|
673
|
+
height: 26px;
|
|
674
|
+
margin-right: 10px;
|
|
675
|
+
&:hover {
|
|
676
|
+
transition: 0.2s;
|
|
677
|
+
transform: scale(1.1);
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
.confirm-btn {
|
|
682
|
+
margin-top: 8px;
|
|
683
|
+
padding: 6px 20px;
|
|
684
|
+
font-size: 13px;
|
|
685
|
+
border-radius: 20px;
|
|
686
|
+
background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
|
|
687
|
+
color: #667eea;
|
|
688
|
+
border: 1px solid rgba(102, 126, 234, 0.15);
|
|
689
|
+
cursor: pointer;
|
|
690
|
+
transition: all 0.2s ease;
|
|
691
|
+
font-weight: 500;
|
|
692
|
+
|
|
693
|
+
&:hover {
|
|
694
|
+
background: linear-gradient(135deg, #f0f2ff 0%, #e8ecff 100%);
|
|
695
|
+
border-color: rgba(102, 126, 234, 0.3);
|
|
696
|
+
transform: translateY(-1px);
|
|
697
|
+
box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
|
|
698
|
+
}
|
|
699
|
+
}
|
|
642
700
|
}
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
.node-name {
|
|
646
|
-
font-size: 13px;
|
|
647
|
-
color: #6b7280;
|
|
648
|
-
line-height: 20px;
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
&:has(.running) .node-name {
|
|
652
|
-
font-weight: 500;
|
|
653
|
-
color: #667eea;
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
.progress-footer {
|
|
658
|
-
margin-top: 12px;
|
|
659
|
-
padding-top: 8px;
|
|
660
|
-
border-top: 1px solid rgba(102, 126, 234, 0.1);
|
|
661
|
-
|
|
662
|
-
:deep(.el-progress) {
|
|
663
|
-
margin-bottom: 6px;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
.progress-text {
|
|
667
|
-
font-size: 11px;
|
|
668
|
-
color: #9ca3af;
|
|
669
|
-
display: block;
|
|
670
|
-
text-align: center;
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
.thinking-placeholder {
|
|
676
|
-
display: inline-flex;
|
|
677
|
-
align-items: center;
|
|
678
|
-
gap: 8px;
|
|
679
|
-
padding: 10px 16px;
|
|
680
|
-
background: rgba(102, 126, 234, 0.08);
|
|
681
|
-
border-radius: 18px;
|
|
682
|
-
font-size: 13px;
|
|
683
|
-
color: #667eea;
|
|
684
|
-
width: fit-content;
|
|
685
|
-
|
|
686
|
-
&::before {
|
|
687
|
-
content: "";
|
|
688
|
-
width: 14px;
|
|
689
|
-
height: 14px;
|
|
690
|
-
border: 2px solid #667eea;
|
|
691
|
-
border-top-color: transparent;
|
|
692
|
-
border-radius: 50%;
|
|
693
|
-
animation: spin 0.8s linear infinite;
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
.message-json,
|
|
698
|
-
.message-text {
|
|
699
|
-
padding: 12px 16px;
|
|
700
|
-
font-size: 14px;
|
|
701
|
-
line-height: 1.6;
|
|
702
|
-
word-wrap: break-word;
|
|
703
|
-
white-space: pre-wrap;
|
|
704
|
-
border-radius: 18px 18px 18px 4px;
|
|
705
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
|
706
|
-
border: 1px solid rgba(102, 126, 234, 0.2);
|
|
707
|
-
transition: all 0.3s ease;
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
.message-json {
|
|
711
|
-
width: 100%;
|
|
712
|
-
overflow: hidden;
|
|
713
|
-
|
|
714
|
-
:deep(.parsed-conditions) {
|
|
715
|
-
margin: 0;
|
|
716
|
-
padding: 0;
|
|
717
|
-
|
|
718
|
-
.parsed-conditions-item {
|
|
719
|
-
text-align: center;
|
|
720
|
-
color: #f56c6c;
|
|
721
|
-
margin-bottom: 8px;
|
|
722
|
-
padding: 8px 12px;
|
|
723
|
-
background: linear-gradient(135deg, #ffebeb 0%, #ffe0e0 100%);
|
|
724
|
-
border-radius: 12px;
|
|
725
|
-
font-weight: 500;
|
|
726
|
-
transition: all 0.2s ease;
|
|
727
|
-
&:last-child {
|
|
728
|
-
margin-bottom: 0;
|
|
701
|
+
.result-animation {
|
|
702
|
+
animation: resultAppear 0.5s cubic-bezier(0.2, 0.9, 0.4, 1.1);
|
|
729
703
|
}
|
|
730
704
|
}
|
|
731
705
|
}
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
.message-createTime {
|
|
739
|
-
font-size: 11px;
|
|
740
|
-
color: #9ca3af;
|
|
741
|
-
margin-top: 6px;
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
.feedback-buttons {
|
|
745
|
-
display: flex;
|
|
746
|
-
gap: 12px;
|
|
747
|
-
margin-top: 12px;
|
|
748
|
-
|
|
749
|
-
.feedback-btn {
|
|
750
|
-
display: flex;
|
|
751
|
-
align-items: center;
|
|
752
|
-
gap: 6px;
|
|
753
|
-
padding: 4px 10px;
|
|
754
|
-
border: none;
|
|
755
|
-
border-radius: 20px;
|
|
756
|
-
font-size: 13px;
|
|
757
|
-
font-weight: 500;
|
|
758
|
-
cursor: pointer;
|
|
759
|
-
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
760
|
-
background: rgba(255, 255, 255, 0.9);
|
|
761
|
-
backdrop-filter: blur(10px);
|
|
762
|
-
|
|
763
|
-
.btn-emoji {
|
|
764
|
-
font-size: 16px;
|
|
765
|
-
transition: transform 0.2s ease;
|
|
766
|
-
}
|
|
767
|
-
.btn-text {
|
|
768
|
-
font-size: 13px;
|
|
706
|
+
// 用户
|
|
707
|
+
.user {
|
|
708
|
+
flex-direction: row-reverse;
|
|
709
|
+
.avatar {
|
|
710
|
+
margin-left: 12px;
|
|
711
|
+
margin-right: 0;
|
|
769
712
|
}
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
.
|
|
773
|
-
|
|
713
|
+
.message-content {
|
|
714
|
+
align-items: flex-end;
|
|
715
|
+
.message-content-text {
|
|
716
|
+
color: white;
|
|
717
|
+
border-radius: 18px 18px 4px 18px;
|
|
718
|
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
774
719
|
}
|
|
775
720
|
}
|
|
776
|
-
&:active {
|
|
777
|
-
transform: translateY(0);
|
|
778
|
-
}
|
|
779
721
|
}
|
|
780
|
-
|
|
781
|
-
.
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
.unsatisfied-btn {
|
|
794
|
-
background: linear-gradient(135deg, #fff1f0 0%, #ffe7e5 100%);
|
|
795
|
-
color: #ff4d4f;
|
|
796
|
-
border: 1px solid rgba(255, 77, 79, 0.2);
|
|
797
|
-
box-shadow: 0 2px 8px rgba(255, 77, 79, 0.1);
|
|
798
|
-
&:hover {
|
|
799
|
-
background: linear-gradient(135deg, #ffe7e5 0%, #ffccc7 100%);
|
|
800
|
-
border-color: #ff4d4f;
|
|
801
|
-
box-shadow: 0 4px 12px rgba(255, 77, 79, 0.2);
|
|
802
|
-
}
|
|
722
|
+
.message-content-json,
|
|
723
|
+
.message-content-text {
|
|
724
|
+
box-sizing: border-box;
|
|
725
|
+
padding: 12px 16px;
|
|
726
|
+
font-size: 14px;
|
|
727
|
+
line-height: 1.6;
|
|
728
|
+
word-wrap: break-word;
|
|
729
|
+
white-space: pre-wrap;
|
|
730
|
+
border-radius: 18px 18px 18px 4px;
|
|
731
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
|
732
|
+
border: 1px solid rgba(102, 126, 234, 0.2);
|
|
733
|
+
transition: all 0.3s ease;
|
|
803
734
|
}
|
|
804
735
|
}
|
|
805
736
|
|
|
737
|
+
// 用户输入
|
|
806
738
|
.input-area {
|
|
807
739
|
padding: 16px 24px 24px;
|
|
808
740
|
backdrop-filter: blur(10px);
|