Aufgabenordner: Entwicklungsbuilds nutzen tasks/ des Projekts, leere Aufgabenliste nennt Pfad und Abhilfe

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-09 12:03:09 +01:00
parent 5e0990d573
commit b140a52911
4 changed files with 66 additions and 7 deletions

View File

@ -11,6 +11,7 @@
type BatchEvent,
type LoadReport,
type ModelInfo,
type Paths,
type Ranking,
type TaskInfo,
} from "$lib/api";
@ -18,11 +19,13 @@
let {
models,
tasks,
paths,
ongotosettings,
onfinished,
}: {
models: ModelInfo[];
tasks: LoadReport | null;
paths: Paths | null;
ongotosettings: () => void;
onfinished: (batchId: number) => void;
} = $props();
@ -241,7 +244,13 @@
{#if !tasks}
<p class="muted">Lade Aufgaben …</p>
{:else if tasks.tasks.length === 0}
<p class="error">Keine gültigen Aufgaben gefunden.</p>
<div class="notice">
<strong>Keine Aufgaben gefunden.</strong>
Die App sucht sie hier: <code>{paths?.tasks_dir ?? "unbekannt"}</code>. Dort muss je Bereich ein Ordner liegen
(<code>A/</code>, <code>B/</code> …) mit den Aufgabenordnern darin. Ein installiertes Paket bringt sie nach
<code>/usr/share/coding-bench/tasks</code> mit. Sonst trage in <code>config.toml</code> den Ordner <code>tasks/</code>
des Projekts als <code>tasks_dir = "…"</code> ein und starte die App neu.
</div>
{/if}
{#each byGroup as [group, list] (group)}
<div class="group">
@ -419,6 +428,13 @@
.small {
font-size: 0.8rem;
}
.notice {
border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--border));
background: var(--accent-soft);
border-radius: 10px;
padding: 0.7rem 0.9rem;
font-size: 0.9rem;
}
.warn {
color: var(--accent);
}

View File

@ -71,7 +71,7 @@
{:else}
<!-- Reiter bleiben gemountet, damit ein laufender Batch beim Wechsel nicht abreißt. -->
<div hidden={tab !== "bench"}>
<BenchPanel {models} {tasks} ongotosettings={() => (tab = "settings")} onfinished={showResults} />
<BenchPanel {models} {tasks} {paths} ongotosettings={() => (tab = "settings")} onfinished={showResults} />
</div>
<div hidden={tab !== "results"}>
<ResultsPanel bind:selected={selectedBatch} />