优化: AI Chat全栈多批审查修复与架构清理(risk_level清理/路由解耦/工具渲染/测试补测/死代码)

This commit is contained in:
2026-06-18 22:57:19 +08:00
parent 0ca5d9805f
commit a2871a66e0
87 changed files with 5720 additions and 3012 deletions

View File

@@ -31,7 +31,8 @@
:class="{ active: activeStatus === s.key }"
@click="activeStatus = s.key"
>
{{ s.icon }} {{ s.label }}
<span class="filter-btn-icon">{{ s.icon }}</span>
<span class="filter-btn-label">{{ s.label }}</span>
</button>
</div>
</div>
@@ -41,7 +42,7 @@
<!-- Y-2: loading/error/empty 兜底(参考 Projects.vue 空态写法) -->
<div v-if="loading" class="empty-state">{{ $t('common.loading') }}</div>
<div v-else-if="store.error" class="empty-state">{{ store.error }}</div>
<div v-else-if="filteredGroups.length === 0" class="empty-state">暂无任务</div>
<div v-else-if="filteredGroups.length === 0" class="empty-state">{{ $t('tasks.group.empty') }}</div>
<template v-else>
<section
v-for="group in filteredGroups"
@@ -287,6 +288,7 @@ onMounted(async () => {
.filter-group {
display: flex;
align-items: center;
flex-wrap: wrap; /* 窄屏按钮可换行,避免 nowrap 溢出 */
gap: 6px;
}
.filter-label {
@@ -295,6 +297,9 @@ onMounted(async () => {
white-space: nowrap;
}
.filter-btn {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 4px 12px;
border: 0.5px solid var(--df-border);
border-radius: var(--df-radius-sm);
@@ -304,12 +309,22 @@ onMounted(async () => {
cursor: pointer;
transition: all 0.15s;
}
.filter-btn-icon { line-height: 1; } /* 图标基线对齐,避免行高跳动 */
.filter-btn-label { white-space: nowrap; } /* 文字不内断行,换行只发生在按钮间 */
.filter-btn:hover { background: rgba(108, 99, 255, 0.06); color: var(--df-text); }
.filter-btn.active {
background: var(--df-accent);
color: #fff;
border-color: var(--df-accent);
}
/* 窄屏(手机宽):按钮内图标与文字改纵向排布,避免横向挤压致图标/文字在空格处错位断行 */
@media (max-width: 480px) {
.filter-btn {
flex-direction: column;
gap: 2px;
padding: 4px 8px;
}
}
/* ===== 任务分组 ===== */
.task-groups {