Initial commit: Go agentic harness extracted from Felix

This commit is contained in:
sausheong committed 2026-05-07 11:31:42 +08:00
commit 1f2c471ff9
89 files changed
+19388

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
package gemini
import (
"testing"
"github.com/stretchr/testify/require"
"github.com/sausheong/harness/llm"
)
func TestGeminiResolveSystemPromptPrefersParts(t *testing.T) {
got := geminiResolveSystemPrompt(llm.ChatRequest{
SystemPrompt: "legacy",
SystemPromptParts: []llm.SystemPromptPart{{Text: "alpha"}, {Text: "beta"}},
})
require.Equal(t, "alpha\nbeta", got)
}
func TestGeminiResolveSystemPromptFallsBackToString(t *testing.T) {
got := geminiResolveSystemPrompt(llm.ChatRequest{SystemPrompt: "only-string"})
require.Equal(t, "only-string", got)
}
func TestGeminiResolveSystemPromptEmpty(t *testing.T) {
got := geminiResolveSystemPrompt(llm.ChatRequest{})
require.Equal(t, "", got)
}