fix: UI polish and provider fixes
- Add animate-pulse CSS animation for loading states - Add Ctrl+I/Ctrl+B markdown shortcuts in chat input - Improve chat input resize with mirror element - Add reasoning duration display and shimmer effect - Add confirmation dialog for deleting all models - Simplify RowVirtualizerDynamic resize handling - Fix DialogType imports (type -> value) - Fix ollama cloud model name resolution - Make vllm auth header optional - Various icon and styling fixes
This commit is contained in:
@@ -33,29 +33,15 @@ const rowVirtualizer = useVirtualizer(computed(() => ({
|
||||
const virtualRows = computed(() => rowVirtualizer.value.getVirtualItems());
|
||||
const totalSize = computed(() => rowVirtualizer.value.getTotalSize());
|
||||
|
||||
let resizeRafId: number | undefined = undefined;
|
||||
const resizeObserver = new ResizeObserver(() => {
|
||||
if (resizeRafId) return;
|
||||
|
||||
resizeRafId = requestAnimationFrame(() => {
|
||||
resizeRafId = undefined;
|
||||
rowVirtualizer.value.measure();
|
||||
updateScrollMargin();
|
||||
});
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
resizeObserver.observe(containerRef.value!);
|
||||
window.addEventListener('resize', updateScrollMargin);
|
||||
updateScrollMargin();
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
resizeObserver.disconnect();
|
||||
window.removeEventListener('resize', updateScrollMargin);
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Keep the measure function simple
|
||||
const measureElement = (el: any) => {
|
||||
if (el) {
|
||||
rowVirtualizer.value.measureElement(el);
|
||||
@@ -75,7 +61,6 @@ watch(() => props.items, () => {
|
||||
top: 0,
|
||||
left: 0,
|
||||
width: '100%',
|
||||
minHeight: `${virtualRow.size}px`,
|
||||
transform: `translateY(${virtualRow.start - scrollMargin}px)`,
|
||||
}">
|
||||
<slot :item="props.items[virtualRow.index]" :index="virtualRow.index" />
|
||||
|
||||
Reference in New Issue
Block a user