Skip to content

Commit 01e25b5

Browse files
committed
feat: update community page to show strategies
1 parent ad993aa commit 01e25b5

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

community.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
class="px-4 py-3 text-left text-sm font-semibold text-zinc-700 dark:text-zinc-300 border-r-2 border-zinc-300 dark:border-zinc-600">
3636
#</th>
3737
<!-- Strategy Section -->
38-
<th class="px-4 py-3 text-center text-sm font-semibold text-zinc-700 dark:text-zinc-300">Strategy</th>
3938
<th
4039
class="px-4 py-3 text-center text-sm font-semibold text-zinc-700 dark:text-zinc-300 hidden lg:table-cell">
4140
Author</th>
41+
<th class="px-4 py-3 text-center text-sm font-semibold text-zinc-700 dark:text-zinc-300">Strategy</th>
4242
<!-- Stats Section -->
4343
<th
4444
class="px-4 py-3 text-center text-sm font-semibold text-zinc-700 dark:text-zinc-300 border-l-2 border-zinc-300 dark:border-zinc-600">

script.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function getDataPaths(version) {
5656
return {
5757
manifestPath: 'data/benchmarks/strategies/manifest.json',
5858
leaderboardPath: `data/benchmarks/strategies/${version}/openai/gpt-oss-20b/leaderboard.json`,
59-
detailBasePath: `data/benchmarks/strategies/${version}/openai/gpt-oss-20b/default`
59+
detailBasePath: `data/benchmarks/strategies/${version}/openai/gpt-oss-20b`
6060
};
6161
} else {
6262
return {
@@ -729,9 +729,9 @@ function createDetailRow(stats, modelName, data, vendor, model, basePath, strate
729729
const reqId = '00001';
730730
let probeUrl;
731731
if (PAGE_TYPE === 'community' && strategy) {
732-
// For strategies: probe at basePath/model/runId/request-*.json
732+
// For strategies: probe at basePath/strategy/model/runId/request-*.json
733733
probeUrl =
734-
`${basePath}/${model}/${runId}/request-${reqId}/tool_call.json`;
734+
`${basePath}/${strategy}/${model}/${runId}/request-${reqId}/tool_call.json`;
735735
} else {
736736
// For models: probe at basePath/vendor/model/runId/request-*.json
737737
probeUrl =
@@ -789,9 +789,9 @@ async function loadLeaderboard(leaderboardPath, detailBasePath, displayMode = 'm
789789
model = modelParts[1];
790790

791791
if (displayMode === 'community') {
792-
// For strategies: show strategy name as primary, author as secondary
793-
primaryValue = entry.strategy.name;
794-
secondaryValue = entry.strategy.author;
792+
// For strategies: show author as primary, strategy name as secondary
793+
primaryValue = entry.strategy.author;
794+
secondaryValue = entry.strategy.name;
795795
} else {
796796
// For models: show model name as primary, vendor as secondary
797797
primaryValue = model;
@@ -1017,8 +1017,8 @@ async function loadAndRenderRequest(state) {
10171017
const reqId = formatRequestId(index);
10181018
let runBase;
10191019
if (PAGE_TYPE === 'community' && strategy) {
1020-
// For strategies: construct path as basePath/model/runId/request-*
1021-
runBase = `${basePath}/${model}/${runId}/request-${reqId}`;
1020+
// For strategies: construct path as basePath/strategy/model/runId/request-*
1021+
runBase = `${basePath}/${strategy}/${model}/${runId}/request-${reqId}`;
10221022
} else {
10231023
// For models: construct path as basePath/vendor/model/runId/request-*
10241024
runBase = `${basePath}/${vendor}/${model}/${runId}/request-${reqId}`;
@@ -1075,9 +1075,9 @@ async function navigateRun(state, delta) {
10751075
const reqId = formatRequestId(state.index);
10761076
let probe;
10771077
if (PAGE_TYPE === 'community' && state.strategy) {
1078-
// For strategies: construct path as basePath/model/runId/request-*
1078+
// For strategies: construct path as basePath/strategy/model/runId/request-*
10791079
probe =
1080-
`${state.basePath}/${state.model}/${state.runId}/request-${reqId}/tool_call.json`;
1080+
`${state.basePath}/${state.strategy}/${state.model}/${state.runId}/request-${reqId}/tool_call.json`;
10811081
} else {
10821082
// For models: construct path as basePath/vendor/model/runId/request-*
10831083
probe =

0 commit comments

Comments
 (0)