(t *testing.T, prompt []fantasy.Message)
| 3535 | } |
| 3536 | |
| 3537 | func systemPromptText(t *testing.T, prompt []fantasy.Message) string { |
| 3538 | t.Helper() |
| 3539 | |
| 3540 | var b strings.Builder |
| 3541 | for _, msg := range prompt { |
| 3542 | if msg.Role != fantasy.MessageRoleSystem { |
| 3543 | continue |
| 3544 | } |
| 3545 | for _, part := range msg.Content { |
| 3546 | textPart, ok := fantasy.AsMessagePart[fantasy.TextPart](part) |
| 3547 | if ok { |
| 3548 | _, _ = b.WriteString(textPart.Text) |
| 3549 | _, _ = b.WriteString("\n") |
| 3550 | } |
| 3551 | } |
| 3552 | } |
| 3553 | return b.String() |
| 3554 | } |
| 3555 | |
| 3556 | func TestContextFileAgentID(t *testing.T) { |
| 3557 | t.Parallel() |
no test coverage detected