Separate glossary context from prompt protection
This commit is contained in:
@@ -40,6 +40,7 @@ func TestExecuteModuleProposalBuildsMessagesFromSectionAndDescription(t *testing
|
||||
Settings: cfg,
|
||||
WorkingTranscript: transcript,
|
||||
Glossary: glossary,
|
||||
ProtectedTerms: []domain.Term{{Spelling: "Separate protection"}},
|
||||
Section: §ion,
|
||||
},
|
||||
RunSpec: contracts.ModuleRunSpec{
|
||||
@@ -76,6 +77,9 @@ func TestExecuteModuleProposalBuildsMessagesFromSectionAndDescription(t *testing
|
||||
if len(client.calls) != 1 || client.calls[0].PromptID != prompts.PromptIDModuleGrammarProposal || client.calls[0].Context.SectionIndex == nil || *client.calls[0].Context.SectionIndex != 7 {
|
||||
t.Fatalf("unexpected stage name calls: %+v", client.calls)
|
||||
}
|
||||
if got := client.calls[0].Variables["ProtectedTermsJSON"]; got != `["Separate protection"]` {
|
||||
t.Fatalf("protected spellings = %s", got)
|
||||
}
|
||||
if len(out.Proposals) != 1 || out.Proposals[0].CorrectedText != "the" {
|
||||
t.Fatalf("unexpected proposals: %+v", out)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user