api-responses.ts 777 B

12345678910111213141516171819202122232425262728293031323334
  1. export const mockStreamResponse = {
  2. type: "message_start" as const,
  3. message: {
  4. id: "msg_mock_001",
  5. type: "message" as const,
  6. role: "assistant",
  7. content: [],
  8. model: "claude-sonnet-4-20250514",
  9. stop_reason: null,
  10. stop_sequence: null,
  11. usage: { input_tokens: 100, output_tokens: 0 },
  12. },
  13. };
  14. export const mockTextBlock = {
  15. type: "content_block_start" as const,
  16. index: 0,
  17. content_block: { type: "text" as const, text: "Mock response" },
  18. };
  19. export const mockToolUseBlock = {
  20. type: "content_block_start" as const,
  21. index: 1,
  22. content_block: {
  23. type: "tool_use" as const,
  24. id: "toolu_mock_001",
  25. name: "Read",
  26. input: { file_path: "/tmp/test.txt" },
  27. },
  28. };
  29. export const mockEndEvent = {
  30. type: "message_stop" as const,
  31. };