Synced from monorepo
Changes: - Persist submitter identity for /feedback - Let custom models use rotating tokens from named auth providers - Template stale tool/param name literals in server-native descriptions - Minimal mode commits thinking in full, lookups as one-liners - Tighten durable append internals - Nudge model to end turn on no-op bash commands - Per-fetch signing nonce in the managed-config envelope, with a server-side replay probe - Include working tree in startup status
This commit is contained in:
parent
ba76b0a683
commit
a881e6703f
140 changed files with 6746 additions and 2377 deletions
|
|
@ -148,7 +148,10 @@ fn row_idx_for(state: &SettingsModalState, target: &str) -> usize {
|
|||
state
|
||||
.rows
|
||||
.iter()
|
||||
.position(|r| matches!(r, RowEntry::Setting { key, .. } if *key == target))
|
||||
.position(|r| {
|
||||
matches!(r, RowEntry::Setting { key, .. }
|
||||
if *key == target)
|
||||
})
|
||||
.unwrap_or_else(|| panic!("setting `{target}` not present in modal rows"))
|
||||
}
|
||||
|
||||
|
|
@ -2146,10 +2149,10 @@ fn d_key_emits_open_reset_confirm_for_every_setting() {
|
|||
// without key-release reporting, which tests run without). Skip settings
|
||||
// with no visible row; their reset path is covered by the dispatch
|
||||
// round-trip tests.
|
||||
let has_row = s
|
||||
.rows
|
||||
.iter()
|
||||
.any(|r| matches!(r, RowEntry::Setting { key, .. } if *key == meta.key));
|
||||
let has_row = s.rows.iter().any(|r| {
|
||||
matches!(r, RowEntry::Setting { key, .. }
|
||||
if *key == meta.key)
|
||||
});
|
||||
if !has_row {
|
||||
continue;
|
||||
}
|
||||
|
|
@ -3031,7 +3034,8 @@ fn pr6_permission_mode_picker_enter_dispatches_set_permission_mode_commit() {
|
|||
let _ = handle_settings_key(&mut s, &press(KeyCode::Enter));
|
||||
|
||||
assert!(
|
||||
matches!(s.mode(), SettingsModalMode::PickingEnum { key, .. } if key == "permission_mode"),
|
||||
matches!(s.mode(), SettingsModalMode::PickingEnum { key, .. }
|
||||
if key == "permission_mode"),
|
||||
"Enter on permission_mode row must open the picker, got {:?}",
|
||||
s.mode(),
|
||||
);
|
||||
|
|
@ -3312,7 +3316,8 @@ fn pr11_picker_commit_for_default_dispatches_set_permission_mode_default() {
|
|||
navigate_to(&mut s, "permission_mode");
|
||||
let _ = handle_settings_key(&mut s, &press(KeyCode::Enter));
|
||||
assert!(
|
||||
matches!(s.mode(), SettingsModalMode::PickingEnum { key, .. } if key == "permission_mode"),
|
||||
matches!(s.mode(), SettingsModalMode::PickingEnum { key, .. }
|
||||
if key == "permission_mode"),
|
||||
"Enter on permission_mode row must open the picker, got {:?}",
|
||||
s.mode(),
|
||||
);
|
||||
|
|
@ -3357,7 +3362,8 @@ fn pr11_picker_commit_for_ask_dispatches_set_permission_mode_ask() {
|
|||
navigate_to(&mut s, "permission_mode");
|
||||
let _ = handle_settings_key(&mut s, &press(KeyCode::Enter));
|
||||
assert!(
|
||||
matches!(s.mode(), SettingsModalMode::PickingEnum { key, .. } if key == "permission_mode"),
|
||||
matches!(s.mode(), SettingsModalMode::PickingEnum { key, .. }
|
||||
if key == "permission_mode"),
|
||||
"Enter on permission_mode row must open the picker, got {:?}",
|
||||
s.mode(),
|
||||
);
|
||||
|
|
@ -4221,7 +4227,8 @@ fn pr14_default_model_picker_commits_resolved_model_id() {
|
|||
"Enter on DynamicEnum row must transition to PickingEnum, got {outcome:?}"
|
||||
);
|
||||
assert!(
|
||||
matches!(s.mode(), SettingsModalMode::PickingEnum { key, .. } if key == "default_model"),
|
||||
matches!(s.mode(), SettingsModalMode::PickingEnum { key, .. }
|
||||
if key == "default_model"),
|
||||
"Enter must transition to PickingEnum for default_model"
|
||||
);
|
||||
|
||||
|
|
@ -4336,7 +4343,8 @@ fn pr14_mouse_click_on_dynamic_enum_row_opens_picker() {
|
|||
"second click on DynamicEnum row must open picker, got {outcome:?}",
|
||||
);
|
||||
assert!(
|
||||
matches!(s.mode(), SettingsModalMode::PickingEnum { key, .. } if key == "default_model"),
|
||||
matches!(s.mode(), SettingsModalMode::PickingEnum { key, .. }
|
||||
if key == "default_model"),
|
||||
"second click on DynamicEnum row must transition to PickingEnum, got {:?}",
|
||||
s.mode(),
|
||||
);
|
||||
|
|
@ -4380,7 +4388,8 @@ fn pr8_mouse_click_on_int_row_opens_editor() {
|
|||
"second click on Int row must be Changed, got {outcome:?}",
|
||||
);
|
||||
assert!(
|
||||
matches!(s.mode(), SettingsModalMode::EditingValue { key, .. } if key == "max_thoughts_width"),
|
||||
matches!(s.mode(), SettingsModalMode::EditingValue { key, .. }
|
||||
if key == "max_thoughts_width"),
|
||||
"second click on Int row must transition to EditingValue, got {:?}",
|
||||
s.mode(),
|
||||
);
|
||||
|
|
@ -6880,7 +6889,8 @@ fn scroll_speed_mouse_click_opens_editor() {
|
|||
"second click on focused Int row must enter the editor, got {outcome:?}"
|
||||
);
|
||||
assert!(
|
||||
matches!(s.mode(), SettingsModalMode::EditingValue { key, .. } if key == "scroll_speed"),
|
||||
matches!(s.mode(), SettingsModalMode::EditingValue { key, .. }
|
||||
if key == "scroll_speed"),
|
||||
"mode must be EditingValue(scroll_speed) after Enter-equivalent click, got {:?}",
|
||||
s.mode(),
|
||||
);
|
||||
|
|
@ -7070,7 +7080,8 @@ fn scroll_lines_mouse_click_opens_editor() {
|
|||
"second click on focused Int row must enter the editor, got {outcome:?}"
|
||||
);
|
||||
assert!(
|
||||
matches!(s.mode(), SettingsModalMode::EditingValue { key, .. } if key == "scroll_lines"),
|
||||
matches!(s.mode(), SettingsModalMode::EditingValue { key, .. }
|
||||
if key == "scroll_lines"),
|
||||
"mode must be EditingValue(scroll_lines), got {:?}",
|
||||
s.mode(),
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue