diff --git a/src/app/api/simulator/[id]/execute/route.ts b/src/app/api/simulator/[id]/execute/route.ts index 48939e6..6e493c9 100644 --- a/src/app/api/simulator/[id]/execute/route.ts +++ b/src/app/api/simulator/[id]/execute/route.ts @@ -148,7 +148,7 @@ export async function POST( // 准备AI API请求 const promptContent = getPromptContent(run); const finalPrompt = `${promptContent}\n\nUser Input: ${run.userInput}`; - + let apiResponse: Response; let debugRequest: Record | null = null; let debugResponse: Record | null = null; diff --git a/src/app/simulator/page.tsx b/src/app/simulator/page.tsx index 72109dc..9058508 100644 --- a/src/app/simulator/page.tsx +++ b/src/app/simulator/page.tsx @@ -196,19 +196,19 @@ export default function SimulatorPage() {
-
+
{/* Header */}
-
-
-

{t('title')}

-

+

+
+

{t('title')}

+

{t('description')}

- - @@ -216,58 +216,58 @@ export default function SimulatorPage() { {/* Stats */} {runs.length > 0 && ( -
- +
+
- -
-
{stats.total}
-
{t('allRuns')}
+ +
+
{stats.total}
+
{t('allRuns')}
- +
- -
-
{stats.completed}
-
{t('completed')}
+ +
+
{stats.completed}
+
{t('completed')}
- +
- -
-
{stats.running}
-
{t('running')}
+ +
+
{stats.running}
+
{t('running')}
- +
- -
-
{stats.failed}
-
{t('failed')}
+ +
+
{stats.failed}
+
{t('failed')}
- +
- -
-
{stats.totalTokens.toLocaleString()}
-
{t('totalTokens')}
+ +
+
{stats.totalTokens.toLocaleString()}
+
{t('totalTokens')}
- +
- -
-
{stats.totalCost.toFixed(4)}
-
{t('totalCost')}
+ +
+
${stats.totalCost.toFixed(4)}
+
{t('totalCost')}
@@ -276,12 +276,13 @@ export default function SimulatorPage() {
{/* Filters */} - -
+ +

Filter Runs

- -
@@ -474,35 +482,45 @@ export default function SimulatorPage() { {/* Pagination */} {pagination.totalPages > 1 && ( -
+
- {[...Array(Math.min(5, pagination.totalPages))].map((_, i) => { - const page = Math.max(1, Math.min(pagination.totalPages - 4, pagination.page - 2)) + i - if (page > pagination.totalPages) return null - return ( - - ) - })} +
+ {[...Array(Math.min(5, pagination.totalPages))].map((_, i) => { + const page = Math.max(1, Math.min(pagination.totalPages - 4, pagination.page - 2)) + i + if (page > pagination.totalPages) return null + return ( + + ) + })} +
)}