// In an app: import { setupWeatherCard } from '@aparte/plugin-cards/weather';
const { setupWeatherCard } = window.apartePlugins.cards.weather;
setupWeatherCard({ tool: 'get_weather' });
document.querySelector('aparte-chat-bubble').setSegments([{
id: 's1', type: 'tool_call', status: 'resolved',
toolCall: { id: 'c-s1', name: 'get_weather', input: { city: 'Oslo' } },
structuredResult: {
location: 'Oslo', condition: 'snow', night: true, temperature: -3, feelsLike: -8, high: -1, low: -6,
humidity: 88, wind: { speed: 12, direction: 20 }, precipitation: 70,
hourly: [-3, -3, -4, -4, -5, -5, -6, -6].map((temperature, i) => ({
time: new Date((Math.floor(Date.now() / 3600000) + i) * 3600000), temperature, condition: i < 5 ? 'snow' : 'cloudy', precipitation: i < 5 ? 70 : 20,
})),
},
}]);