优化: 清理无意义注释(走查编号前缀/过时历史标注/死代码注释)

This commit is contained in:
lxy
2026-08-15 18:05:43 +08:00
parent 5a4c821629
commit 5ac815b9ca
137 changed files with 735 additions and 737 deletions
+5 -5
View File
@@ -277,7 +277,7 @@ const isFailed = computed(() => {
if (r && typeof r.exit_code === 'number') return r.exit_code !== 0
if (r) return true
}
// A1-B5: 可解析 JSON 且显式 success===false(git status/diff/log 只读工具失败返
// 可解析 JSON 且显式 success===false(git status/diff/log 只读工具失败返
// {success:false,error} 合法 JSON 对象非 Err)→ 判失败,防绿框假成功
if (r && r.success === false) return true
if (!r) {
@@ -296,13 +296,13 @@ const cmdOutput = computed(() => {
})
/**
* UX-260618-06: patch_file 结果 diff 行拆解(复用 parseDiffLines +add/-del/ ctx 着色)。
* patch_file 结果 diff 行拆解(复用 parseDiffLines +add/-del/ ctx 着色)。
* 数据源:parsed.diff(patch_file 工具执行结果字段)。长 diff 截断到前 120 行防撑爆卡片。
*/
const resultDiffLines = computed(() => parseDiffLines(parsed.value?.diff, 120))
/**
* grep 命中计数标签(F-260621):G-1 复用 useToolCard.formatGrep 单一函数,
* grep 命中计数标签G-1 复用 useToolCard.formatGrep 单一函数,
* 消除原与 ToolResultBody 重复的三分支(files_with_matches/count/content 文案)。
* parsed 为 null 返空串,等价原逻辑;非 null 委托 formatGrep。
*/
@@ -333,7 +333,7 @@ function onInstallObscura() {
emit('install-obscura')
}
// SW-260618-06: status 切到 completed 时按成功/失败初始化折叠态(失败默认展开便于看 stderr/错误 body)。
// status 切到 completed 时按成功/失败初始化折叠态(失败默认展开便于看 stderr/错误 body)。
// immediate 时若初始非 completed,两 ref 保持默认 false,无副作用。
watch(() => props.tc.status, (s) => {
if (s === 'completed') {
@@ -402,7 +402,7 @@ watch(() => props.tc.status, (s) => {
color: var(--df-warning);
}
/* grep 结果(F-260621):文件栏复用 ai-tool-file-bar,命中行用等宽渲染 */
/* grep 结果文件栏复用 ai-tool-file-bar,命中行用等宽渲染 */
.ai-tool-grep-result {
border-top: 0.5px solid var(--df-border);
}