2026-01-29 03:03:40 +08:00
|
|
|
package service
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"strings"
|
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func TestSanitizeOpenCodeText_RewritesCanonicalSentence(t *testing.T) {
|
|
|
|
|
in := "You are OpenCode, the best coding agent on the planet."
|
2026-01-31 01:40:38 +08:00
|
|
|
got := sanitizeSystemText(in)
|
2026-01-29 03:03:40 +08:00
|
|
|
require.Equal(t, strings.TrimSpace(claudeCodeSystemPrompt), got)
|
|
|
|
|
}
|