thalamus: interactive sampling parameter controls

F5 screen now shows temperature, top_p, top_k with interactive
adjustment:
- Up/down: select parameter
- Left/right: adjust value (0.05 steps for temp/top_p, 5 for top_k)
- Updates Agent and display immediately via HotkeyAction

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
ProofOfConcept 2026-04-04 14:06:42 -04:00 committed by Kent Overstreet
parent dd009742ef
commit c2c5530ecc
3 changed files with 61 additions and 7 deletions

View file

@ -48,12 +48,23 @@ impl App {
}
lines.push(Line::raw(""));
// Sampling parameters
lines.push(Line::styled("── Sampling ──", section));
// Sampling parameters (↑/↓ select, ←/→ adjust)
lines.push(Line::styled("── Sampling (←/→ adjust) ──", section));
lines.push(Line::raw(""));
lines.push(Line::raw(format!(" temperature: {:.2}", self.temperature)));
lines.push(Line::raw(format!(" top_p: {:.2}", self.top_p)));
lines.push(Line::raw(format!(" top_k: {}", self.top_k)));
let params = [
format!("temperature: {:.2}", self.temperature),
format!("top_p: {:.2}", self.top_p),
format!("top_k: {}", self.top_k),
];
for (i, label) in params.iter().enumerate() {
let prefix = if i == self.sampling_selected { "" } else { " " };
let style = if i == self.sampling_selected {
Style::default().fg(Color::Cyan)
} else {
Style::default()
};
lines.push(Line::styled(format!("{}{}", prefix, label), style));
}
lines.push(Line::raw(""));
// Channel status from cached data