const call = (id, name, input) => ({ id, name, input });
document.querySelector('aparte-chat-bubble').setSegments([
// Running: the model asked, the handler has not answered yet.
{ id: 's1', type: 'tool_call', status: 'pending', toolCall: call('t1', 'search_docs', { query: 'release checklist' }) },
// Paused for a person (a tool marked needsApproval): the decision is asked at the composer.
{ id: 's2', type: 'tool_call', status: 'awaiting-approval', toolCall: call('t2', 'run_command', { cmd: 'pnpm publish' }) },
{ id: 's3', type: 'tool_call', status: 'resolved', toolCall: call('t3', 'read_file', { path: 'CHANGELOG.md' }), result: '## 0.19.2' },
{ id: 's4', type: 'tool_call', status: 'rejected', toolCall: call('t4', 'delete_file', { path: 'src/legacy.ts' }), result: 'The user rejected this tool call.' },
{ id: 's5', type: 'tool_call', status: 'aborted', toolCall: call('t5', 'fetch_page', { url: 'https://example.com' }) },
{ id: 's6', type: 'tool_call', status: 'failed', toolCall: call('t6', 'write_file', { path: '/etc/hosts' }), result: 'EACCES: permission denied' },
]);