Show knowledge sources and pass readable passages to chat
This commit is contained in:
@@ -260,6 +260,17 @@ struct ChatView: View {
|
||||
Text(activity.joined(separator: " · "))
|
||||
.font(.caption).foregroundStyle(.secondary).lineLimit(2).textSelection(.enabled)
|
||||
}
|
||||
if !studio.knowledgeSources.isEmpty {
|
||||
DisclosureGroup("Knowledge Sources (\(studio.knowledgeSources.count))") {
|
||||
ScrollView {
|
||||
Text(studio.knowledgeSources.joined(separator: "\n"))
|
||||
.textSelection(.enabled)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
}
|
||||
.frame(maxHeight: 80)
|
||||
}
|
||||
.font(.caption)
|
||||
}
|
||||
if showDebugOutput, !studio.webDiagnostics.isEmpty || !studio.webStatus.isEmpty {
|
||||
let diagnostics = studio.webDiagnostics.isEmpty
|
||||
? [studio.webStatus]
|
||||
|
||||
Reference in New Issue
Block a user