mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-31 00:22:30 +00:00
feat: Enhance AI Assistant with new actions and context handling
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { ref } from "vue";
|
||||
|
||||
const message = ref("");
|
||||
const visible = ref(false);
|
||||
let timer = 0;
|
||||
|
||||
export function useToast() {
|
||||
function toast(msg: string, duration = 2000) {
|
||||
message.value = msg;
|
||||
visible.value = true;
|
||||
clearTimeout(timer);
|
||||
timer = window.setTimeout(() => { visible.value = false; }, duration);
|
||||
}
|
||||
|
||||
return { message, visible, toast };
|
||||
}
|
||||
Reference in New Issue
Block a user