feat(tui): expose current model in turn metadata
This commit is contained in:
@@ -1206,7 +1206,10 @@ impl Engine {
|
||||
.map(|s| s.trim().to_string())
|
||||
.filter(|s| !s.is_empty());
|
||||
|
||||
let mut lines = vec![format!("Current local date: {today}")];
|
||||
let mut lines = vec![
|
||||
format!("Current local date: {today}"),
|
||||
format!("Current model: {routed_model}"),
|
||||
];
|
||||
if auto_model {
|
||||
lines.push(format!("Auto model route: {routed_model}"));
|
||||
}
|
||||
|
||||
@@ -1877,6 +1877,7 @@ fn working_set_reaches_model_as_turn_metadata() {
|
||||
fn turn_metadata_includes_current_local_date_without_working_set() {
|
||||
let tmp = tempdir().expect("tempdir");
|
||||
let config = EngineConfig {
|
||||
model: "deepseek-v4-flash".to_string(),
|
||||
workspace: tmp.path().to_path_buf(),
|
||||
..Default::default()
|
||||
};
|
||||
@@ -1896,6 +1897,7 @@ fn turn_metadata_includes_current_local_date_without_working_set() {
|
||||
let today = chrono::Local::now().format("%Y-%m-%d").to_string();
|
||||
assert!(text.starts_with("<turn_meta>\n"));
|
||||
assert!(text.contains(&format!("Current local date: {today}")));
|
||||
assert!(text.contains("Current model: deepseek-v4-flash"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -1919,6 +1921,7 @@ fn turn_metadata_includes_auto_model_route() {
|
||||
panic!("expected text metadata block");
|
||||
};
|
||||
|
||||
assert!(text.contains("Current model: deepseek-v4-pro"));
|
||||
assert!(text.contains("Auto model route: deepseek-v4-pro"));
|
||||
assert!(text.contains("Auto reasoning effort: max"));
|
||||
assert!(!text.contains("debug this regression"));
|
||||
|
||||
@@ -9,6 +9,10 @@ Model selection is separate. `--model auto` and `/model auto` route each turn to
|
||||
a concrete model and thinking level; they are not TUI modes and are not part of
|
||||
the `Tab` cycle.
|
||||
|
||||
Each user turn includes a small `<turn_meta>` block with the current local date
|
||||
and the concrete model sent to the provider. When `--model auto` is active, the
|
||||
same block also records that the model was auto-routed.
|
||||
|
||||
## TUI Modes
|
||||
|
||||
Press `Tab` to complete composer menus, queue a draft as a next-turn follow-up
|
||||
|
||||
Reference in New Issue
Block a user