修复: .trash WARN 降级 + ToolCard 分组标题增强
- .trash 跨盘迁移从 WARN 降为 DEBUG(预期行为,非异常) - ToolCard 分组标题增加文件路径摘要(取前3个文件名), 收起态也能看到影响了哪些文件
This commit is contained in:
@@ -7,6 +7,14 @@
|
||||
> **2026-06-18 归档**: 已完成 `[x]` 与历史分析段已迁至 [07-项目管理/todo归档/2026-06-18.md](./07-项目管理/todo归档/2026-06-18.md)。
|
||||
> **2026-06-27 归档**: 已完成 `[x]`/`✅` 项已迁至 [07-项目管理/todo归档/2026-06-27.md](./07-项目管理/todo归档/2026-06-27.md)。
|
||||
|
||||
### 💡 2026-06-27 对话上下文透明化
|
||||
|
||||
> 用户看不到 AI 接收到的上下文信息(目标钉扎/enrichment/system_prompt),导致行为不可理解。
|
||||
|
||||
- [ ] **L1 目标可见**: 对话顶部显示当前 pinned_goals 列表,用户可查看/清理
|
||||
- [ ] **L2 Enrichment 可见**: @[项目] 发送前展开 enrichment 摘要
|
||||
- [ ] **L3 完整上下文**: 可展开面板查看 system_prompt / augmentations
|
||||
|
||||
---
|
||||
|
||||
## 🎯 统一规划(2026-06-26 全景)
|
||||
|
||||
@@ -748,8 +748,9 @@ impl AppState {
|
||||
let new_trash = data_dir.join(".trash");
|
||||
if old_trash.exists() && !new_trash.exists() {
|
||||
if let Err(e) = std::fs::rename(&old_trash, &new_trash) {
|
||||
tracing::warn!(
|
||||
"迁移 .trash 失败(从 {:?} 到 {:?}): {} (原目录保留,新目录将自动创建)",
|
||||
// 跨盘 rename 失败(E:→C:),静默跳过,新目录自动创建
|
||||
tracing::debug!(
|
||||
"迁移 .trash 跨盘失败(从 {:?} 到 {:?}): {} (原目录保留,新目录将自动创建)",
|
||||
old_trash, new_trash, e,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<span class="ai-tool-group-icon" v-html="groupIcon(group.name)"></span>
|
||||
<span class="ai-tool-group-name">{{ groupDisplayName(group) }}</span>
|
||||
<span class="ai-tool-group-count">{{ group.calls.length }}</span>
|
||||
<span class="ai-tool-group-files">{{ groupFileSummary(group) }}</span>
|
||||
<span class="ai-tool-group-chevron" :class="{ 'is-open': !isGroupCollapsed(gi) }">▸</span>
|
||||
<!-- 全部展开/收起(U-260618:从 topbar 下沉到首个可折叠分组标题行尾巴,与 run command 同行) -->
|
||||
<div
|
||||
@@ -216,6 +217,26 @@ function groupDisplayName(group: ToolCallGroup): string {
|
||||
return group.name.replace(/_/g, ' ')
|
||||
}
|
||||
|
||||
/** 从工具调用参数中提取路径摘要(取前 3 个文件名)。
|
||||
* 供分组标题行展示,让用户一眼知道影响了哪些文件。*/
|
||||
function groupFileSummary(group: ToolCallGroup): string {
|
||||
const paths: string[] = []
|
||||
for (const tc of group.calls) {
|
||||
const args = tc.args as Record<string, unknown> | undefined
|
||||
const p = args?.path
|
||||
if (typeof p === 'string' && p.trim()) {
|
||||
// 取最后一段文件名(或最后两级目录)
|
||||
const parts = p.trim().split(/[/\\]/)
|
||||
const short = parts.length >= 2
|
||||
? parts.slice(-2).join('/')
|
||||
: parts[parts.length - 1]
|
||||
if (!paths.includes(short)) paths.push(short)
|
||||
if (paths.length >= 3) break
|
||||
}
|
||||
}
|
||||
return paths.length ? ' · ' + paths.join(' · ') : ''
|
||||
}
|
||||
|
||||
/**
|
||||
* 单卡是否展开:
|
||||
* - 分组未折叠 → 用户手动 expandedCards 或首卡默认展开
|
||||
|
||||
Reference in New Issue
Block a user