first pass of merging in warp (doesn't build)

This commit is contained in:
Ryan Ward
2026-07-01 16:08:58 -05:00
parent 2f64909469
commit 4770ac06b5
3662 changed files with 414574 additions and 89772 deletions
+117 -20
View File
@@ -1,28 +1,28 @@
use std::time::Duration;
use galaxy::integration_testing::terminal::util::current_shell_starter_and_version;
use galaxy::terminal::shell::ShellType;
use galaxy::{
features::FeatureFlag,
integration_testing::{
clipboard::write_to_clipboard,
input::{
assert_autosuggestion_state, input_contains_string, input_is_empty,
latest_buffer_operations_are_empty, tab_completions_menu_is_open, AutosuggestionState,
},
step::new_step_with_default_assertions,
terminal::{
execute_command_for_single_terminal_in_tab, util::ExpectedExitStatus,
wait_until_bootstrapped_single_pane_for_tab,
},
view_getters::{single_input_view_for_tab, single_terminal_view_for_tab},
},
use warp::features::FeatureFlag;
use warp::integration_testing::clipboard::write_to_clipboard;
use warp::integration_testing::input::{
assert_autosuggestion_state, input_contains_string, input_is_empty,
latest_buffer_operations_are_empty, open_inline_model_selector_from_chip,
tab_completions_menu_is_open, toggle_inline_model_selector_from_chip, AutosuggestionState,
};
use galaxyui::{async_assert_eq, integration::TestStep, Event};
use crate::Builder;
use warp::integration_testing::step::new_step_with_default_assertions;
use warp::integration_testing::terminal::util::{
current_shell_starter_and_version, ExpectedExitStatus,
};
use warp::integration_testing::terminal::{
execute_command_for_single_terminal_in_tab, wait_until_bootstrapped_single_pane_for_tab,
};
use warp::integration_testing::view_getters::{
single_input_view_for_tab, single_terminal_view_for_tab,
};
use warp::terminal::shell::ShellType;
use galaxyui_core::integration::TestStep;
use galaxyui_core::{async_assert_eq, Event};
use super::new_builder;
use crate::Builder;
/// Ensures that tab completions are hidden when the completions menu is opened
/// but re-appear when the menu is closed.
@@ -87,6 +87,103 @@ pub fn test_autosuggestions_are_hidden_when_opening_tab_completions() -> Builder
)
}
pub fn test_inline_model_selector_restores_prompt_on_dismissal() -> Builder {
FeatureFlag::RestorePromptOnInlineModelSelectorSearch.set_enabled(true);
let original_prompt = "explain this tricky rust lifetime";
new_builder()
.with_step(wait_until_bootstrapped_single_pane_for_tab(0))
.with_step(
new_step_with_default_assertions("Type prompt before opening model selector")
.with_typed_characters(&[original_prompt])
.add_named_assertion(
"Prompt is present before opening selector",
input_contains_string(0, original_prompt.to_owned()),
),
)
.with_step(open_inline_model_selector_from_chip())
.with_step(
new_step_with_default_assertions("Type model search")
.with_typed_characters(&["claude"])
.add_named_assertion(
"Model search text is in the input",
input_contains_string(0, "claude".to_owned()),
),
)
.with_step(
new_step_with_default_assertions("Dismiss model selector")
.with_keystrokes(&["escape"])
.add_named_assertion(
"Original prompt is restored after dismissal",
input_contains_string(0, original_prompt.to_owned()),
),
)
}
pub fn test_inline_model_selector_restores_prompt_on_model_selection() -> Builder {
FeatureFlag::RestorePromptOnInlineModelSelectorSearch.set_enabled(true);
let original_prompt = "summarize this output without losing details";
new_builder()
.with_step(wait_until_bootstrapped_single_pane_for_tab(0))
.with_step(
new_step_with_default_assertions("Type prompt before opening model selector")
.with_typed_characters(&[original_prompt])
.add_named_assertion(
"Prompt is present before opening selector",
input_contains_string(0, original_prompt.to_owned()),
),
)
.with_step(open_inline_model_selector_from_chip())
.with_step(
new_step_with_default_assertions("Type model search")
.with_typed_characters(&["auto"])
.add_named_assertion(
"Model search text is in the input",
input_contains_string(0, "auto".to_owned()),
),
)
.with_step(
new_step_with_default_assertions("Select highlighted model")
.with_keystrokes(&["enter"])
.add_named_assertion(
"Original prompt is restored after model selection",
input_contains_string(0, original_prompt.to_owned()),
),
)
}
pub fn test_inline_model_selector_restores_prompt_on_chip_toggle_close() -> Builder {
FeatureFlag::RestorePromptOnInlineModelSelectorSearch.set_enabled(true);
let original_prompt = "refactor this into smaller modules";
new_builder()
.with_step(wait_until_bootstrapped_single_pane_for_tab(0))
.with_step(
new_step_with_default_assertions("Type prompt before opening model selector")
.with_typed_characters(&[original_prompt])
.add_named_assertion(
"Prompt is present before opening selector",
input_contains_string(0, original_prompt.to_owned()),
),
)
.with_step(open_inline_model_selector_from_chip())
.with_step(
new_step_with_default_assertions("Type model search")
.with_typed_characters(&["claude"])
.add_named_assertion(
"Model search text is in the input",
input_contains_string(0, "claude".to_owned()),
),
)
.with_step(
toggle_inline_model_selector_from_chip().add_named_assertion(
"Original prompt is restored after toggling closed",
input_contains_string(0, original_prompt.to_owned()),
),
)
}
pub fn test_latest_buffer_operations() -> Builder {
new_builder()
.with_step(wait_until_bootstrapped_single_pane_for_tab(0))