优化: 前端u-agent令牌对齐与组件拆分续批

- 全局样式类(df-sec-h/df-toast族)替换散装实现,主题token去硬编码兜底
- 拆分子组件:ai-chat/queue-panel(队列时钟与编辑随迁)、
  conversation-sidebar/ConversationList、settings/provider-panel
- 父组件死副本清理(队列编辑/时钟/键位表,TS6133清零)并补
  fill-draft父侧转发(重构半成品断链修复)
- 验收:vue-tsc EXIT 0
This commit is contained in:
lxy
2026-10-18 23:15:57 +08:00
parent 302c4bcf52
commit 25ec9cf69a
62 changed files with 3475 additions and 2006 deletions
+13 -30
View File
@@ -488,11 +488,8 @@ onUnmounted(() => { _unlistenDataChanged?.() })
async function onScanSubmodules() {
moduleDropdownOpen.value = false
try {
const n = await moduleApi.scanProjectModules(props.projectId)
await moduleApi.scanProjectModules(props.projectId)
await loadModules()
if (n > 0) {
console.log('[FileExplorer] 扫描到新工程:', n)
}
} catch (e) {
Message.error(t('common.unknownError'))
console.error('[FileExplorer] 扫描子仓库失败:', e)
@@ -594,7 +591,7 @@ async function onRemoveModule() {
max-height: 100%;
background: var(--df-bg);
border: 0.5px solid var(--df-border);
border-radius: var(--df-radius-lg, 8px);
border-radius: var(--df-radius-lg);
overflow: hidden;
}
@@ -625,7 +622,7 @@ async function onRemoveModule() {
padding: 5px 10px;
background: var(--df-bg);
border: 0.5px solid var(--df-border);
border-radius: var(--df-radius-sm, 4px);
border-radius: var(--df-radius-sm);
color: var(--df-text);
font-size: 12px;
cursor: pointer;
@@ -651,12 +648,11 @@ async function onRemoveModule() {
max-width: 320px;
background: var(--df-bg-card);
border: 0.5px solid var(--df-border);
border-radius: var(--df-radius-sm, 4px);
box-shadow: 0 6px 16px rgba(0,0,0,0.25);
border-radius: var(--df-radius-sm);
box-shadow: var(--df-shadow-sm);
z-index: 20;
max-height: 280px;
overflow-y: auto;
scrollbar-width: thin;
}
.module-dropdown-item {
@@ -665,10 +661,10 @@ async function onRemoveModule() {
gap: 2px;
padding: 8px 12px;
cursor: pointer;
border-bottom: 0.5px solid rgba(255,255,255,0.04);
border-bottom: 0.5px solid var(--df-hover);
}
.module-dropdown-item:last-child { border-bottom: none; }
.module-dropdown-item:hover { background: rgba(255,255,255,0.04); }
.module-dropdown-item:hover { background: var(--df-hover); }
.module-dropdown-item.active {
background: rgba(255,255,255,0.06);
border-left: 2px solid var(--df-accent);
@@ -778,7 +774,7 @@ async function onRemoveModule() {
.view-tab:hover {
color: var(--df-text);
background: rgba(255,255,255,0.03);
background: var(--df-hover);
}
.view-tab.active {
@@ -819,13 +815,6 @@ async function onRemoveModule() {
overflow-y: auto;
overflow-x: hidden;
min-height: 0;
scrollbar-width: thin;
}
.explorer-changes .gc-body {
overflow-y: auto;
overflow-x: hidden;
scrollbar-width: thin;
}
.tree-loading {
@@ -867,8 +856,8 @@ async function onRemoveModule() {
.tree-loading .spinner {
width: 20px;
height: 20px;
border: 2px solid var(--df-border, #444);
border-top-color: var(--df-accent, #3a8);
border: 2px solid var(--df-border);
border-top-color: var(--df-accent);
border-radius: 50%;
animation: df-spin 0.8s linear infinite;
}
@@ -913,20 +902,14 @@ async function onRemoveModule() {
}
}
/* spinner(刷新按钮内) */
/* spinner(刷新按钮内);df-spin keyframes 消费 global.css 全局定义(原本地重复定义已删) */
.spinner {
width: 10px;
height: 10px;
border: 1.5px solid var(--df-border, #444);
border-top-color: var(--df-accent, #3a8);
border: 1.5px solid var(--df-border);
border-top-color: var(--df-accent);
border-radius: 50%;
animation: df-spin 0.8s linear infinite;
display: inline-block;
}
@keyframes df-spin {
to {
transform: rotate(360deg);
}
}
</style>