Commit 1201c827 by liimin

1

1 parent 7eb91810
...@@ -87,3 +87,5 @@ apps/web/ai-workspace/.ai-direct/ ...@@ -87,3 +87,5 @@ apps/web/ai-workspace/.ai-direct/
# 临时调试脚本 # 临时调试脚本
scripts/_run-*.mjs scripts/_run-*.mjs
apps/web/ai-previews/
{ {
"generator": "scripts/ai-direct-apply-output.mjs", "generator": "scripts/ai-direct-apply-output.mjs",
"generatedAt": "2026-06-05T10:34:33.913Z", "generatedAt": "2026-06-08T03:41:53.670Z",
"model": "qwen3.7-max", "model": "qwen3.7-max",
"provider": "openai-compatible", "provider": "openai-compatible",
"files": [ "files": [
...@@ -105,8 +105,8 @@ ...@@ -105,8 +105,8 @@
{ {
"path": "apps/web/ai-previews/testpage-preview/src/views/tt/index.vue", "path": "apps/web/ai-previews/testpage-preview/src/views/tt/index.vue",
"language": "vue", "language": "vue",
"purpose": "广联二手车首页 - 包含导航栏、搜索、拍卖入口、品牌、筛选标签、车辆列表和底部TabBar", "purpose": "广联二手车首页 - 包含导航栏、搜索、热搜品牌、吸顶Tab和车辆卡片列表",
"coAuthor": "@ai-co-author venus-ai-direct | openai-compatible/qwen3.7-max | 2026-06-05T09:45:21.619Z", "coAuthor": "@ai-co-author venus-ai-direct | openai-compatible/qwen3.7-max | 2026-06-08T03:39:06.097Z",
"action": "created" "action": "created"
}, },
{ {
......
...@@ -17,6 +17,15 @@ const routes = [ ...@@ -17,6 +17,15 @@ const routes = [
title: "Home", title: "Home",
}, },
} }
,
{
path: "/tt",
name: "tt",
component: () => import("@/views/tt/index.vue"),
meta: {
title: "tt",
},
},
]; ];
export function createRouter(): Router { export function createRouter(): Router {
......
...@@ -39,6 +39,9 @@ if (selected.length === 0) { ...@@ -39,6 +39,9 @@ if (selected.length === 0) {
const summary = []; const summary = [];
for (const config of selected) { for (const config of selected) {
const weight = typeof config.weight === "number" ? config.weight : 0;
let dimensionPassed = true;
for (const metric of Array.isArray(config.metrics) ? config.metrics : []) { for (const metric of Array.isArray(config.metrics) ? config.metrics : []) {
if (!shouldRunTier(metric.tier || config.tier || "fast", tier)) { if (!shouldRunTier(metric.tier || config.tier || "fast", tier)) {
continue; continue;
...@@ -51,17 +54,24 @@ for (const config of selected) { ...@@ -51,17 +54,24 @@ for (const config of selected) {
stdio: "inherit", stdio: "inherit",
}); });
const passed = status.status === 0;
if (!passed) dimensionPassed = false;
summary.push({ summary.push({
dimension: config.dimension, dimension: config.dimension,
id: metric.id, id: metric.id,
status: status.status === 0 ? "passed" : "failed", weight,
status: passed ? "passed" : "failed",
}); });
if (status.status !== 0) {
printSummary(summary);
process.exit(status.status ?? 1);
}
} }
// 记录维度级别的汇总(用于加权计算)
summary.push({
dimension: config.dimension,
id: "_dimension",
weight,
status: dimensionPassed ? "passed" : "failed",
});
} }
printSummary(summary); printSummary(summary);
...@@ -93,8 +103,37 @@ function shouldRunTier(metricTier, currentTier) { ...@@ -93,8 +103,37 @@ function shouldRunTier(metricTier, currentTier) {
} }
function printSummary(items) { function printSummary(items) {
console.log("[fitness] Summary"); const metrics = items.filter((item) => item.id !== "_dimension");
for (const item of items) { const dimensions = items.filter((item) => item.id === "_dimension");
console.log(`- ${item.dimension}/${item.id}: ${item.status}`);
console.log("\n[fitness] ── Metric Results ──");
for (const item of metrics) {
const icon = item.status === "passed" ? "✓" : "✗";
console.log(` ${icon} ${item.dimension}/${item.id}: ${item.status}`);
}
// 加权评分
console.log("\n[fitness] ── Weighted Score ──");
let totalWeight = 0;
let weightedScore = 0;
let failedDimensions = 0;
for (const dim of dimensions) {
const weight = dim.weight || 0;
const score = dim.status === "passed" ? 1 : 0;
totalWeight += weight;
weightedScore += weight * score;
const icon = dim.status === "passed" ? "✓" : "✗";
const pct = (score * 100).toFixed(0);
console.log(` ${icon} ${dim.dimension} (weight=${weight}): ${pct}%`);
if (score === 0) failedDimensions++;
}
const overallPct = totalWeight > 0 ? ((weightedScore / totalWeight) * 100).toFixed(1) : "0.0";
console.log(`\n[fitness] Overall: ${overallPct}% (${failedDimensions}/${dimensions.length} dimension(s) failed)`);
if (failedDimensions > 0) {
process.exit(1);
} }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!