refac: explain button behaviour

This commit is contained in:
Timothy J. Baek
2024-10-05 16:50:06 -07:00
parent bbbd94f69c
commit ed1a2ab5e8
2 changed files with 59 additions and 8 deletions
@@ -491,13 +491,14 @@
dispatch('update');
}}
on:explain={(e) => {
dispatch(
'submit',
`Can you explain this section to me in more detail?\n\n` +
dispatch('submit', {
parentId: message.id,
prompt:
`Can you explain this section to me in more detail?\n\n` +
'```\n' +
e.detail +
'\n```'
);
});
}}
/>
{/if}