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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user