Remove Warp cloud features and OpenTelemetry
Settings cleanup: - Remove billing_and_usage, main_page, referrals_page, show_blocks_view, environments_page, handoff_environment_creation_modal, custom_inference_modal, remove_custom_endpoint_confirmation_dialog, transfer_ownership_confirmation_modal, delete_environment_confirmation_dialog - Remove SettingsSection variants: Account, BillingAndUsage, Referrals, SharedBlocks, CloudEnvironments, OzCloudAPIKeys - Remove SettingsPageViewHandle variants: Main, BillingAndUsage, Referrals, CloudEnvironments, OzCloudAPIKeys, SharedBlocks - Add Platform variant for PlatformPageView - Gut custom inference endpoint UI from ai_page.rs - Gut transfer ownership modal from teams_page.rs - Stub environment_management_pane as dead code - Remove create_discount_badge usage - Remove handle_experiment_change call OpenTelemetry removal: - Remove opentelemetry, opentelemetry-http, opentelemetry-otlp, opentelemetry_sdk, tracing-opentelemetry dependencies - Replace tracing module with no-op stub - Delete native.rs and cloud_agent_auth.rs Bug fixes (prior work): - Fix apply_diffs() to use markdown_unescaped(ctx) - Fix notebook executor AIDocumentId handling - Fix margin/corner-radius consistency in requested_command.rs - Add document tool handlers to extract_tool_result_content() - Fix deprecated from_byte_stream in MCP SSE transport - Fix Cargo.toml profile package spec - Upgrade rust-toolchain to 1.94.1
This commit is contained in:
@@ -1501,7 +1501,7 @@ fn add_open_setting_pages_as_editable_binding(app: &mut AppContext) {
|
||||
EditableBinding::new(
|
||||
"workspace:show_settings_account_page",
|
||||
"Open Settings: Account",
|
||||
WorkspaceAction::ShowSettingsPage(SettingsSection::Account),
|
||||
WorkspaceAction::ShowSettingsPage(SettingsSection::About),
|
||||
)
|
||||
.with_context_predicate(id!("Workspace"))
|
||||
.with_group(bindings::BindingGroup::Settings.as_str())
|
||||
@@ -1526,7 +1526,7 @@ fn add_open_setting_pages_as_editable_binding(app: &mut AppContext) {
|
||||
"workspace:show_settings_shared_blocks_page",
|
||||
BindingDescription::new("Open Settings: Shared Blocks")
|
||||
.with_custom_description(bindings::MAC_MENUS_CONTEXT, "View Shared Blocks..."),
|
||||
WorkspaceAction::ShowSettingsPage(SettingsSection::SharedBlocks),
|
||||
WorkspaceAction::ShowSettingsPage(SettingsSection::About),
|
||||
)
|
||||
.with_group(bindings::BindingGroup::Settings.as_str())
|
||||
.with_context_predicate(id!("Workspace"))
|
||||
@@ -1583,13 +1583,6 @@ fn add_open_setting_pages_as_editable_binding(app: &mut AppContext) {
|
||||
.with_enabled(|| FeatureFlag::AgentMode.is_enabled())
|
||||
.with_group(bindings::BindingGroup::Settings.as_str())
|
||||
.with_context_predicate(id!("Workspace")),
|
||||
EditableBinding::new(
|
||||
"workspace:show_settings_billing_and_usage_page",
|
||||
BindingDescription::new("Open Settings: Billing and usage"),
|
||||
WorkspaceAction::ShowSettingsPage(SettingsSection::BillingAndUsage),
|
||||
)
|
||||
.with_group(bindings::BindingGroup::Settings.as_str())
|
||||
.with_context_predicate(id!("Workspace")),
|
||||
EditableBinding::new(
|
||||
"workspace:show_settings_code_page",
|
||||
BindingDescription::new("Open Settings: Code"),
|
||||
@@ -1600,14 +1593,14 @@ fn add_open_setting_pages_as_editable_binding(app: &mut AppContext) {
|
||||
EditableBinding::new(
|
||||
"workspace:show_settings_referrals_page",
|
||||
BindingDescription::new("Open Settings: Referrals"),
|
||||
WorkspaceAction::ShowSettingsPage(SettingsSection::Referrals),
|
||||
WorkspaceAction::ShowSettingsPage(SettingsSection::About),
|
||||
)
|
||||
.with_group(bindings::BindingGroup::Settings.as_str())
|
||||
.with_context_predicate(id!("Workspace")),
|
||||
EditableBinding::new(
|
||||
"workspace:show_settings_environments_page",
|
||||
BindingDescription::new("Open Settings: Environments"),
|
||||
WorkspaceAction::ShowSettingsPage(SettingsSection::CloudEnvironments),
|
||||
WorkspaceAction::ShowSettingsPage(SettingsSection::About),
|
||||
)
|
||||
.with_group(bindings::BindingGroup::Settings.as_str())
|
||||
.with_context_predicate(id!("Workspace")),
|
||||
|
||||
+7
-202
@@ -291,7 +291,7 @@ use crate::pane_group::pane::ActionOrigin;
|
||||
use crate::pane_group::FilePane;
|
||||
use crate::pane_group::{
|
||||
self, AIFactPane, AnyPaneContent, ChildAgentOrigin, CodeDiffPane, CodePane, CodeReviewPanelArg,
|
||||
CustomRouterEditorPane, Direction as PaneGroupDirection, Direction, EnvironmentManagementPane,
|
||||
CustomRouterEditorPane, Direction as PaneGroupDirection, Direction,
|
||||
ExecutionProfileEditorPane, NetworkLogPane, NewTerminalOptions, PaneGroup, PaneId, PanesLayout,
|
||||
TabBarHoverIndex, TerminalPaneId,
|
||||
};
|
||||
@@ -344,10 +344,6 @@ use crate::settings::{
|
||||
MonospaceFontSize, PaneSettings, PrivacySettings, SelectionSettings, Settings, SshSettings,
|
||||
ThemeSettings,
|
||||
};
|
||||
use crate::settings_view::environments_page::EnvironmentsPage;
|
||||
use crate::settings_view::handoff_environment_creation_modal::{
|
||||
HandoffEnvironmentCreationModal, HandoffEnvironmentCreationModalEvent,
|
||||
};
|
||||
use crate::settings_view::keybindings::{KeybindingChangedEvent, KeybindingChangedNotifier};
|
||||
use crate::settings_view::mcp_servers_page::MCPServersSettingsPage;
|
||||
use crate::settings_view::pane_manager::SettingsPaneManager;
|
||||
@@ -1174,7 +1170,6 @@ pub struct Workspace {
|
||||
tab_config_action_sidecar_item: Option<SidecarItemKind>,
|
||||
tab_config_action_sidecar_mouse_states: crate::tab_configs::action_sidecar::SidecarMouseStates,
|
||||
remove_tab_config_confirmation_dialog: ViewHandle<RemoveTabConfigConfirmationDialog>,
|
||||
handoff_environment_creation_modal: Option<ViewHandle<HandoffEnvironmentCreationModal>>,
|
||||
/// Workspace-level modal hosting `AuthSecretFtuxView` for the
|
||||
/// orchestration cards' "New API key…" flow. Cloud mode renders the
|
||||
/// FTUX view inline and does not use this.
|
||||
@@ -3470,7 +3465,6 @@ impl Workspace {
|
||||
tab_config_action_sidecar_mouse_states: Default::default(),
|
||||
remove_tab_config_confirmation_dialog:
|
||||
Self::build_remove_tab_config_confirmation_dialog(ctx),
|
||||
handoff_environment_creation_modal: None,
|
||||
create_auth_secret_modal: None,
|
||||
};
|
||||
|
||||
@@ -8746,27 +8740,6 @@ impl Workspace {
|
||||
});
|
||||
}
|
||||
|
||||
/// Open the Environment Management pane in a split pane (default direction is right).
|
||||
pub fn open_environment_management_pane(
|
||||
&mut self,
|
||||
direction: Option<Direction>,
|
||||
mode: EnvironmentsPage,
|
||||
ctx: &mut ViewContext<Self>,
|
||||
) {
|
||||
let direction = direction.unwrap_or(Direction::Right);
|
||||
let environments_page_view = self.active_tab_pane_group().update(ctx, |pane_group, ctx| {
|
||||
let pane = EnvironmentManagementPane::new(ctx);
|
||||
let view = pane.environments_page_view(ctx);
|
||||
pane_group
|
||||
.add_pane_with_direction(direction, pane, true /* focus_new_pane */, ctx);
|
||||
view
|
||||
});
|
||||
// Update page after the pane is added so focus works correctly
|
||||
environments_page_view.update(ctx, |view, ctx| {
|
||||
view.update_page(mode, ctx);
|
||||
});
|
||||
}
|
||||
|
||||
pub(super) fn active_session_view(
|
||||
&self,
|
||||
ctx: &mut ViewContext<Self>,
|
||||
@@ -9599,7 +9572,7 @@ impl Workspace {
|
||||
items.push(
|
||||
MenuItemFields::new("Billing and usage")
|
||||
.with_on_select_action(WorkspaceAction::ShowSettingsPage(
|
||||
SettingsSection::BillingAndUsage,
|
||||
SettingsSection::About,
|
||||
))
|
||||
.into_item(),
|
||||
);
|
||||
@@ -14959,83 +14932,6 @@ impl Workspace {
|
||||
});
|
||||
}
|
||||
|
||||
fn show_handoff_environment_creation_modal(&mut self, ctx: &mut ViewContext<Self>) {
|
||||
// Capture the initiating source view now, before async creation begins.
|
||||
// If we waited until the Created callback, the user may have switched panes.
|
||||
#[cfg(all(feature = "local_fs", not(target_family = "wasm")))]
|
||||
let source_view = self
|
||||
.active_tab_pane_group()
|
||||
.as_ref(ctx)
|
||||
.active_session_view(ctx);
|
||||
|
||||
let modal = ctx.add_typed_action_view(HandoffEnvironmentCreationModal::new);
|
||||
ctx.subscribe_to_view(&modal, move |me, _, event, ctx| match event {
|
||||
HandoffEnvironmentCreationModalEvent::Created { env_id } => {
|
||||
let env_id = *env_id;
|
||||
me.handoff_environment_creation_modal = None;
|
||||
#[cfg(all(feature = "local_fs", not(target_family = "wasm")))]
|
||||
{
|
||||
if let Some(source_view) = source_view.as_ref() {
|
||||
let (launch, entry_point) = source_view.update(ctx, |view, ctx| {
|
||||
let input = view.input().clone();
|
||||
input.update(ctx, |input, ctx| {
|
||||
let prompt = input
|
||||
.editor()
|
||||
.as_ref(ctx)
|
||||
.buffer_text(ctx)
|
||||
.trim()
|
||||
.to_owned();
|
||||
let attachments = input.collect_cloud_launch_attachments(ctx);
|
||||
let entry_point = input.handoff_entry_point(ctx);
|
||||
input.exit_cloud_handoff_compose_and_clear(ctx);
|
||||
let launch = if prompt.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(PendingCloudLaunch {
|
||||
prompt,
|
||||
attachments,
|
||||
})
|
||||
};
|
||||
(launch, entry_point)
|
||||
})
|
||||
});
|
||||
ctx.dispatch_typed_action_deferred(
|
||||
WorkspaceAction::OpenLocalToCloudHandoffPane {
|
||||
launch,
|
||||
environment_id: Some(env_id),
|
||||
entry_point,
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
#[cfg(not(all(feature = "local_fs", not(target_family = "wasm"))))]
|
||||
{
|
||||
let _ = env_id;
|
||||
}
|
||||
}
|
||||
HandoffEnvironmentCreationModalEvent::Cancelled => {
|
||||
me.handoff_environment_creation_modal = None;
|
||||
me.focus_active_tab(ctx);
|
||||
}
|
||||
HandoffEnvironmentCreationModalEvent::CreationFailed { error_message } => {
|
||||
me.handoff_environment_creation_modal = None;
|
||||
me.toast_stack.update(ctx, |toast_stack, ctx| {
|
||||
toast_stack.add_ephemeral_toast(
|
||||
DismissibleToast::error(format!(
|
||||
"Failed to create environment: {error_message}"
|
||||
)),
|
||||
ctx,
|
||||
);
|
||||
});
|
||||
me.focus_active_tab(ctx);
|
||||
}
|
||||
});
|
||||
modal.update(ctx, |modal, ctx| modal.show(ctx));
|
||||
ctx.focus(&modal);
|
||||
self.handoff_environment_creation_modal = Some(modal);
|
||||
ctx.notify();
|
||||
}
|
||||
|
||||
/// Opens the workspace-level blocking modal for creating a new managed
|
||||
/// auth secret. Persists the new secret on success and dismisses the
|
||||
/// modal; cards adopt it via `HarnessAvailabilityEvent::AuthSecretCreated`.
|
||||
@@ -15089,81 +14985,6 @@ impl Workspace {
|
||||
}
|
||||
}
|
||||
|
||||
fn show_cloud_mode_v2_environment_creation_modal(&mut self, ctx: &mut ViewContext<Self>) {
|
||||
let Some(source_view) = self
|
||||
.active_tab_pane_group()
|
||||
.as_ref(ctx)
|
||||
.active_session_view(ctx)
|
||||
else {
|
||||
return;
|
||||
};
|
||||
let modal = ctx.add_typed_action_view(HandoffEnvironmentCreationModal::new);
|
||||
ctx.subscribe_to_view(&modal, move |me, _, event, ctx| match event {
|
||||
HandoffEnvironmentCreationModalEvent::Created { env_id } => {
|
||||
let env_id = *env_id;
|
||||
me.handoff_environment_creation_modal = None;
|
||||
let Some(model_handle) =
|
||||
source_view.as_ref(ctx).ambient_agent_view_model().cloned()
|
||||
else {
|
||||
return;
|
||||
};
|
||||
let pending = source_view.update(ctx, |view, ctx| {
|
||||
let input = view.input().clone();
|
||||
input.update(ctx, |input, ctx| {
|
||||
let prompt = input
|
||||
.editor()
|
||||
.as_ref(ctx)
|
||||
.buffer_text(ctx)
|
||||
.trim()
|
||||
.to_owned();
|
||||
if prompt.is_empty() {
|
||||
return None;
|
||||
}
|
||||
#[cfg(all(feature = "local_fs", not(target_family = "wasm")))]
|
||||
let attachments = input
|
||||
.collect_cloud_launch_attachments(ctx)
|
||||
.request_attachments;
|
||||
#[cfg(not(all(feature = "local_fs", not(target_family = "wasm"))))]
|
||||
let attachments = Vec::new();
|
||||
input.editor().update(ctx, |editor, ctx| {
|
||||
editor.clear_buffer(ctx);
|
||||
});
|
||||
input.ai_context_model().update(ctx, |model, ctx| {
|
||||
model.clear_pending_attachments(ctx);
|
||||
});
|
||||
Some((prompt, attachments))
|
||||
})
|
||||
});
|
||||
model_handle.update(ctx, |model, ctx| {
|
||||
model.set_environment_id(Some(env_id), ctx);
|
||||
if let Some((prompt, attachments)) = pending {
|
||||
model.spawn_agent(prompt, attachments, ctx);
|
||||
}
|
||||
});
|
||||
}
|
||||
HandoffEnvironmentCreationModalEvent::Cancelled => {
|
||||
me.handoff_environment_creation_modal = None;
|
||||
me.focus_active_tab(ctx);
|
||||
}
|
||||
HandoffEnvironmentCreationModalEvent::CreationFailed { error_message } => {
|
||||
me.handoff_environment_creation_modal = None;
|
||||
me.toast_stack.update(ctx, |toast_stack, ctx| {
|
||||
toast_stack.add_ephemeral_toast(
|
||||
DismissibleToast::error(format!(
|
||||
"Failed to create environment: {error_message}"
|
||||
)),
|
||||
ctx,
|
||||
);
|
||||
});
|
||||
me.focus_active_tab(ctx);
|
||||
}
|
||||
});
|
||||
modal.update(ctx, |modal, ctx| modal.show(ctx));
|
||||
ctx.focus(&modal);
|
||||
self.handoff_environment_creation_modal = Some(modal);
|
||||
ctx.notify();
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "local_fs", not(target_family = "wasm")))]
|
||||
fn restore_source_handoff_draft(
|
||||
source_view: &ViewHandle<TerminalView>,
|
||||
@@ -16895,13 +16716,7 @@ impl Workspace {
|
||||
pane_group::Event::OpenAgentProfileEditor { profile_id } => {
|
||||
self.open_execution_profile_editor_pane(None, *profile_id, ctx);
|
||||
}
|
||||
pane_group::Event::OpenEnvironmentManagementPane => {
|
||||
self.open_environment_management_pane(
|
||||
None,
|
||||
crate::settings_view::environments_page::EnvironmentsPage::Create,
|
||||
ctx,
|
||||
);
|
||||
}
|
||||
pane_group::Event::OpenEnvironmentManagementPane => {}
|
||||
pane_group::Event::OpenLspLogs { log_path } => {
|
||||
self.open_lsp_logs(log_path, ctx);
|
||||
}
|
||||
@@ -23872,12 +23687,8 @@ impl TypedActionView for Workspace {
|
||||
let _ = (terminal_view_id, conversation_id, trigger);
|
||||
}
|
||||
}
|
||||
ShowHandoffEnvironmentCreationModal => {
|
||||
self.show_handoff_environment_creation_modal(ctx);
|
||||
}
|
||||
ShowCloudModeV2EnvironmentCreationModal => {
|
||||
self.show_cloud_mode_v2_environment_creation_modal(ctx);
|
||||
}
|
||||
ShowHandoffEnvironmentCreationModal => {}
|
||||
ShowCloudModeV2EnvironmentCreationModal => {}
|
||||
OpenCreateAuthSecretModal { harness } => {
|
||||
self.show_create_auth_secret_modal(*harness, ctx);
|
||||
}
|
||||
@@ -23994,7 +23805,7 @@ impl TypedActionView for Workspace {
|
||||
ctx.open_url(&upgrade_url);
|
||||
}
|
||||
ShowReferralSettingsPage => {
|
||||
self.show_settings_with_section(Some(SettingsSection::Referrals), ctx);
|
||||
self.show_settings_with_section(Some(SettingsSection::About), ctx);
|
||||
}
|
||||
JoinSlack => self.join_slack(ctx),
|
||||
ViewUserDocs => self.view_user_docs(ctx),
|
||||
@@ -24946,9 +24757,7 @@ impl TypedActionView for Workspace {
|
||||
ctx
|
||||
);
|
||||
}
|
||||
OpenEnvironmentManagementPane => {
|
||||
self.open_environment_management_pane(None, EnvironmentsPage::Create, ctx);
|
||||
}
|
||||
OpenEnvironmentManagementPane => {}
|
||||
ToggleAIDocumentPane {
|
||||
document_id,
|
||||
document_version,
|
||||
@@ -26986,10 +26795,6 @@ impl View for Workspace {
|
||||
stack.add_child(ChildView::new(lightbox_view).finish());
|
||||
}
|
||||
|
||||
if let Some(handoff_modal) = &self.handoff_environment_creation_modal {
|
||||
stack.add_child(ChildView::new(handoff_modal).finish());
|
||||
}
|
||||
|
||||
if let Some(create_auth_secret_modal) = &self.create_auth_secret_modal {
|
||||
stack.add_child(ChildView::new(create_auth_secret_modal).finish());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user