refactor: Update function signatures across multiple files to improve readability by adding context parameters and enhancing code structure

This commit is contained in:
wizardchen
2025-11-28 16:17:52 +08:00
parent 135e33eca4
commit eb8bfddfd1
89 changed files with 1453 additions and 522 deletions
+6 -1
View File
@@ -250,7 +250,12 @@ func (cli *CLI) askQuestion(query string) {
case client.AgentResponseTypeReferences:
if resp.KnowledgeReferences != nil {
references = append(references, resp.KnowledgeReferences...)
fmt.Printf("%s📚 Knowledge References:%s Found %d reference(s)\n", ColorCyan, ColorReset, len(resp.KnowledgeReferences))
fmt.Printf(
"%s📚 Knowledge References:%s Found %d reference(s)\n",
ColorCyan,
ColorReset,
len(resp.KnowledgeReferences),
)
for i, ref := range resp.KnowledgeReferences {
fmt.Printf(" %d. [Score: %.3f] %s\n", i+1, ref.Score, truncateString(ref.Content, 80))
fmt.Printf(" Knowledge: %s (Chunk: %d)\n", ref.KnowledgeTitle, ref.ChunkIndex)