adjust system prompt, add a toast component, add more questions to ask

This commit is contained in:
2024-09-22 03:14:28 -04:00
parent 1b2fabc50b
commit 08b56e13f3
3 changed files with 138 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
<script lang="ts">
import { fade } from 'svelte/transition';
import { createEventDispatcher } from 'svelte';
export let message: string;
export let type: 'info' | 'success' | 'warning' | 'error' = 'info';
export let duration: number = 3000;
const dispatch = createEventDispatcher();
let visible = true;
setTimeout(() => {
visible = false;
dispatch('close');
}, duration);
</script>
{#if visible}
<div class="toast toast-center z-50" transition:fade>
<div class="alert alert-{type}">
<span>{message}</span>
</div>
</div>
{/if}
<style>
.toast {
position: fixed;
bottom: 1rem;
right: 1rem;
}
</style>