first-commit
ci / Validate workspace (push) Has been cancelled
landing-page-ci / Validate landing page (push) Has been cancelled
landing-page-deploy / Deploy landing page (push) Has been cancelled
github-metrics / Generate repository metrics SVG (push) Has been cancelled
refresh-contributors-wall / Refresh contributors wall cache bust (push) Waiting to run
ci / Validate workspace (push) Has been cancelled
landing-page-ci / Validate landing page (push) Has been cancelled
landing-page-deploy / Deploy landing page (push) Has been cancelled
github-metrics / Generate repository metrics SVG (push) Has been cancelled
refresh-contributors-wall / Refresh contributors wall cache bust (push) Waiting to run
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
import type { ChatRequest } from './api/chat';
|
||||
import type { ProjectFile } from './api/files';
|
||||
import type { HealthResponse } from './api/registry';
|
||||
import type { ApiErrorResponse } from './errors';
|
||||
import type { ChatSseEvent } from './sse/chat';
|
||||
import type { ProxySseEvent } from './sse/proxy';
|
||||
|
||||
export const exampleChatRequest: ChatRequest = {
|
||||
agentId: 'claude',
|
||||
message: '## user\nCreate a design',
|
||||
systemPrompt: 'Design carefully.',
|
||||
projectId: 'project_1',
|
||||
attachments: ['brief.pdf'],
|
||||
model: 'default',
|
||||
reasoning: null,
|
||||
};
|
||||
|
||||
export const exampleProjectFile: ProjectFile = {
|
||||
name: 'index.html',
|
||||
path: 'index.html',
|
||||
type: 'file',
|
||||
size: 1024,
|
||||
mtime: 1_713_000_000,
|
||||
kind: 'html',
|
||||
mime: 'text/html',
|
||||
};
|
||||
|
||||
export const exampleChatSseEvents: ChatSseEvent[] = [
|
||||
{ event: 'start', data: { bin: 'claude', cwd: '/legacy/internal/path' } },
|
||||
{ event: 'agent', data: { type: 'text_delta', delta: 'Hello' } },
|
||||
{ event: 'stdout', data: { chunk: 'plain output' } },
|
||||
{ event: 'end', data: { code: 0 } },
|
||||
];
|
||||
|
||||
export const exampleProxySseEvents: ProxySseEvent[] = [
|
||||
{ event: 'start', data: { model: 'gpt-4o-mini' } },
|
||||
{ event: 'delta', data: { delta: 'Hello' } },
|
||||
{ event: 'end', data: { code: 0 } },
|
||||
];
|
||||
|
||||
export const exampleApiErrorResponse: ApiErrorResponse = {
|
||||
error: {
|
||||
code: 'BAD_REQUEST',
|
||||
message: 'Missing message',
|
||||
retryable: false,
|
||||
},
|
||||
};
|
||||
|
||||
export const exampleHealthResponse: HealthResponse = { ok: true, service: 'daemon' };
|
||||
Reference in New Issue
Block a user