ai模块测试
This commit is contained in:
@@ -1,56 +1,3 @@
|
||||
/* ====== 顶部托盘按钮 ====== */
|
||||
.o_ai_systray {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
}
|
||||
.o_ai_systray_btn {
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
padding: 0 10px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
.o_ai_icon_wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 8px;
|
||||
background: linear-gradient(135deg, #7c3aed, #a855f7);
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
|
||||
transition: all 0.25s ease;
|
||||
animation: ai_pulse 2s ease-in-out infinite;
|
||||
}
|
||||
.o_ai_systray_btn:hover .o_ai_icon_wrap {
|
||||
transform: scale(1.12);
|
||||
box-shadow: 0 3px 14px rgba(124, 58, 237, 0.5);
|
||||
animation: none;
|
||||
}
|
||||
@keyframes ai_pulse {
|
||||
0%, 100% { box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35); }
|
||||
50% { box-shadow: 0 2px 16px rgba(124, 58, 237, 0.6); }
|
||||
}
|
||||
.o_ai_badge {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
right: 4px;
|
||||
background: #e74c3c;
|
||||
color: #fff;
|
||||
font-size: 10px;
|
||||
border-radius: 10px;
|
||||
padding: 1px 5px;
|
||||
min-width: 16px;
|
||||
text-align: center;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
/* ====== 浮动聊天窗口 ====== */
|
||||
.o_ai_floating_chat_wrapper {
|
||||
position: fixed;
|
||||
|
||||
@@ -41,7 +41,7 @@ async function loadHistory() {
|
||||
try {
|
||||
const data = await rpcCall("/ai/chat/history", { conversation_id: id });
|
||||
return data.error ? [] : (data.messages || []);
|
||||
} catch {
|
||||
} catch (e) {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -50,7 +50,7 @@ async function loadConversations() {
|
||||
try {
|
||||
const data = await rpcCall("/ai/conversation/list", {});
|
||||
return data.conversations || [];
|
||||
} catch {
|
||||
} catch (e) {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user