feat(agent-models): apply MEDIUM+LOW priority model migrations
- markdown-validator: deepseek-v4-pro-max → nemotron-3-nano (90% cost cut) - release-manager: glm-5.1 → kimi-k2.6 (+2 matrix, 1M context for diffs) - capability-analyst: glm-5.1 → deepseek-v4-pro-max (+4 matrix, 1M ctx) - browser-automation: qwen3-coder → deepseek-v4-flash (3× faster inference) - history-miner: nemotron-3-super → qwen3.5-122b (+14 IF, 12.4M pulls)
This commit is contained in:
@@ -102,9 +102,14 @@ async function init() {
|
||||
|
||||
// Write output
|
||||
fs.writeFileSync(OUTPUT_FILE, html);
|
||||
|
||||
|
||||
// Also write into data/ for container mount (no rebuild needed)
|
||||
const DATA_HTML_FILE = path.join(__dirname, '../data/index.html');
|
||||
fs.writeFileSync(DATA_HTML_FILE, html);
|
||||
|
||||
console.log('\n✅ Built standalone dashboard');
|
||||
console.log(' Output:', OUTPUT_FILE);
|
||||
console.log(' Also: ', DATA_HTML_FILE);
|
||||
console.log(' Agents:', Object.keys(data.agents).length);
|
||||
console.log(' Size:', (fs.statSync(OUTPUT_FILE).size / 1024).toFixed(1), 'KB');
|
||||
console.log('\n📊 Open in browser:');
|
||||
|
||||
@@ -241,14 +241,59 @@ function loadCapabilityIndex(): Record<string, AgentConfig> {
|
||||
return configs;
|
||||
}
|
||||
|
||||
// Strip JSON comments while respecting strings
|
||||
function stripJsonComments(text: string): string {
|
||||
let result = '';
|
||||
let inString = false;
|
||||
let escape = false;
|
||||
for (let i = 0; i < text.length; i++) {
|
||||
const ch = text[i];
|
||||
if (inString) {
|
||||
if (escape) {
|
||||
escape = false;
|
||||
} else if (ch === '\\') {
|
||||
escape = true;
|
||||
} else if (ch === '"') {
|
||||
inString = false;
|
||||
}
|
||||
result += ch;
|
||||
} else {
|
||||
if (ch === '"') {
|
||||
inString = true;
|
||||
result += ch;
|
||||
} else if (ch === '/' && text[i + 1] === '*') {
|
||||
i += 2;
|
||||
while (i < text.length - 1 && !(text[i] === '*' && text[i + 1] === '/')) {
|
||||
i++;
|
||||
}
|
||||
i++; // skip trailing '/'
|
||||
} else if (ch === '/' && text[i + 1] === '/') {
|
||||
while (i < text.length && text[i] !== '\n') {
|
||||
i++;
|
||||
}
|
||||
if (i < text.length) {
|
||||
result += text[i]; // keep newline
|
||||
}
|
||||
} else {
|
||||
result += ch;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// Load kilo.jsonc configuration
|
||||
function loadKiloConfig(): Record<string, AgentConfig> {
|
||||
const configs: Record<string, AgentConfig> = {};
|
||||
|
||||
try {
|
||||
const content = fs.readFileSync(KILO_CONFIG, "utf-8");
|
||||
// Remove comments for JSON parsing
|
||||
const cleaned = content.replace(/\/\*[\s\S]*?\*\/|\/\/.*/g, "");
|
||||
let cleaned = content;
|
||||
try {
|
||||
JSON.parse(content);
|
||||
} catch {
|
||||
cleaned = stripJsonComments(content);
|
||||
}
|
||||
const parsed = JSON.parse(cleaned);
|
||||
|
||||
if (parsed.agent) {
|
||||
|
||||
Reference in New Issue
Block a user