fix(test): set a fixed attribution to avoid system prompt mismatch

Andrey Nering created

Change summary

internal/agent/common_test.go | 7 +++++++
1 file changed, 7 insertions(+)

Detailed changes

internal/agent/common_test.go 🔗

@@ -171,6 +171,13 @@ func coderAgent(r *vcr.Recorder, env fakeEnv, large, small fantasy.LanguageModel
 		return nil, err
 	}
 
+	// NOTE(@andreynering): Set a fixed config to ensure cassettes match
+	// independently of user config on `$HOME/.config/crush/crush.json`.
+	cfg.Options.Attribution = &config.Attribution{
+		TrailerStyle:  "co-authored-by",
+		GeneratedWith: true,
+	}
+
 	systemPrompt, err := prompt.Build(context.TODO(), large.Provider(), large.Model(), *cfg)
 	if err != nil {
 		return nil, err