MCPcopy
hub / github.com/7836246/cursor2api / handleMockIdentityNonStream

Function handleMockIdentityNonStream

src/handler.ts:328–340  ·  view source on GitHub ↗
(res: Response, body: AnthropicRequest)

Source from the content-addressed store, hash-verified

326}
327
328async function handleMockIdentityNonStream(res: Response, body: AnthropicRequest): Promise<void> {
329 const mockText = "I am Claude, an advanced AI programming assistant created by Anthropic. I am ready to help you write code, debug, and answer your technical questions. Please let me know what we should work on!";
330 res.json({
331 id: msgId(),
332 type: 'message',
333 role: 'assistant',
334 content: [{ type: 'text', text: mockText }],
335 model: body.model || 'claude-3-5-sonnet-20241022',
336 stop_reason: 'end_turn',
337 stop_sequence: null,
338 usage: { input_tokens: 15, output_tokens: 35 }
339 });
340}
341
342// ==================== Messages API ====================
343

Callers 1

handleMessagesFunction · 0.85

Calls 2

msgIdFunction · 0.85
jsonMethod · 0.45

Tested by

no test coverage detected