Project Diff 2 (#23891)
This adds a new version of the project diff editor to go alongside the new git panel. The basics seem to be working, but still todo: * [ ] Fix untracked files * [ ] Fix deleted files * [ ] Show commit message editor at top * [x] Handle empty state * [x] Fix panic where locator sometimes seeks to wrong excerpt Release Notes: - N/A
This commit is contained in:
parent
27a413a5e3
commit
45708d2680
21 changed files with 1023 additions and 125 deletions
|
@ -19,7 +19,7 @@ use collections::VecDeque;
|
|||
use command_palette_hooks::CommandPaletteFilter;
|
||||
use editor::ProposedChangesEditorToolbar;
|
||||
use editor::{scroll::Autoscroll, Editor, MultiBuffer};
|
||||
use feature_flags::FeatureFlagAppExt;
|
||||
use feature_flags::{FeatureFlagAppExt, FeatureFlagViewExt, GitUiFeatureFlag};
|
||||
use futures::{channel::mpsc, select_biased, StreamExt};
|
||||
use gpui::{
|
||||
actions, point, px, Action, App, AppContext as _, AsyncApp, Context, DismissEvent, Element,
|
||||
|
@ -364,8 +364,6 @@ fn initialize_panels(
|
|||
) {
|
||||
let assistant2_feature_flag =
|
||||
cx.wait_for_flag_or_timeout::<feature_flags::Assistant2FeatureFlag>(Duration::from_secs(5));
|
||||
let git_ui_feature_flag =
|
||||
cx.wait_for_flag_or_timeout::<feature_flags::GitUiFeatureFlag>(Duration::from_secs(5));
|
||||
|
||||
let prompt_builder = prompt_builder.clone();
|
||||
|
||||
|
@ -405,19 +403,10 @@ fn initialize_panels(
|
|||
workspace.add_panel(channels_panel, window, cx);
|
||||
workspace.add_panel(chat_panel, window, cx);
|
||||
workspace.add_panel(notification_panel, window, cx);
|
||||
})?;
|
||||
|
||||
let git_ui_enabled = git_ui_feature_flag.await;
|
||||
|
||||
let git_panel = if git_ui_enabled {
|
||||
Some(git_ui::git_panel::GitPanel::load(workspace_handle.clone(), cx.clone()).await?)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
workspace_handle.update_in(&mut cx, |workspace, window, cx| {
|
||||
if let Some(git_panel) = git_panel {
|
||||
cx.when_flag_enabled::<GitUiFeatureFlag>(window, |workspace, window, cx| {
|
||||
let git_panel = git_ui::git_panel::GitPanel::new(workspace, window, None, cx);
|
||||
workspace.add_panel(git_panel, window, cx);
|
||||
}
|
||||
});
|
||||
})?;
|
||||
|
||||
let is_assistant2_enabled = if cfg!(test) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue