mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-11 03:39:49 +08:00
refactor: 重构异步任务系统和计费服务架构
- 重构任务系统:新增 lifecycle (TaskStatus/BillingStatus)、context、application 模块 - 将 video tasks 泛化为 async tasks,支持更通用的异步任务管理 - 新增 Gemini Files 管理模块和管理界面 - 重构 billing 服务:拆分 schema.py 和 service.py - 新增 candidate 服务模块用于请求候选管理 - 数据库迁移:添加 billing_status、request_id、gemini_file_mappings 表和索引 - 移除废弃的 video_telemetry、task orchestrator 等模块
This commit is contained in:
@@ -55,6 +55,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-1 shrink-0">
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
:title="provider.enable_format_conversion ? '已启用格式转换(点击关闭)' : '启用格式转换'"
|
||||
:class="provider.enable_format_conversion ? 'text-primary' : ''"
|
||||
@click="toggleFormatConversion"
|
||||
>
|
||||
<Shuffle class="w-4 h-4" />
|
||||
</Button>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
@@ -502,7 +511,8 @@ import {
|
||||
Power,
|
||||
GripVertical,
|
||||
Copy,
|
||||
Shield
|
||||
Shield,
|
||||
Shuffle
|
||||
} from 'lucide-vue-next'
|
||||
import { useEscapeKey } from '@/composables/useEscapeKey'
|
||||
import Button from '@/components/ui/button.vue'
|
||||
@@ -511,7 +521,7 @@ import Card from '@/components/ui/card.vue'
|
||||
import { useToast } from '@/composables/useToast'
|
||||
import { useClipboard } from '@/composables/useClipboard'
|
||||
import { useCountdownTimer, formatCountdown } from '@/composables/useCountdownTimer'
|
||||
import { getProvider, getProviderEndpoints } from '@/api/endpoints'
|
||||
import { getProvider, getProviderEndpoints, updateProvider } from '@/api/endpoints'
|
||||
import {
|
||||
KeyFormDialog,
|
||||
KeyAllowedModelsEditDialog,
|
||||
@@ -702,6 +712,20 @@ function handleClose() {
|
||||
}
|
||||
}
|
||||
|
||||
// 切换格式转换开关
|
||||
async function toggleFormatConversion() {
|
||||
if (!provider.value) return
|
||||
const newValue = !provider.value.enable_format_conversion
|
||||
try {
|
||||
await updateProvider(provider.value.id, { enable_format_conversion: newValue })
|
||||
provider.value.enable_format_conversion = newValue
|
||||
showSuccess(newValue ? '已启用格式转换' : '已禁用格式转换')
|
||||
emit('refresh')
|
||||
} catch {
|
||||
showError('切换格式转换失败')
|
||||
}
|
||||
}
|
||||
|
||||
// 显示端点管理对话框
|
||||
function showAddEndpointDialog() {
|
||||
endpointDialogOpen.value = true
|
||||
|
||||
Reference in New Issue
Block a user