WIP - refresh list after AI record creation

This commit is contained in:
Francisco Gaona
2026-01-13 00:00:40 +01:00
parent d2b3fce4eb
commit a62f68fc10
3 changed files with 55 additions and 2 deletions

View File

@@ -53,6 +53,17 @@ const handleSend = async () => {
role: 'assistant',
text: response.reply || 'Let me know what else you need.',
})
if (response.action === 'create_record') {
window.dispatchEvent(
new CustomEvent('ai-record-created', {
detail: {
objectApiName: buildContext().objectApiName,
record: response.record,
},
}),
)
}
} catch (error: any) {
console.error('Failed to send AI chat message:', error)
messages.value.push({