Creating a modal for the assistant

This commit is contained in:
2026-09-23 17:18:04 +03:30
parent b7e3d1e290
commit 011b316b5b
2 changed files with 109 additions and 73 deletions
+7
View File
@@ -77,6 +77,12 @@ function formatTrendAmount(value: number) {
return formatMoney(value, home.value?.currency ?? 'IRR');
}
function clearAsk() {
askAnswer.value = '';
askError.value = '';
askSources.value = [];
}
async function submitAsk(preset?: string) {
const q = (preset || askQuery.value).trim();
if (!q || asking.value) return;
@@ -181,6 +187,7 @@ onUnmounted(() => {
:error="askError"
:sources="askSources"
@ask="submitAsk"
@clear="clearAsk"
/>
</div>