MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / new

Method new

crates/openshell-tui/src/app.rs:851–956  ·  view source on GitHub ↗

Theme is Copy; one-shot ctor

(
        client: OpenShellClient<InterceptedService<Channel, EdgeAuthInterceptor>>,
        gateway_name: String,
        endpoint: String,
        theme: crate::theme::Theme,
    )

Source from the content-addressed store, hash-verified

849impl App {
850 #[allow(clippy::large_types_passed_by_value)] // Theme is Copy; one-shot ctor
851 pub fn new(
852 client: OpenShellClient<InterceptedService<Channel, EdgeAuthInterceptor>>,
853 gateway_name: String,
854 endpoint: String,
855 theme: crate::theme::Theme,
856 ) -> Self {
857 Self {
858 running: true,
859 screen: Screen::Splash,
860 input_mode: InputMode::Normal,
861 focus: Focus::Gateways,
862 command_input: String::new(),
863 theme,
864 splash_start: Some(Instant::now()),
865 gateway_name,
866 endpoint,
867 client,
868 status_text: String::from("connecting..."),
869 gateways: Vec::new(),
870 gateway_selected: 0,
871 pending_gateway_switch: None,
872 middle_pane_tab: MiddlePaneTab::Providers,
873 global_policy_active: false,
874 global_policy_version: 0,
875 global_settings: Vec::new(),
876 global_settings_selected: 0,
877 global_settings_revision: 0,
878 setting_edit: None,
879 confirm_setting_set: None,
880 confirm_setting_delete: None,
881 pending_setting_set: false,
882 pending_setting_delete: false,
883 providers_v2_enabled: false,
884 provider_entries: Vec::new(),
885 provider_names: Vec::new(),
886 provider_types: Vec::new(),
887 provider_cred_keys: Vec::new(),
888 provider_selected: 0,
889 provider_count: 0,
890 create_provider_form: None,
891 provider_detail: None,
892 update_provider_form: None,
893 confirm_provider_delete: false,
894 pending_provider_get: false,
895 pending_provider_delete: false,
896 pending_provider_create: false,
897 pending_provider_update: false,
898 sandbox_ids: Vec::new(),
899 sandbox_names: Vec::new(),
900 sandbox_phases: Vec::new(),
901 sandbox_ages: Vec::new(),
902 sandbox_created: Vec::new(),
903 sandbox_images: Vec::new(),
904 sandbox_notes: Vec::new(),
905 sandbox_labels: Vec::new(),
906 sandbox_policy_versions: Vec::new(),
907 sandbox_selected: 0,
908 sandbox_count: 0,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected