(parts []codersdk.ChatInputPart, prompt string)
| 361 | } |
| 362 | |
| 363 | func validatePromptParts(parts []codersdk.ChatInputPart, prompt string) error { |
| 364 | if len(parts) != 1 || parts[0].Type != codersdk.ChatInputPartTypeText || parts[0].Text != prompt { |
| 365 | return xerrors.Errorf("unexpected chat message content: %#v", parts) |
| 366 | } |
| 367 | return nil |
| 368 | } |
| 369 | |
| 370 | func statusEvent(chatID uuid.UUID, status codersdk.ChatStatus) codersdk.ChatStreamEvent { |
| 371 | return codersdk.ChatStreamEvent{ |
no test coverage detected