CodeBench: Rust golden example — todo-rs.md + kielitietoinen valinta

- Luotu todo-rs.md golden example Rust-referenssitoteutuksesta
- getGoldenForModel() huomioi nyt LANG: todo.md → todo-rs.md Rust-moodissa
- Korjattu golden-compact-rs.md /:id → /{id} bugi
- Juurisyy: malli sai Python golden examplen mutta piti generoida Rustia
This commit is contained in:
2026-04-14 17:37:38 +03:00
parent 088bad7b21
commit 477c21efd0
3 changed files with 547 additions and 1 deletions

View File

@@ -53,6 +53,12 @@ const PROFILES = JSON.parse(readFileSync(join(__dirname, 'profiles.json'), 'utf-
function getGoldenForModel(model) {
const modelConf = PROFILES.models[model];
const goldenFile = modelConf?.golden || 'todo.md';
// Rust-kielelle vaihda .md → -rs.md (todo.md → todo-rs.md)
if (LANG === 'rust') {
const rsFile = goldenFile.replace(/\.md$/, '-rs.md');
const rsPath = join(GOLDEN_DIR, rsFile);
if (existsSync(rsPath)) return rsFile;
}
return goldenFile;
}