From 13c53904c5ddea86c077a057d5987f732e8fc974 Mon Sep 17 00:00:00 2001
From: ax_rd <ax_rd@aisim.cn>
Date: Thu, 03 Sep 2026 12:20:41 +0800
Subject: [PATCH] feat: explore 命令(字节预算 + 段落级原文直出 + 关联清单 + 悬空链接提示)

---
 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