streaming, markdown, model selecting, and lots more

This commit is contained in:
Zoe
2026-02-02 23:16:06 -06:00
parent 8c28946703
commit d5a5945c03
114 changed files with 6109 additions and 2938 deletions
+14 -14
View File
@@ -1,18 +1,18 @@
import { onMounted, onUnmounted } from 'vue'
import type { Ref } from 'vue'
import type { Ref } from 'vue';
import { onMounted, onUnmounted } from 'vue';
export const useClickOutside = (target: Ref<HTMLElement | null>, callback: () => void) => {
const onClick = (event: MouseEvent) => {
if (target.value && !target.value.contains(event.target as Node)) {
callback()
}
}
const onClick = (event: MouseEvent) => {
if (target.value && !target.value.contains(event.target as Node)) {
callback();
}
};
onMounted(() => {
document.addEventListener('click', onClick)
})
onMounted(() => {
document.addEventListener('click', onClick);
});
onUnmounted(() => {
document.removeEventListener('click', onClick)
})
}
onUnmounted(() => {
document.removeEventListener('click', onClick);
});
};