Fix build warnings across workspace

- Remove redundant token fields from StreamEvent::Finished (data
  already delivered via Usage event)
- Remove dead hotkey_adjust_sampling, MAX_HISTORY, now()
- Fix unused variable warnings (delta, log)
- Suppress deserialization-only field warnings (jsonrpc, role)
- Make start_stream/chat_completion_stream_temp pub(crate)
- Remove unnecessary pub(crate) re-export of internal types

Remaining warnings are TODO items: SkipIndex (scoring not wired),
notify (MCP notifications not wired).

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-04-07 13:55:30 -04:00
parent c64295ddb2
commit 9737641c86
10 changed files with 11 additions and 42 deletions

View file

@ -263,17 +263,6 @@ fn hotkey_cycle_autonomy(mind: &crate::mind::Mind) {
}
}
fn hotkey_adjust_sampling(mind: &crate::mind::Mind, param: usize, delta: f32) {
if let Ok(mut ag) = mind.agent.try_lock() {
match param {
0 => ag.temperature = (ag.temperature + delta).clamp(0.0, 2.0),
1 => ag.top_p = (ag.top_p + delta).clamp(0.0, 1.0),
2 => ag.top_k = (ag.top_k as f32 + delta).max(0.0) as u32,
_ => {}
}
}
}
/// Returns true if this is an event the main loop handles (F-keys, Ctrl combos, resize).
fn is_global_event(event: &ratatui::crossterm::event::Event) -> bool {
use ratatui::crossterm::event::{Event, KeyCode, KeyModifiers, KeyEventKind};