Reuse prepared glossary data across stage sections
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"gitea.maximumdirect.net/eric/audita/v3/internal/core/glossary"
|
||||
"gitea.maximumdirect.net/eric/audita/v3/internal/core/schema"
|
||||
"gitea.maximumdirect.net/eric/audita/v3/internal/framework/promptcontext"
|
||||
)
|
||||
|
||||
func TestProposalContextPreservesDistinctEntries(t *testing.T) {
|
||||
@@ -13,7 +14,11 @@ func TestProposalContextPreservesDistinctEntries(t *testing.T) {
|
||||
{Collection: "spells", ID: "shield", Name: "Shield", Category: "spell", Description: "A spell"},
|
||||
{Collection: "items", ID: "shield", Name: "Shield", Category: "item", Description: "An item"},
|
||||
}
|
||||
variables, err := BuildProposalVariables(&schema.Transcript{}, entries, 0, "")
|
||||
prepared, err := promptcontext.PrepareGlossaryVariables(entries, nil)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
variables, err := buildProposalVariables(&schema.Transcript{}, prepared, 0, "")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user