8ccaa824dd
- Add HMAC-based file token auth for secure AI model file access - Add file upload retry with exponential backoff (max 3 retries) - File endpoint now requires session auth or signed token - Support assistant role messages in chat input - Optimistic UI for attachments on message send - Verify topic ownership before allowing messages - Switch web scraping to Firecrawl API - Agent profile page layout fixes (proper flex overflow) - Add quick switcher (Ctrl+K) to sidenav - Clean up longcat.ts and stale comments
38 lines
1.1 KiB
Vue
38 lines
1.1 KiB
Vue
<script setup lang="ts">
|
|
import Display from './Display.vue';
|
|
|
|
const props = defineProps<{
|
|
file: {
|
|
id: string;
|
|
name: string;
|
|
mimeType: string;
|
|
status: 'uploading' | 'uploaded' | 'error';
|
|
url: string;
|
|
retryCount?: number;
|
|
}
|
|
}>();
|
|
|
|
const emit = defineEmits<{
|
|
delete: [];
|
|
retry: [];
|
|
}>();
|
|
|
|
const handleDelete = async () => {
|
|
emit('delete');
|
|
};
|
|
</script>
|
|
|
|
<template>
|
|
<div class="relative h-full w-fit flex flex-shrink-0">
|
|
<Display :file="props.file" @retry="emit('retry')" />
|
|
|
|
<button @click="handleDelete"
|
|
class="absolute top-0 right-0 translate-x-1/2 -translate-y-1/2 flex items-center justify-center w-4 h-4 rounded-full bg-[var(--bg-base)] border border-[var(--color-border)] text-xs text-[#ff3b3b]">
|
|
<span class="i-mynaui-x text-3"></span>
|
|
</button>
|
|
<div v-if="file.status === 'error'"
|
|
class="absolute bottom-0 right-0 translate-x-1/4 translate-y-1/4 flex items-center justify-center w-4 h-4 rounded-full bg-red-500">
|
|
<span class="i-mynaui-danger-triangle text-2.5 text-white"></span>
|
|
</div>
|
|
</div>
|
|
</template> |