fix(ios): ChatCitation 字段对齐后端(excerptText 替代 content)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
ab7f772072
commit
26610c1baa
@ -421,8 +421,9 @@ struct ChatMessage: Codable, Identifiable {
|
|||||||
struct ChatCitation: Codable, Identifiable {
|
struct ChatCitation: Codable, Identifiable {
|
||||||
let id: String
|
let id: String
|
||||||
let chunkId: String?
|
let chunkId: String?
|
||||||
let content: String?
|
let sourceTitle: String?
|
||||||
let score: Double?
|
let excerptText: String?
|
||||||
|
let pageNumber: Int?
|
||||||
}
|
}
|
||||||
|
|
||||||
struct CreateSessionRequest: Codable {
|
struct CreateSessionRequest: Codable {
|
||||||
|
|||||||
@ -33,7 +33,7 @@ struct AIChatPage: View {
|
|||||||
ForEach(citations.prefix(3)) { c in
|
ForEach(citations.prefix(3)) { c in
|
||||||
HStack(spacing: 4) {
|
HStack(spacing: 4) {
|
||||||
Image(systemName: "doc.text").font(.system(size: 9)).foregroundColor(Color.zxF04)
|
Image(systemName: "doc.text").font(.system(size: 9)).foregroundColor(Color.zxF04)
|
||||||
Text(c.content?.prefix(60).description ?? "").font(.system(size: 10)).foregroundColor(Color.zxF04).lineLimit(1)
|
Text(c.excerptText?.prefix(60).description ?? "").font(.system(size: 10)).foregroundColor(Color.zxF04).lineLimit(1)
|
||||||
}.padding(.horizontal, 8).padding(.vertical, 4)
|
}.padding(.horizontal, 8).padding(.vertical, 4)
|
||||||
.background(Color.zxFill004).clipShape(Capsule())
|
.background(Color.zxFill004).clipShape(Capsule())
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user