mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 03:14:56 +07:00
Some checks are pending
Congratsbot / check-author (push) Waiting to run
Congratsbot / congrats (push) Blocked by required conditions
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_wasm (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
deploy_nightly_docs / deploy_docs (push) Has been skipped
Adds the handoff feature flag with staff disabled by default, giving the rest of the auto-compaction stack a rollout gate without changing behavior for users outside the flag. Release Notes: - N/A
164 lines
4.1 KiB
Rust
164 lines
4.1 KiB
Rust
use crate::{EnumFeatureFlag, FeatureFlag, PresenceFlag, register_feature_flag};
|
|
|
|
pub struct NotebookFeatureFlag;
|
|
|
|
impl FeatureFlag for NotebookFeatureFlag {
|
|
const NAME: &'static str = "notebooks";
|
|
type Value = PresenceFlag;
|
|
}
|
|
register_feature_flag!(NotebookFeatureFlag);
|
|
|
|
pub struct PanicFeatureFlag;
|
|
|
|
impl FeatureFlag for PanicFeatureFlag {
|
|
const NAME: &'static str = "panic";
|
|
type Value = PresenceFlag;
|
|
}
|
|
register_feature_flag!(PanicFeatureFlag);
|
|
|
|
/// A feature flag for granting access to beta ACP features.
|
|
///
|
|
/// We reuse this feature flag for new betas, so don't delete it if it is not currently in use.
|
|
pub struct AcpBetaFeatureFlag;
|
|
|
|
impl FeatureFlag for AcpBetaFeatureFlag {
|
|
const NAME: &'static str = "acp-beta";
|
|
type Value = PresenceFlag;
|
|
}
|
|
register_feature_flag!(AcpBetaFeatureFlag);
|
|
|
|
pub struct AgentSharingFeatureFlag;
|
|
|
|
impl FeatureFlag for AgentSharingFeatureFlag {
|
|
const NAME: &'static str = "agent-sharing";
|
|
type Value = PresenceFlag;
|
|
}
|
|
register_feature_flag!(AgentSharingFeatureFlag);
|
|
|
|
pub struct HandoffFeatureFlag;
|
|
|
|
impl FeatureFlag for HandoffFeatureFlag {
|
|
const NAME: &'static str = "handoff";
|
|
type Value = PresenceFlag;
|
|
|
|
fn enabled_for_staff() -> bool {
|
|
false
|
|
}
|
|
}
|
|
register_feature_flag!(HandoffFeatureFlag);
|
|
|
|
pub struct DiffReviewFeatureFlag;
|
|
|
|
impl FeatureFlag for DiffReviewFeatureFlag {
|
|
const NAME: &'static str = "diff-review";
|
|
type Value = PresenceFlag;
|
|
|
|
fn enabled_for_staff() -> bool {
|
|
false
|
|
}
|
|
}
|
|
register_feature_flag!(DiffReviewFeatureFlag);
|
|
|
|
pub struct UpdatePlanToolFeatureFlag;
|
|
|
|
impl FeatureFlag for UpdatePlanToolFeatureFlag {
|
|
const NAME: &'static str = "update-plan-tool";
|
|
type Value = PresenceFlag;
|
|
|
|
fn enabled_for_staff() -> bool {
|
|
false
|
|
}
|
|
}
|
|
register_feature_flag!(UpdatePlanToolFeatureFlag);
|
|
|
|
pub struct UpdateTitleToolFeatureFlag;
|
|
|
|
impl FeatureFlag for UpdateTitleToolFeatureFlag {
|
|
const NAME: &'static str = "update-title-tool";
|
|
type Value = PresenceFlag;
|
|
|
|
fn enabled_for_staff() -> bool {
|
|
false
|
|
}
|
|
}
|
|
register_feature_flag!(UpdateTitleToolFeatureFlag);
|
|
|
|
pub struct LspToolFeatureFlag;
|
|
|
|
impl FeatureFlag for LspToolFeatureFlag {
|
|
const NAME: &'static str = "lsp-tool";
|
|
type Value = PresenceFlag;
|
|
|
|
fn enabled_for_staff() -> bool {
|
|
false
|
|
}
|
|
}
|
|
register_feature_flag!(LspToolFeatureFlag);
|
|
|
|
pub struct RenameToolFeatureFlag;
|
|
|
|
impl FeatureFlag for RenameToolFeatureFlag {
|
|
const NAME: &'static str = "rename-tool";
|
|
type Value = PresenceFlag;
|
|
|
|
fn enabled_for_staff() -> bool {
|
|
true
|
|
}
|
|
}
|
|
register_feature_flag!(RenameToolFeatureFlag);
|
|
|
|
pub struct ProjectPanelUndoRedoFeatureFlag;
|
|
|
|
impl FeatureFlag for ProjectPanelUndoRedoFeatureFlag {
|
|
const NAME: &'static str = "project-panel-undo-redo";
|
|
type Value = PresenceFlag;
|
|
|
|
fn enabled_for_staff() -> bool {
|
|
true
|
|
}
|
|
}
|
|
register_feature_flag!(ProjectPanelUndoRedoFeatureFlag);
|
|
|
|
/// Controls how agent thread worktree chips are labeled in the sidebar.
|
|
#[derive(Clone, Copy, PartialEq, Eq, Debug, EnumFeatureFlag)]
|
|
pub enum AgentThreadWorktreeLabel {
|
|
#[default]
|
|
Both,
|
|
Worktree,
|
|
Branch,
|
|
}
|
|
|
|
pub struct AgentThreadWorktreeLabelFlag;
|
|
|
|
impl FeatureFlag for AgentThreadWorktreeLabelFlag {
|
|
const NAME: &'static str = "agent-thread-worktree-label";
|
|
type Value = AgentThreadWorktreeLabel;
|
|
|
|
fn enabled_for_staff() -> bool {
|
|
false
|
|
}
|
|
}
|
|
register_feature_flag!(AgentThreadWorktreeLabelFlag);
|
|
|
|
pub struct AutoWatchFeatureFlag;
|
|
|
|
impl FeatureFlag for AutoWatchFeatureFlag {
|
|
const NAME: &'static str = "auto-watch-screens";
|
|
type Value = PresenceFlag;
|
|
}
|
|
register_feature_flag!(AutoWatchFeatureFlag);
|
|
|
|
/// Wraps agent-run terminal commands in an OS-level sandbox where supported
|
|
/// (currently macOS Seatbelt only). When off, terminal commands run with the
|
|
/// agent's full ambient permissions, as they always have.
|
|
pub struct SandboxingFeatureFlag;
|
|
|
|
impl FeatureFlag for SandboxingFeatureFlag {
|
|
const NAME: &'static str = "sandboxing";
|
|
type Value = PresenceFlag;
|
|
|
|
fn enabled_for_staff() -> bool {
|
|
false
|
|
}
|
|
}
|
|
register_feature_flag!(SandboxingFeatureFlag);
|