feat(ai-sdk): /retrieve liefert footnotes[] (C-FN Evidence) für Advisor-Workspace
Footnote-Hits werden aus dem Qdrant-Payload (is_footnote/footnote_label/ footnote_verbatim/ref_citation_unit) in interne LegalSearchResult-Felder (json:"-", kein Pro-Result-Contract-Change) gemappt und im /retrieve-Handler als Top-Level footnotes[] (Frontend RawFootnote-Shape) herausgezogen; Hits bleiben in results[] (LLM-Kontext). figures[] als leerer C8-Platzhalter. Speist den Evidence-Workspace (evidence-adapter.ts) der Frontend-Session. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -37,6 +37,14 @@ type LegalSearchResult struct {
|
||||
// Supersede-Status (status="superseded", use_for_primary=false) — Alt-Quelle,
|
||||
// die fuer Default-Fragen demoted wird (nicht versteckt; fuer Historie auffindbar).
|
||||
Superseded bool `json:"-"`
|
||||
|
||||
// C-FN Fußnoten-Evidence — intern (json:"-", kein Pro-Result-Contract-Change),
|
||||
// aus dem Qdrant-Payload befuellt; der /retrieve-Handler baut daraus das Top-Level
|
||||
// footnotes[] fuer den Advisor-Evidence-Workspace (Frontend RawFootnote).
|
||||
IsFootnote bool `json:"-"`
|
||||
FootnoteLabel string `json:"-"`
|
||||
FootnoteVerbatim string `json:"-"`
|
||||
RefCitationUnit string `json:"-"`
|
||||
}
|
||||
|
||||
// LegalAssessment is the auditable explanation layer over a ranked result set:
|
||||
|
||||
@@ -195,6 +195,11 @@ func hitsToResults(hits []qdrantSearchHit) []LegalSearchResult {
|
||||
ReferencesOut: getStringSlice(hit.Payload, "references_out"),
|
||||
ReferencesIn: getStringSlice(hit.Payload, "references_in"),
|
||||
Superseded: getString(hit.Payload, "status") == "superseded",
|
||||
|
||||
IsFootnote: getBool(hit.Payload, "is_footnote"),
|
||||
FootnoteLabel: getString(hit.Payload, "footnote_label"),
|
||||
FootnoteVerbatim: getString(hit.Payload, "footnote_verbatim"),
|
||||
RefCitationUnit: getString(hit.Payload, "ref_citation_unit"),
|
||||
}
|
||||
}
|
||||
return results
|
||||
|
||||
Reference in New Issue
Block a user