From a5c01a3f115399b55f43d639c8278b8d68c6211c Mon Sep 17 00:00:00 2001
From: ax_rd <ax_rd@aisim.cn>
Date: Thu, 03 Sep 2026 11:26:53 +0800
Subject: [PATCH] feat: wikilink 边可信度标注(exact/fuzzy)+ 悬空链接入 unresolved_links 表
---
internal/output/formatter.go | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/internal/output/formatter.go b/internal/output/formatter.go
index 91f7286..718d51e 100644
--- a/internal/output/formatter.go
+++ b/internal/output/formatter.go
@@ -24,6 +24,21 @@
title = title[:18] + ".."
}
sb.WriteString(fmt.Sprintf("%-50s %-20s %-8s %d\n", r.Path, title, r.Section, r.Score))
+
+ // 输出内容(如果有)
+ if r.Content != "" {
+ sb.WriteString("\n--- 内容 ---\n")
+ sb.WriteString(r.Content)
+ sb.WriteString("\n")
+ }
+
+ // 输出关联文档(如果有)
+ if len(r.Links) > 0 {
+ sb.WriteString("\n--- 关联文档 ---\n")
+ for _, link := range r.Links {
+ sb.WriteString(fmt.Sprintf("- %s\n", link))
+ }
+ }
}
sb.WriteString(fmt.Sprintf("\n共 %d 条结果\n", len(results)))
--
Gitblit v1.10.0