// In an app: import { setupPlanCard } from '@aparte/plugin-cards/plan';
const { setupPlanCard } = window.apartePlugins.cards.plan;
setupPlanCard({ tool: 'update_plan' });
const viewport = document.querySelector('aparte-chat-viewport');
viewport.appendMessage({ id: 'u1', role: 'user', content: 'Can you publish the 2.4 release notes?', timestamp: Date.now() });
viewport.appendMessage({ id: 'a1', role: 'assistant', timestamp: Date.now(), segments: [{
id: 's1', type: 'tool_call', status: 'resolved',
toolCall: { id: 'c-s1', name: 'update_plan', input: {} },
structuredResult: {
title: 'Publish the 2.4 release notes',
steps: [
{ title: 'Read the merged pull requests', status: 'done' },
{ title: 'Group the changes by package', status: 'done' },
{ title: 'Write the notes', activeForm: 'Writing the notes', status: 'in-progress' },
{ title: 'Check every link', status: 'pending' },
{ title: 'Publish to the changelog', status: 'pending' },
],
},
}] });