Files
galaxy/app/src/coding_panel_enablement_state.rs
T
rkw6086 7c106eecd5 feat: expand Galaxy agent and remote tooling
Add Wormhole remote helpers, provider and agent improvements, filesystem diagnostics, model metadata support, and schema-aware settings IntelliSense.
2026-08-23 13:55:47 -05:00

41 lines
1.3 KiB
Rust

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub(crate) enum CodingPanelEnablementState {
Enabled,
/// An SSH command has been detected at preexec time but the remote
/// session has not finished bootstrapping yet. The file tree should
/// show a loading state immediately to avoid flickering the stale
/// local tree.
PendingRemoteSession,
/// The active session is on a remote host.
///
/// `has_remote_server` is `true` when the session is registered with
/// `RemoteServerManager` (i.e. Auto SSH Wormholing / mode 1). When
/// `true`, remote repo metadata may arrive and the file tree should show
/// a loading state. When `false` (tmux or subshell SSH), no data will
/// arrive and the file tree should show a disabled message.
RemoteSession {
has_remote_server: bool,
},
UnsupportedSession,
Disabled,
}
impl CodingPanelEnablementState {
pub(crate) fn from_session_env(
is_enabled: bool,
is_remote: bool,
is_unsupported_session: bool,
has_remote_server: bool,
) -> Self {
if is_remote {
Self::RemoteSession { has_remote_server }
} else if is_unsupported_session {
Self::UnsupportedSession
} else if is_enabled {
Self::Enabled
} else {
Self::Disabled
}
}
}