feat: 视觉优化,修复样式问题
This commit is contained in:
parent
bac93a5d04
commit
5731c9d7cf
@ -448,6 +448,9 @@ defineExpose({
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.remote-install-panel {
|
||||
.panel-header-text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@ -396,7 +396,7 @@ provide('settingsModal', {
|
||||
@sidebar-width: 252px;
|
||||
@sidebar-collapsed-width: 56px;
|
||||
@sidebar-padding: 6px 8px;
|
||||
@sidebar-item-height: 40px;
|
||||
@sidebar-item-height: 36px;
|
||||
@sidebar-item-padding-x: 10px;
|
||||
@sidebar-icon-size: 18px;
|
||||
|
||||
@ -545,7 +545,7 @@ div.header,
|
||||
background-color: transparent;
|
||||
color: var(--gray-700);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
font-weight: 450;
|
||||
transition:
|
||||
background-color 0.2s ease-in-out,
|
||||
border-color 0.2s ease-in-out,
|
||||
@ -567,7 +567,7 @@ div.header,
|
||||
margin-left: 8px;
|
||||
overflow: hidden;
|
||||
line-height: 20px;
|
||||
font-weight: 500;
|
||||
font-weight: 450;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
transition:
|
||||
|
||||
@ -4,6 +4,19 @@ import { agentApi, databaseApi, mcpApi, skillApi } from '@/apis'
|
||||
import { handleChatError } from '@/utils/errorHandler'
|
||||
import { useUserStore } from '@/stores/user'
|
||||
|
||||
const CHATBOT_AGENT_ID = 'ChatbotAgent'
|
||||
|
||||
function sortAgents(agents) {
|
||||
return [...agents].sort((a, b) => {
|
||||
const isAChatbotAgent = a.id === CHATBOT_AGENT_ID
|
||||
const isBChatbotAgent = b.id === CHATBOT_AGENT_ID
|
||||
|
||||
if (isAChatbotAgent && !isBChatbotAgent) return -1
|
||||
if (!isAChatbotAgent && isBChatbotAgent) return 1
|
||||
return a.id.localeCompare(b.id)
|
||||
})
|
||||
}
|
||||
|
||||
export const useAgentStore = defineStore(
|
||||
'agent',
|
||||
() => {
|
||||
@ -184,7 +197,7 @@ export const useAgentStore = defineStore(
|
||||
|
||||
try {
|
||||
const response = await agentApi.getAgents()
|
||||
agents.value = response.agents
|
||||
agents.value = sortAgents(response.agents || [])
|
||||
} catch (err) {
|
||||
console.error('Failed to fetch agents:', err)
|
||||
handleChatError(err, 'fetch')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user