mirror of
https://github.com/certd/certd.git
synced 2026-05-16 05:07:32 +08:00
refactor(ui): 优化 AI聊天功能
- 在打开聊天时增加对空消息的检查,避免发送无效请求 - 在发送消息时添加来源标识,以便服务端区分消息来源 - 在任务视图中增加对空日志的检查,避免触发空指针异常
This commit is contained in:
+3
-1
@@ -62,8 +62,10 @@ export default {
|
||||
});
|
||||
|
||||
function onAiChat() {
|
||||
debugger;
|
||||
const logs = currentHistory.value?.logs[activeKey.value];
|
||||
if (!logs || logs.length === 0) {
|
||||
return;
|
||||
}
|
||||
let logText = "";
|
||||
for (let log of logs) {
|
||||
logText += log + "\n";
|
||||
|
||||
Reference in New Issue
Block a user