summaryrefslogtreecommitdiff
path: root/internal/hexaiaction
diff options
context:
space:
mode:
Diffstat (limited to 'internal/hexaiaction')
-rw-r--r--internal/hexaiaction/parse_test.go18
-rw-r--r--internal/hexaiaction/prompts_more_test.go20
2 files changed, 25 insertions, 13 deletions
diff --git a/internal/hexaiaction/parse_test.go b/internal/hexaiaction/parse_test.go
index ba5cd96..40ddd9a 100644
--- a/internal/hexaiaction/parse_test.go
+++ b/internal/hexaiaction/parse_test.go
@@ -81,14 +81,16 @@ func (f *fakeClient) DefaultModel() string { return "m" }
func TestRuners_Prompts(t *testing.T) {
cfg := appconfig.App{
- PromptCodeActionRewriteSystem: "SYS-R",
- PromptCodeActionRewriteUser: "R {{instruction}} :: {{selection}}",
- PromptCodeActionDiagnosticsSystem: "SYS-D",
- PromptCodeActionDiagnosticsUser: "D {{diagnostics}} :: {{selection}}",
- PromptCodeActionDocumentSystem: "SYS-C",
- PromptCodeActionDocumentUser: "C {{selection}}",
- PromptCodeActionGoTestSystem: "SYS-T",
- PromptCodeActionGoTestUser: "T {{function}}",
+ PromptConfig: appconfig.PromptConfig{
+ PromptCodeActionRewriteSystem: "SYS-R",
+ PromptCodeActionRewriteUser: "R {{instruction}} :: {{selection}}",
+ PromptCodeActionDiagnosticsSystem: "SYS-D",
+ PromptCodeActionDiagnosticsUser: "D {{diagnostics}} :: {{selection}}",
+ PromptCodeActionDocumentSystem: "SYS-C",
+ PromptCodeActionDocumentUser: "C {{selection}}",
+ PromptCodeActionGoTestSystem: "SYS-T",
+ PromptCodeActionGoTestUser: "T {{function}}",
+ },
}
f := &fakeClient{out: "```\nDONE\n```"}
ctx := context.Background()
diff --git a/internal/hexaiaction/prompts_more_test.go b/internal/hexaiaction/prompts_more_test.go
index a4410e5..844bafe 100644
--- a/internal/hexaiaction/prompts_more_test.go
+++ b/internal/hexaiaction/prompts_more_test.go
@@ -33,10 +33,14 @@ func TestRunOnce_StripsFences(t *testing.T) {
func TestReqOptsFrom_Override(t *testing.T) {
cfg := appconfig.App{
- MaxTokens: 123,
- Provider: "openai",
- AnthropicModel: "claude-3-5-sonnet",
- CodeActionConfigs: []appconfig.SurfaceConfig{{Provider: "anthropic", Model: "override", Temperature: ptrFloat(0.6)}},
+ CoreConfig: appconfig.CoreConfig{
+ MaxTokens: 123,
+ Provider: "openai",
+ },
+ ProviderConfig: appconfig.ProviderConfig{
+ AnthropicModel: "claude-3-5-sonnet",
+ CodeActionConfigs: []appconfig.SurfaceConfig{{Provider: "anthropic", Model: "override", Temperature: ptrFloat(0.6)}},
+ },
}
req := reqOptsFrom(cfg)
if req.model != "override" {
@@ -52,7 +56,13 @@ func TestReqOptsFrom_Override(t *testing.T) {
}
func TestReqOptsFrom_Gpt5Temp(t *testing.T) {
- cfg := appconfig.App{Provider: "openai", CodingTemperature: ptrFloat(0.2), OpenAIModel: "gpt-5.0"}
+ cfg := appconfig.App{
+ CoreConfig: appconfig.CoreConfig{
+ Provider: "openai",
+ CodingTemperature: ptrFloat(0.2),
+ },
+ ProviderConfig: appconfig.ProviderConfig{OpenAIModel: "gpt-5.0"},
+ }
req := reqOptsFrom(cfg)
var opts llm.Options
for _, o := range req.options {