refactor(frontend): 前端重构 V3
This commit is contained in:
1 parent
8d8b40812d
commit
ec97ea8787
80 files changed
+6887
-3733
No files matched your search
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* features/chat/api/toolRunProgress.api.ts
|
||||
* 工具运行进度查询 API(Chat 输入栏进度卡片轮询)。
|
||||
*/
|
||||
import { requestJson } from '@/shared/api/client';
|
||||
import { getAuthHeaders } from '@/shared/utils/auth';
|
||||
import type { ToolRunProgressResponse } from '../types/tool-run-progress.types';
|
||||
|
||||
export type { ToolRunProgress, ToolRunProgressResponse } from '../types/tool-run-progress.types';
|
||||
|
||||
export const getToolRunProgress = (url: string) =>
|
||||
requestJson<ToolRunProgressResponse>(url, { headers: getAuthHeaders() });
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
X,
|
||||
} from 'lucide-vue-next';
|
||||
import ToolRunProgressCard from './ToolRunProgressCard.vue';
|
||||
import type { ToolRunProgress } from '@/api/toolRunProgress';
|
||||
import type { ToolRunProgress } from '../api/toolRunProgress.api';
|
||||
import type { PendingAttachment } from '../types/shipping.types';
|
||||
|
||||
export interface ChatInputAttachmentPolicy {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { AlertCircle, CheckCircle2, Clock3, Download, Loader2 } from 'lucide-vue-next';
|
||||
import type { ToolRunProgress } from '@/api/toolRunProgress';
|
||||
import type { ToolRunProgress } from '../api/toolRunProgress.api';
|
||||
|
||||
const props = defineProps<{
|
||||
run: ToolRunProgress | null;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { computed, onBeforeUnmount, ref, type Ref, watch } from 'vue';
|
||||
import { getToolRunProgress, type ToolRunProgress } from '@/api/toolRunProgress';
|
||||
import { getToolRunProgress, type ToolRunProgress } from '../api/toolRunProgress.api';
|
||||
|
||||
export interface ToolRunProgressConfig {
|
||||
type?: string;
|
||||
|
||||
@@ -29,5 +29,7 @@ export {
|
||||
} from './composables/chat.context';
|
||||
export * from './api/chat.api';
|
||||
export * from './api/shipping.api';
|
||||
export * from './api/toolRunProgress.api';
|
||||
export type * from './types/tool-run-progress.types';
|
||||
export type * from './types/chat.types';
|
||||
export type * from './types/shipping.api.types';
|
||||
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* features/chat/types/tool-run-progress.types.ts
|
||||
* 工具运行进度 SSE/轮询接口的类型定义。
|
||||
*/
|
||||
|
||||
export interface ToolRunProgress {
|
||||
run_id: number;
|
||||
run_no: string;
|
||||
task_id?: number;
|
||||
title: string;
|
||||
status: string;
|
||||
total_count: number;
|
||||
processed_count: number;
|
||||
success_count: number;
|
||||
failed_count: number;
|
||||
skipped_count: number;
|
||||
current_step?: {
|
||||
step?: string;
|
||||
label?: string;
|
||||
row_id?: string | number | null;
|
||||
started_at?: string | null;
|
||||
processed_count?: number;
|
||||
success_count?: number;
|
||||
failed_count?: number;
|
||||
skipped_count?: number;
|
||||
} | null;
|
||||
judgement?: {
|
||||
qualified_count?: number;
|
||||
unqualified_count?: number;
|
||||
manual_count?: number;
|
||||
dify_error_count?: number;
|
||||
invalid_result_count?: number;
|
||||
};
|
||||
progress_percent: number;
|
||||
started_at?: string | null;
|
||||
finished_at?: string | null;
|
||||
duration_ms?: number | null;
|
||||
error_message?: string | null;
|
||||
excel?: {
|
||||
file_name?: string | null;
|
||||
file_size?: number | null;
|
||||
download_url?: string | null;
|
||||
};
|
||||
knowledge_base?: {
|
||||
sync_status?: string | null;
|
||||
error_message?: string | null;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ToolRunProgressResponse {
|
||||
ok: boolean;
|
||||
run: ToolRunProgress | null;
|
||||
}
|
||||
Reference in new issue
Block a user