Detailed changes
  
  
    
    @@ -127,7 +127,7 @@ impl AgentThreadEntry {
         }
     }
 
-    pub fn user_message(&self) -> Option<&UserMessage> {
+    pub const fn user_message(&self) -> Option<&UserMessage> {
         if let AgentThreadEntry::UserMessage(message) = self {
             Some(message)
         } else {
@@ -536,7 +536,7 @@ impl ContentBlock {
         }
     }
 
-    pub fn markdown(&self) -> Option<&Entity<Markdown>> {
+    pub const fn markdown(&self) -> Option<&Entity<Markdown>> {
         match self {
             ContentBlock::Empty => None,
             ContentBlock::Markdown { markdown } => Some(markdown),
@@ -544,7 +544,7 @@ impl ContentBlock {
         }
     }
 
-    pub fn resource_link(&self) -> Option<&acp::ResourceLink> {
+    pub const fn resource_link(&self) -> Option<&acp::ResourceLink> {
         match self {
             ContentBlock::ResourceLink { resource_link } => Some(resource_link),
             _ => None,
@@ -630,7 +630,7 @@ pub enum ToolCallUpdate {
 }
 
 impl ToolCallUpdate {
-    fn id(&self) -> &acp::ToolCallId {
+    const fn id(&self) -> &acp::ToolCallId {
         match self {
             Self::UpdateFields(update) => &update.id,
             Self::UpdateDiff(diff) => &diff.id,
@@ -682,7 +682,7 @@ pub struct PlanStats<'a> {
 }
 
 impl Plan {
-    pub fn is_empty(&self) -> bool {
+    pub const fn is_empty(&self) -> bool {
         self.entries.is_empty()
     }
 
@@ -1022,11 +1022,11 @@ impl AcpThread {
         &self.connection
     }
 
-    pub fn action_log(&self) -> &Entity<ActionLog> {
+    pub const fn action_log(&self) -> &Entity<ActionLog> {
         &self.action_log
     }
 
-    pub fn project(&self) -> &Entity<Project> {
+    pub const fn project(&self) -> &Entity<Project> {
         &self.project
     }
 
@@ -1038,11 +1038,11 @@ impl AcpThread {
         &self.entries
     }
 
-    pub fn session_id(&self) -> &acp::SessionId {
+    pub const fn session_id(&self) -> &acp::SessionId {
         &self.session_id
     }
 
-    pub fn status(&self) -> ThreadStatus {
+    pub const fn status(&self) -> ThreadStatus {
         if self.send_task.is_some() {
             ThreadStatus::Generating
         } else {
@@ -1050,7 +1050,7 @@ impl AcpThread {
         }
     }
 
-    pub fn token_usage(&self) -> Option<&TokenUsage> {
+    pub const fn token_usage(&self) -> Option<&TokenUsage> {
         self.token_usage.as_ref()
     }
 
@@ -1533,7 +1533,7 @@ impl AcpThread {
         first_tool_call
     }
 
-    pub fn plan(&self) -> &Plan {
+    pub const fn plan(&self) -> &Plan {
         &self.plan
     }
 
  
  
  
    
    @@ -133,7 +133,7 @@ pub struct AuthRequired {
 }
 
 impl AuthRequired {
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         Self {
             description: None,
             provider_id: None,
  
  
  
    
    @@ -129,7 +129,7 @@ impl Diff {
         }
     }
 
-    pub fn multibuffer(&self) -> &Entity<MultiBuffer> {
+    pub const fn multibuffer(&self) -> &Entity<MultiBuffer> {
         match self {
             Self::Pending(PendingDiff { multibuffer, .. }) => multibuffer,
             Self::Finalized(FinalizedDiff { multibuffer, .. }) => multibuffer,
  
  
  
    
    @@ -206,7 +206,7 @@ impl MentionUri {
         }
     }
 
-    pub fn as_link<'a>(&'a self) -> MentionLink<'a> {
+    pub const fn as_link<'a>(&'a self) -> MentionLink<'a> {
         MentionLink(self)
     }
 
  
  
  
    
    @@ -82,7 +82,7 @@ impl Terminal {
         }
     }
 
-    pub fn id(&self) -> &acp::TerminalId {
+    pub const fn id(&self) -> &acp::TerminalId {
         &self.id
     }
 
@@ -143,23 +143,23 @@ impl Terminal {
         (content, original_content_len)
     }
 
-    pub fn command(&self) -> &Entity<Markdown> {
+    pub const fn command(&self) -> &Entity<Markdown> {
         &self.command
     }
 
-    pub fn working_dir(&self) -> &Option<PathBuf> {
+    pub const fn working_dir(&self) -> &Option<PathBuf> {
         &self.working_dir
     }
 
-    pub fn started_at(&self) -> Instant {
+    pub const fn started_at(&self) -> Instant {
         self.started_at
     }
 
-    pub fn output(&self) -> Option<&TerminalOutput> {
+    pub const fn output(&self) -> Option<&TerminalOutput> {
         self.output.as_ref()
     }
 
-    pub fn inner(&self) -> &Entity<terminal::Terminal> {
+    pub const fn inner(&self) -> &Entity<terminal::Terminal> {
         &self.terminal
     }
 
  
  
  
    
    @@ -531,7 +531,7 @@ pub struct AcpToolsToolbarItemView {
 }
 
 impl AcpToolsToolbarItemView {
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         Self {
             acp_tools: None,
             just_copied: false,
  
  
  
    
    @@ -27,7 +27,7 @@ impl ActionLog {
         }
     }
 
-    pub fn project(&self) -> &Entity<Project> {
+    pub const fn project(&self) -> &Entity<Project> {
         &self.project
     }
 
  
  
  
    
    @@ -375,7 +375,7 @@ impl NativeAgent {
         acp_thread
     }
 
-    pub fn models(&self) -> &LanguageModels {
+    pub const fn models(&self) -> &LanguageModels {
         &self.models
     }
 
  
  
  
    
    @@ -747,14 +747,14 @@ enum IndentDelta {
 }
 
 impl IndentDelta {
-    fn character(&self) -> char {
+    const fn character(&self) -> char {
         match self {
             IndentDelta::Spaces(_) => ' ',
             IndentDelta::Tabs(_) => '\t',
         }
     }
 
-    fn len(&self) -> isize {
+    const fn len(&self) -> isize {
         match self {
             IndentDelta::Spaces(n) => *n,
             IndentDelta::Tabs(n) => *n,
  
  
  
    
    @@ -27,7 +27,7 @@ enum ParserState {
 }
 
 impl CreateFileParser {
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         CreateFileParser {
             state: ParserState::Pending,
             buffer: String::new(),
  
  
  
    
    @@ -262,7 +262,7 @@ struct SearchState {
 }
 
 impl SearchState {
-    fn new(cost: u32, direction: SearchDirection) -> Self {
+    const fn new(cost: u32, direction: SearchDirection) -> Self {
         Self { cost, direction }
     }
 }
@@ -274,7 +274,7 @@ struct SearchMatrix {
 }
 
 impl SearchMatrix {
-    fn new(cols: usize) -> Self {
+    const fn new(cols: usize) -> Self {
         SearchMatrix {
             cols,
             rows: 0,
  
  
  
    
    @@ -54,7 +54,7 @@ pub enum HistoryEntry {
 }
 
 impl HistoryEntry {
-    pub fn updated_at(&self) -> DateTime<Utc> {
+    pub const fn updated_at(&self) -> DateTime<Utc> {
         match self {
             HistoryEntry::AcpThread(thread) => thread.updated_at,
             HistoryEntry::TextThread(context) => context.mtime.to_utc(),
@@ -253,7 +253,7 @@ impl HistoryStore {
         cx.notify()
     }
 
-    pub fn is_empty(&self, _cx: &App) -> bool {
+    pub const fn is_empty(&self, _cx: &App) -> bool {
         self.entries.is_empty()
     }
 
  
  
  
    
    @@ -102,7 +102,7 @@ pub enum Message {
 }
 
 impl Message {
-    pub fn as_agent_message(&self) -> Option<&AgentMessage> {
+    pub const fn as_agent_message(&self) -> Option<&AgentMessage> {
         match self {
             Message::Agent(agent_message) => Some(agent_message),
             _ => None,
@@ -129,7 +129,7 @@ impl Message {
         }
     }
 
-    pub fn role(&self) -> Role {
+    pub const fn role(&self) -> Role {
         match self {
             Message::User(_) | Message::Resume => Role::User,
             Message::Agent(_) => Role::Assistant,
@@ -672,7 +672,7 @@ impl Thread {
         }
     }
 
-    pub fn id(&self) -> &acp::SessionId {
+    pub const fn id(&self) -> &acp::SessionId {
         &self.id
     }
 
@@ -975,19 +975,19 @@ impl Thread {
         })
     }
 
-    pub fn project_context(&self) -> &Entity<ProjectContext> {
+    pub const fn project_context(&self) -> &Entity<ProjectContext> {
         &self.project_context
     }
 
-    pub fn project(&self) -> &Entity<Project> {
+    pub const fn project(&self) -> &Entity<Project> {
         &self.project
     }
 
-    pub fn action_log(&self) -> &Entity<ActionLog> {
+    pub const fn action_log(&self) -> &Entity<ActionLog> {
         &self.action_log
     }
 
-    pub fn is_empty(&self) -> bool {
+    pub const fn is_empty(&self) -> bool {
         self.messages.is_empty() && self.title.is_none()
     }
 
@@ -1020,7 +1020,7 @@ impl Thread {
         cx.notify()
     }
 
-    pub fn completion_mode(&self) -> CompletionMode {
+    pub const fn completion_mode(&self) -> CompletionMode {
         self.completion_mode
     }
 
@@ -1086,7 +1086,7 @@ impl Thread {
         self.tools.remove(name).is_some()
     }
 
-    pub fn profile(&self) -> &AgentProfileId {
+    pub const fn profile(&self) -> &AgentProfileId {
         &self.profile_id
     }
 
@@ -1658,7 +1658,7 @@ impl Thread {
         self.title.clone().unwrap_or("New Thread".into())
     }
 
-    pub fn is_generating_summary(&self) -> bool {
+    pub const fn is_generating_summary(&self) -> bool {
         self.pending_summary_generation.is_some()
     }
 
  
  
  
    
    @@ -130,7 +130,7 @@ struct ContextServerTool {
 }
 
 impl ContextServerTool {
-    fn new(
+    const fn new(
         store: Entity<ContextServerStore>,
         server_id: ContextServerId,
         tool: context_server::types::Tool,
  
  
  
    
    @@ -41,7 +41,7 @@ pub struct CopyPathTool {
 }
 
 impl CopyPathTool {
-    pub fn new(project: Entity<Project>) -> Self {
+    pub const fn new(project: Entity<Project>) -> Self {
         Self { project }
     }
 }
  
  
  
    
    @@ -32,7 +32,7 @@ pub struct CreateDirectoryTool {
 }
 
 impl CreateDirectoryTool {
-    pub fn new(project: Entity<Project>) -> Self {
+    pub const fn new(project: Entity<Project>) -> Self {
         Self { project }
     }
 }
  
  
  
    
    @@ -32,7 +32,7 @@ pub struct DeletePathTool {
 }
 
 impl DeletePathTool {
-    pub fn new(project: Entity<Project>, action_log: Entity<ActionLog>) -> Self {
+    pub const fn new(project: Entity<Project>, action_log: Entity<ActionLog>) -> Self {
         Self {
             project,
             action_log,
  
  
  
    
    @@ -54,7 +54,7 @@ pub struct DiagnosticsTool {
 }
 
 impl DiagnosticsTool {
-    pub fn new(project: Entity<Project>) -> Self {
+    pub const fn new(project: Entity<Project>) -> Self {
         Self { project }
     }
 }
  
  
  
    
    @@ -129,7 +129,7 @@ pub struct EditFileTool {
 }
 
 impl EditFileTool {
-    pub fn new(
+    pub const fn new(
         project: Entity<Project>,
         thread: WeakEntity<Thread>,
         language_registry: Arc<LanguageRegistry>,
  
  
  
    
    @@ -34,7 +34,7 @@ pub struct FetchTool {
 }
 
 impl FetchTool {
-    pub fn new(http_client: Arc<HttpClientWithUrl>) -> Self {
+    pub const fn new(http_client: Arc<HttpClientWithUrl>) -> Self {
         Self { http_client }
     }
 
  
  
  
    
    @@ -76,7 +76,7 @@ pub struct FindPathTool {
 }
 
 impl FindPathTool {
-    pub fn new(project: Entity<Project>) -> Self {
+    pub const fn new(project: Entity<Project>) -> Self {
         Self { project }
     }
 }
  
  
  
    
    @@ -46,7 +46,7 @@ pub struct GrepToolInput {
 
 impl GrepToolInput {
     /// Which page of search results this is.
-    pub fn page(&self) -> u32 {
+    pub const fn page(&self) -> u32 {
         1 + (self.offset / RESULTS_PER_PAGE)
     }
 }
@@ -58,7 +58,7 @@ pub struct GrepTool {
 }
 
 impl GrepTool {
-    pub fn new(project: Entity<Project>) -> Self {
+    pub const fn new(project: Entity<Project>) -> Self {
         Self { project }
     }
 }
  
  
  
    
    @@ -42,7 +42,7 @@ pub struct ListDirectoryTool {
 }
 
 impl ListDirectoryTool {
-    pub fn new(project: Entity<Project>) -> Self {
+    pub const fn new(project: Entity<Project>) -> Self {
         Self { project }
     }
 }
  
  
  
    
    @@ -43,7 +43,7 @@ pub struct MovePathTool {
 }
 
 impl MovePathTool {
-    pub fn new(project: Entity<Project>) -> Self {
+    pub const fn new(project: Entity<Project>) -> Self {
         Self { project }
     }
 }
  
  
  
    
    @@ -28,7 +28,7 @@ pub struct OpenTool {
 }
 
 impl OpenTool {
-    pub fn new(project: Entity<Project>) -> Self {
+    pub const fn new(project: Entity<Project>) -> Self {
         Self { project }
     }
 }
  
  
  
    
    @@ -47,7 +47,7 @@ pub struct ReadFileTool {
 }
 
 impl ReadFileTool {
-    pub fn new(project: Entity<Project>, action_log: Entity<ActionLog>) -> Self {
+    pub const fn new(project: Entity<Project>, action_log: Entity<ActionLog>) -> Self {
         Self {
             project,
             action_log,
  
  
  
    
    @@ -197,7 +197,7 @@ impl AcpConnection {
         })
     }
 
-    pub fn prompt_capabilities(&self) -> &acp::PromptCapabilities {
+    pub const fn prompt_capabilities(&self) -> &acp::PromptCapabilities {
         &self.agent_capabilities.prompt_capabilities
     }
 
@@ -548,7 +548,7 @@ struct AcpModelSelector {
 }
 
 impl AcpModelSelector {
-    fn new(
+    const fn new(
         session_id: acp::SessionId,
         connection: Rc<acp::ClientSideConnection>,
         state: Rc<RefCell<acp::SessionModelState>>,
  
  
  
    
    @@ -34,7 +34,7 @@ pub struct AgentServerDelegate {
 }
 
 impl AgentServerDelegate {
-    pub fn new(
+    pub const fn new(
         store: Entity<AgentServerStore>,
         project: Entity<Project>,
         status_tx: Option<watch::Sender<SharedString>>,
@@ -48,7 +48,7 @@ impl AgentServerDelegate {
         }
     }
 
-    pub fn project(&self) -> &Entity<Project> {
+    pub const fn project(&self) -> &Entity<Project> {
         &self.project
     }
 }
  
  
  
    
    @@ -15,7 +15,7 @@ pub struct CustomAgentServer {
 }
 
 impl CustomAgentServer {
-    pub fn new(name: SharedString) -> Self {
+    pub const fn new(name: SharedString) -> Self {
         Self { name }
     }
 }
  
  
  
    
    @@ -33,11 +33,11 @@ pub struct AgentProfile {
 pub type AvailableProfiles = IndexMap<AgentProfileId, SharedString>;
 
 impl AgentProfile {
-    pub fn new(id: AgentProfileId) -> Self {
+    pub const fn new(id: AgentProfileId) -> Self {
         Self { id }
     }
 
-    pub fn id(&self) -> &AgentProfileId {
+    pub const fn id(&self) -> &AgentProfileId {
         &self.id
     }
 
  
  
  
    
    @@ -96,7 +96,7 @@ impl AgentSettings {
         });
     }
 
-    pub fn set_message_editor_max_lines(&self) -> usize {
+    pub const fn set_message_editor_max_lines(&self) -> usize {
         self.message_editor_min_lines * 2
     }
 }
  
  
  
    
    @@ -76,7 +76,7 @@ pub struct ContextPickerCompletionProvider {
 }
 
 impl ContextPickerCompletionProvider {
-    pub fn new(
+    pub const fn new(
         message_editor: WeakEntity<MessageEditor>,
         workspace: WeakEntity<Workspace>,
         history_store: Entity<HistoryStore>,
  
  
  
    
    @@ -32,7 +32,7 @@ pub struct EntryViewState {
 }
 
 impl EntryViewState {
-    pub fn new(
+    pub const fn new(
         workspace: WeakEntity<Workspace>,
         project: Entity<Project>,
         history_store: Entity<HistoryStore>,
@@ -272,7 +272,7 @@ impl Entry {
         }
     }
 
-    pub fn message_editor(&self) -> Option<&Entity<MessageEditor>> {
+    pub const fn message_editor(&self) -> Option<&Entity<MessageEditor>> {
         match self {
             Self::UserMessage(editor) => Some(editor),
             Self::AssistantMessage(_) | Self::Content(_) => None,
@@ -306,7 +306,7 @@ impl Entry {
         }
     }
 
-    fn content_map(&self) -> Option<&HashMap<EntityId, AnyEntity>> {
+    const fn content_map(&self) -> Option<&HashMap<EntityId, AnyEntity>> {
         match self {
             Self::Content(map) => Some(map),
             _ => None,
  
  
  
    
    @@ -1561,7 +1561,7 @@ impl MentionSet {
 pub struct MessageEditorAddon {}
 
 impl MessageEditorAddon {
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         Self {}
     }
 }
  
  
  
    
    @@ -95,7 +95,7 @@ impl AcpModelPickerDelegate {
         }
     }
 
-    pub fn active_model(&self) -> Option<&AgentModelInfo> {
+    pub const fn active_model(&self) -> Option<&AgentModelInfo> {
         self.selected_model.as_ref()
     }
 }
  
  
  
    
    @@ -42,7 +42,7 @@ enum ListItemType {
 }
 
 impl ListItemType {
-    fn history_entry(&self) -> Option<&HistoryEntry> {
+    const fn history_entry(&self) -> Option<&HistoryEntry> {
         match self {
             ListItemType::Entry { entry, .. } => Some(entry),
             ListItemType::SearchResult { entry, .. } => Some(entry),
@@ -540,7 +540,7 @@ impl AcpHistoryEntryElement {
         }
     }
 
-    pub fn hovered(mut self, hovered: bool) -> Self {
+    pub const fn hovered(mut self, hovered: bool) -> Self {
         self.hovered = hovered;
         self
     }
  
  
  
    
    @@ -820,11 +820,11 @@ impl AcpThreadView {
         }
     }
 
-    pub fn workspace(&self) -> &WeakEntity<Workspace> {
+    pub const fn workspace(&self) -> &WeakEntity<Workspace> {
         &self.workspace
     }
 
-    pub fn thread(&self) -> Option<&Entity<AcpThread>> {
+    pub const fn thread(&self) -> Option<&Entity<AcpThread>> {
         match &self.thread_state {
             ThreadState::Ready { thread, .. } => Some(thread),
             ThreadState::Unauthenticated { .. }
@@ -833,7 +833,7 @@ impl AcpThreadView {
         }
     }
 
-    pub fn mode_selector(&self) -> Option<&Entity<ModeSelector>> {
+    pub const fn mode_selector(&self) -> Option<&Entity<ModeSelector>> {
         match &self.thread_state {
             ThreadState::Ready { mode_selector, .. } => mode_selector.as_ref(),
             ThreadState::Unauthenticated { .. }
  
  
  
    
    @@ -19,13 +19,13 @@ pub enum LlmCompatibleProvider {
 }
 
 impl LlmCompatibleProvider {
-    fn name(&self) -> &'static str {
+    const fn name(&self) -> &'static str {
         match self {
             LlmCompatibleProvider::OpenAi => "OpenAI",
         }
     }
 
-    fn api_url(&self) -> &'static str {
+    const fn api_url(&self) -> &'static str {
         match self {
             LlmCompatibleProvider::OpenAi => "https://api.openai.com/v1",
         }
  
  
  
    
    @@ -60,11 +60,11 @@ enum ConfigurationSource {
 }
 
 impl ConfigurationSource {
-    fn has_configuration_options(&self) -> bool {
+    const fn has_configuration_options(&self) -> bool {
         !matches!(self, ConfigurationSource::Extension { editor: None, .. })
     }
 
-    fn is_new(&self) -> bool {
+    const fn is_new(&self) -> bool {
         matches!(self, ConfigurationSource::New { .. })
     }
 
  
  
  
    
    @@ -240,7 +240,7 @@ impl AgentType {
         }
     }
 
-    fn icon(&self) -> Option<IconName> {
+    const fn icon(&self) -> Option<IconName> {
         match self {
             Self::NativeAgent | Self::TextThread => None,
             Self::Gemini => Some(IconName::AiGemini),
@@ -264,7 +264,7 @@ impl From<ExternalAgent> for AgentType {
 }
 
 impl ActiveView {
-    pub fn which_font_size_used(&self) -> WhichFontSize {
+    pub const fn which_font_size_used(&self) -> WhichFontSize {
         match self {
             ActiveView::ExternalAgentThread { .. } | ActiveView::History => {
                 WhichFontSize::AgentFont
@@ -676,23 +676,23 @@ impl AgentPanel {
         }
     }
 
-    pub(crate) fn prompt_store(&self) -> &Option<Entity<PromptStore>> {
+    pub(crate) const fn prompt_store(&self) -> &Option<Entity<PromptStore>> {
         &self.prompt_store
     }
 
-    pub(crate) fn inline_assist_context_store(&self) -> &Entity<ContextStore> {
+    pub(crate) const fn inline_assist_context_store(&self) -> &Entity<ContextStore> {
         &self.inline_assist_context_store
     }
 
-    pub(crate) fn thread_store(&self) -> &Entity<HistoryStore> {
+    pub(crate) const fn thread_store(&self) -> &Entity<HistoryStore> {
         &self.history_store
     }
 
-    pub(crate) fn context_server_registry(&self) -> &Entity<ContextServerRegistry> {
+    pub(crate) const fn context_server_registry(&self) -> &Entity<ContextServerRegistry> {
         &self.context_server_registry
     }
 
-    fn active_thread_view(&self) -> Option<&Entity<AcpThreadView>> {
+    const fn active_thread_view(&self) -> Option<&Entity<AcpThreadView>> {
         match &self.active_view {
             ActiveView::ExternalAgentThread { thread_view, .. } => Some(thread_view),
             ActiveView::TextThread { .. } | ActiveView::History | ActiveView::Configuration => None,
@@ -2484,7 +2484,7 @@ struct PromptLibraryInlineAssist {
 }
 
 impl PromptLibraryInlineAssist {
-    pub fn new(workspace: WeakEntity<Workspace>) -> Self {
+    pub const fn new(workspace: WeakEntity<Workspace>) -> Self {
         Self { workspace }
     }
 }
  
  
  
    
    @@ -218,7 +218,7 @@ pub struct ManageProfiles {
 }
 
 impl ManageProfiles {
-    pub fn customize_tools(profile_id: AgentProfileId) -> Self {
+    pub const fn customize_tools(profile_id: AgentProfileId) -> Self {
         Self {
             customize_tools: Some(profile_id),
         }
  
  
  
    
    @@ -941,7 +941,7 @@ impl<T> StripInvalidSpans<T>
 where
     T: Stream<Item = Result<String>>,
 {
-    fn new(stream: T) -> Self {
+    const fn new(stream: T) -> Self {
         Self {
             stream,
             stream_done: false,
@@ -1067,7 +1067,7 @@ pub struct Diff {
 }
 
 impl Diff {
-    fn is_empty(&self) -> bool {
+    const fn is_empty(&self) -> bool {
         self.deleted_row_ranges.is_empty() && self.inserted_row_ranges.is_empty()
     }
 }
  
  
  
    
    @@ -34,7 +34,7 @@ pub enum ContextKind {
 }
 
 impl ContextKind {
-    pub fn icon(&self) -> IconName {
+    pub const fn icon(&self) -> IconName {
         match self {
             ContextKind::File => IconName::File,
             ContextKind::Directory => IconName::Folder,
@@ -68,7 +68,7 @@ pub enum AgentContextHandle {
 }
 
 impl AgentContextHandle {
-    pub fn id(&self) -> ContextId {
+    pub const fn id(&self) -> ContextId {
         match self {
             Self::File(context) => context.context_id,
             Self::Directory(context) => context.context_id,
@@ -82,7 +82,7 @@ impl AgentContextHandle {
         }
     }
 
-    pub fn element_id(&self, name: SharedString) -> ElementId {
+    pub const fn element_id(&self, name: SharedString) -> ElementId {
         ElementId::NamedInteger(name, self.id().0)
     }
 }
@@ -130,11 +130,11 @@ impl AgentContext {
 pub struct ContextId(u64);
 
 impl ContextId {
-    pub fn zero() -> Self {
+    pub const fn zero() -> Self {
         ContextId(0)
     }
 
-    fn for_lookup() -> Self {
+    const fn for_lookup() -> Self {
         ContextId(u64::MAX)
     }
 
@@ -519,7 +519,7 @@ impl FetchedUrlContext {
         }))
     }
 
-    pub fn load(self) -> Task<Option<AgentContext>> {
+    pub const fn load(self) -> Task<Option<AgentContext>> {
         Task::ready(Some(AgentContext::FetchedUrl(self)))
     }
 }
@@ -649,7 +649,7 @@ impl RulesContextHandle {
         self.prompt_id.hash(state)
     }
 
-    pub fn lookup_key(prompt_id: UserPromptId) -> AgentContextKey {
+    pub const fn lookup_key(prompt_id: UserPromptId) -> AgentContextKey {
         AgentContextKey(AgentContextHandle::Rules(RulesContextHandle {
             prompt_id,
             context_id: ContextId::for_lookup(),
  
  
  
    
    @@ -47,21 +47,21 @@ pub(crate) enum ContextPickerEntry {
 }
 
 impl ContextPickerEntry {
-    pub fn keyword(&self) -> &'static str {
+    pub const fn keyword(&self) -> &'static str {
         match self {
             Self::Mode(mode) => mode.keyword(),
             Self::Action(action) => action.keyword(),
         }
     }
 
-    pub fn label(&self) -> &'static str {
+    pub const fn label(&self) -> &'static str {
         match self {
             Self::Mode(mode) => mode.label(),
             Self::Action(action) => action.label(),
         }
     }
 
-    pub fn icon(&self) -> IconName {
+    pub const fn icon(&self) -> IconName {
         match self {
             Self::Mode(mode) => mode.icon(),
             Self::Action(action) => action.icon(),
@@ -84,19 +84,19 @@ pub(crate) enum ContextPickerAction {
 }
 
 impl ContextPickerAction {
-    pub fn keyword(&self) -> &'static str {
+    pub const fn keyword(&self) -> &'static str {
         match self {
             Self::AddSelections => "selection",
         }
     }
 
-    pub fn label(&self) -> &'static str {
+    pub const fn label(&self) -> &'static str {
         match self {
             Self::AddSelections => "Selection",
         }
     }
 
-    pub fn icon(&self) -> IconName {
+    pub const fn icon(&self) -> IconName {
         match self {
             Self::AddSelections => IconName::Reader,
         }
@@ -119,7 +119,7 @@ impl TryFrom<&str> for ContextPickerMode {
 }
 
 impl ContextPickerMode {
-    pub fn keyword(&self) -> &'static str {
+    pub const fn keyword(&self) -> &'static str {
         match self {
             Self::File => "file",
             Self::Symbol => "symbol",
@@ -129,7 +129,7 @@ impl ContextPickerMode {
         }
     }
 
-    pub fn label(&self) -> &'static str {
+    pub const fn label(&self) -> &'static str {
         match self {
             Self::File => "Files & Directories",
             Self::Symbol => "Symbols",
@@ -139,7 +139,7 @@ impl ContextPickerMode {
         }
     }
 
-    pub fn icon(&self) -> IconName {
+    pub const fn icon(&self) -> IconName {
         match self {
             Self::File => IconName::File,
             Self::Symbol => IconName::Code,
@@ -281,7 +281,7 @@ impl ContextPicker {
     }
 
     /// Whether threads are allowed as context.
-    pub fn allow_threads(&self) -> bool {
+    pub const fn allow_threads(&self) -> bool {
         self.thread_store.is_some()
     }
 
  
  
  
    
    @@ -243,7 +243,7 @@ pub struct ContextPickerCompletionProvider {
 }
 
 impl ContextPickerCompletionProvider {
-    pub fn new(
+    pub const fn new(
         workspace: WeakEntity<Workspace>,
         context_store: WeakEntity<ContextStore>,
         thread_store: Option<WeakEntity<HistoryStore>>,
  
  
  
    
    @@ -59,7 +59,7 @@ pub struct FetchContextPickerDelegate {
 }
 
 impl FetchContextPickerDelegate {
-    pub fn new(
+    pub const fn new(
         context_picker: WeakEntity<ContextPicker>,
         workspace: WeakEntity<Workspace>,
         context_store: WeakEntity<ContextStore>,
  
  
  
    
    @@ -57,7 +57,7 @@ pub struct FileContextPickerDelegate {
 }
 
 impl FileContextPickerDelegate {
-    pub fn new(
+    pub const fn new(
         context_picker: WeakEntity<ContextPicker>,
         workspace: WeakEntity<Workspace>,
         context_store: WeakEntity<ContextStore>,
  
  
  
    
    @@ -59,7 +59,7 @@ pub struct RulesContextPickerDelegate {
 }
 
 impl RulesContextPickerDelegate {
-    pub fn new(
+    pub const fn new(
         prompt_store: WeakEntity<PromptStore>,
         context_picker: WeakEntity<ContextPicker>,
         context_store: WeakEntity<context_store::ContextStore>,
  
  
  
    
    @@ -59,7 +59,7 @@ pub struct SymbolContextPickerDelegate {
 }
 
 impl SymbolContextPickerDelegate {
-    pub fn new(
+    pub const fn new(
         context_picker: WeakEntity<ContextPicker>,
         workspace: WeakEntity<Workspace>,
         context_store: WeakEntity<ContextStore>,
  
  
  
    
    @@ -59,7 +59,7 @@ pub struct ThreadContextPickerDelegate {
 }
 
 impl ThreadContextPickerDelegate {
-    pub fn new(
+    pub const fn new(
         thread_store: WeakEntity<HistoryStore>,
         context_picker: WeakEntity<ContextPicker>,
         context_store: WeakEntity<context_store::ContextStore>,
  
  
  
    
    @@ -526,7 +526,7 @@ impl ContextStore {
             .collect()
     }
 
-    pub fn thread_ids(&self) -> &HashSet<acp::SessionId> {
+    pub const fn thread_ids(&self) -> &HashSet<acp::SessionId> {
         &self.context_thread_ids
     }
 }
@@ -549,7 +549,7 @@ pub enum SuggestedContext {
 }
 
 impl SuggestedContext {
-    pub fn name(&self) -> &SharedString {
+    pub const fn name(&self) -> &SharedString {
         match self {
             Self::File { name, .. } => name,
             // Self::Thread { name, .. } => name,
@@ -565,7 +565,7 @@ impl SuggestedContext {
         }
     }
 
-    pub fn kind(&self) -> ContextKind {
+    pub const fn kind(&self) -> ContextKind {
         match self {
             Self::File { .. } => ContextKind::File,
             // Self::Thread { .. } => ContextKind::Thread,
  
  
  
    
    @@ -1618,7 +1618,7 @@ struct InlineAssistGroup {
 }
 
 impl InlineAssistGroup {
-    fn new() -> Self {
+    const fn new() -> Self {
         Self {
             assist_ids: Vec::new(),
             linked: true,
@@ -1642,7 +1642,7 @@ fn build_assist_editor_renderer(editor: &Entity<PromptEditor<BufferCodegen>>) ->
 struct InlineAssistGroupId(usize);
 
 impl InlineAssistGroupId {
-    fn post_inc(&mut self) -> InlineAssistGroupId {
+    const fn post_inc(&mut self) -> InlineAssistGroupId {
         let id = *self;
         self.0 += 1;
         id
  
  
  
    
    @@ -759,7 +759,7 @@ pub enum PromptEditorEvent {
 pub struct InlineAssistId(pub usize);
 
 impl InlineAssistId {
-    pub fn post_inc(&mut self) -> InlineAssistId {
+    pub const fn post_inc(&mut self) -> InlineAssistId {
         let id = *self;
         self.0 += 1;
         id
@@ -932,7 +932,7 @@ impl PromptEditor<BufferCodegen> {
 pub struct TerminalInlineAssistId(pub usize);
 
 impl TerminalInlineAssistId {
-    pub fn post_inc(&mut self) -> TerminalInlineAssistId {
+    pub const fn post_inc(&mut self) -> TerminalInlineAssistId {
         let id = *self;
         self.0 += 1;
         id
@@ -1135,27 +1135,27 @@ pub enum GenerationMode {
 }
 
 impl GenerationMode {
-    fn start_label(self) -> &'static str {
+    const fn start_label(self) -> &'static str {
         match self {
             GenerationMode::Generate => "Generate",
             GenerationMode::Transform => "Transform",
         }
     }
-    fn tooltip_interrupt(self) -> &'static str {
+    const fn tooltip_interrupt(self) -> &'static str {
         match self {
             GenerationMode::Generate => "Interrupt Generation",
             GenerationMode::Transform => "Interrupt Transform",
         }
     }
 
-    fn tooltip_restart(self) -> &'static str {
+    const fn tooltip_restart(self) -> &'static str {
         match self {
             GenerationMode::Generate => "Restart Generation",
             GenerationMode::Transform => "Restart Transform",
         }
     }
 
-    fn tooltip_accept(self) -> &'static str {
+    const fn tooltip_accept(self) -> &'static str {
         match self {
             GenerationMode::Generate => "Accept Generation",
             GenerationMode::Transform => "Accept Transform",
  
  
  
    
    @@ -56,7 +56,7 @@ where
     T: PopoverTrigger + ButtonCommon,
     TT: Fn(&mut Window, &mut App) -> AnyView + 'static,
 {
-    pub(crate) fn new(
+    pub(crate) const fn new(
         working_set: Arc<SlashCommandWorkingSet>,
         active_context_editor: WeakEntity<TextThreadEditor>,
         trigger: T,
  
  
  
    
    @@ -21,7 +21,7 @@ pub struct TerminalCodegen {
 impl EventEmitter<CodegenEvent> for TerminalCodegen {}
 
 impl TerminalCodegen {
-    pub fn new(terminal: Entity<Terminal>, telemetry: Option<Arc<Telemetry>>) -> Self {
+    pub const fn new(terminal: Entity<Terminal>, telemetry: Option<Arc<Telemetry>>) -> Self {
         Self {
             terminal,
             telemetry,
@@ -171,7 +171,7 @@ struct TerminalTransaction {
 }
 
 impl TerminalTransaction {
-    pub fn start(terminal: Entity<Terminal>) -> Self {
+    pub const fn start(terminal: Entity<Terminal>) -> Self {
         Self { terminal }
     }
 
  
  
  
    
    @@ -338,11 +338,11 @@ impl TextThreadEditor {
         });
     }
 
-    pub fn context(&self) -> &Entity<AssistantContext> {
+    pub const fn context(&self) -> &Entity<AssistantContext> {
         &self.context
     }
 
-    pub fn editor(&self) -> &Entity<Editor> {
+    pub const fn editor(&self) -> &Entity<Editor> {
         &self.editor
     }
 
  
  
  
    
    @@ -7,11 +7,11 @@ pub struct BurnModeTooltip {
 }
 
 impl BurnModeTooltip {
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         Self { selected: false }
     }
 
-    pub fn selected(mut self, selected: bool) -> Self {
+    pub const fn selected(mut self, selected: bool) -> Self {
         self.selected = selected;
         self
     }
  
  
  
    
    @@ -6,7 +6,7 @@ pub struct UnavailableEditingTooltip {
 }
 
 impl UnavailableEditingTooltip {
-    pub fn new(agent_name: SharedString) -> Self {
+    pub const fn new(agent_name: SharedString) -> Self {
         Self { agent_name }
     }
 }
  
  
  
    
    @@ -11,7 +11,7 @@ pub struct UsageCallout {
 }
 
 impl UsageCallout {
-    pub fn new(plan: Plan, usage: ModelRequestUsage) -> Self {
+    pub const fn new(plan: Plan, usage: ModelRequestUsage) -> Self {
         Self { plan, usage }
     }
 }
  
  
  
    
    @@ -105,7 +105,7 @@ impl Render for ApiKeysWithProviders {
 pub struct ApiKeysWithoutProviders;
 
 impl ApiKeysWithoutProviders {
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         Self
     }
 }
  
  
  
    
    @@ -41,7 +41,7 @@ impl AiUpsellCard {
         }
     }
 
-    pub fn tab_index(mut self, tab_index: Option<isize>) -> Self {
+    pub const fn tab_index(mut self, tab_index: Option<isize>) -> Self {
         self.tab_index = tab_index;
         self
     }
  
  
  
    
    @@ -126,7 +126,7 @@ pub enum Model {
 }
 
 impl Model {
-    pub fn default_fast() -> Self {
+    pub const fn default_fast() -> Self {
         Self::Claude3_5Haiku
     }
 
@@ -297,7 +297,7 @@ impl Model {
         }
     }
 
-    pub fn max_token_count(&self) -> u64 {
+    pub const fn max_token_count(&self) -> u64 {
         match self {
             Self::ClaudeOpus4
             | Self::ClaudeOpus4_1
  
  
  
    
    @@ -62,7 +62,7 @@ impl ContextId {
         Self(Uuid::new_v4().to_string())
     }
 
-    pub fn from_proto(id: String) -> Self {
+    pub const fn from_proto(id: String) -> Self {
         Self(id)
     }
 
@@ -75,7 +75,7 @@ impl ContextId {
 pub struct MessageId(pub clock::Lamport);
 
 impl MessageId {
-    pub fn as_u64(self) -> u64 {
+    pub const fn as_u64(self) -> u64 {
         self.0.as_u64()
     }
 }
@@ -505,14 +505,14 @@ impl ContextSummary {
             .map_or_else(|| message.into(), |content| content.text.clone().into())
     }
 
-    pub fn content(&self) -> Option<&ContextSummaryContent> {
+    pub const fn content(&self) -> Option<&ContextSummaryContent> {
         match self {
             ContextSummary::Content(content) => Some(content),
             ContextSummary::Pending | ContextSummary::Error => None,
         }
     }
 
-    fn content_as_mut(&mut self) -> Option<&mut ContextSummaryContent> {
+    const fn content_as_mut(&mut self) -> Option<&mut ContextSummaryContent> {
         match self {
             ContextSummary::Content(content) => Some(content),
             ContextSummary::Pending | ContextSummary::Error => None,
@@ -530,11 +530,11 @@ impl ContextSummary {
         }
     }
 
-    pub fn is_pending(&self) -> bool {
+    pub const fn is_pending(&self) -> bool {
         matches!(self, ContextSummary::Pending)
     }
 
-    fn timestamp(&self) -> Option<clock::Lamport> {
+    const fn timestamp(&self) -> Option<clock::Lamport> {
         match self {
             ContextSummary::Content(content) => Some(content.timestamp),
             ContextSummary::Pending | ContextSummary::Error => None,
@@ -636,7 +636,7 @@ pub enum Content {
 }
 
 impl Content {
-    fn range(&self) -> Range<language::Anchor> {
+    const fn range(&self) -> Range<language::Anchor> {
         match self {
             Self::Image { anchor, .. } => *anchor..*anchor,
         }
@@ -731,11 +731,11 @@ impl AssistantContext {
         )
     }
 
-    pub fn completion_mode(&self) -> agent_settings::CompletionMode {
+    pub const fn completion_mode(&self) -> agent_settings::CompletionMode {
         self.completion_mode
     }
 
-    pub fn set_completion_mode(&mut self, completion_mode: agent_settings::CompletionMode) {
+    pub const fn set_completion_mode(&mut self, completion_mode: agent_settings::CompletionMode) {
         self.completion_mode = completion_mode;
     }
 
@@ -902,11 +902,11 @@ impl AssistantContext {
         this
     }
 
-    pub fn id(&self) -> &ContextId {
+    pub const fn id(&self) -> &ContextId {
         &self.id
     }
 
-    pub fn replica_id(&self) -> ReplicaId {
+    pub const fn replica_id(&self) -> ReplicaId {
         self.timestamp.replica_id
     }
 
@@ -917,7 +917,7 @@ impl AssistantContext {
         }
     }
 
-    pub fn slash_commands(&self) -> &Arc<SlashCommandWorkingSet> {
+    pub const fn slash_commands(&self) -> &Arc<SlashCommandWorkingSet> {
         &self.slash_commands
     }
 
@@ -1165,7 +1165,7 @@ impl AssistantContext {
         cx.emit(ContextEvent::Operation(op));
     }
 
-    pub fn buffer(&self) -> &Entity<Buffer> {
+    pub const fn buffer(&self) -> &Entity<Buffer> {
         &self.buffer
     }
 
@@ -1181,11 +1181,11 @@ impl AssistantContext {
         self.prompt_builder.clone()
     }
 
-    pub fn path(&self) -> Option<&Arc<Path>> {
+    pub const fn path(&self) -> Option<&Arc<Path>> {
         self.path.as_ref()
     }
 
-    pub fn summary(&self) -> &ContextSummary {
+    pub const fn summary(&self) -> &ContextSummary {
         &self.summary
     }
 
@@ -1258,7 +1258,7 @@ impl AssistantContext {
         }
     }
 
-    pub fn token_count(&self) -> Option<u64> {
+    pub const fn token_count(&self) -> Option<u64> {
         self.token_count
     }
 
@@ -3046,7 +3046,7 @@ pub enum PendingToolUseStatus {
 }
 
 impl PendingToolUseStatus {
-    pub fn is_idle(&self) -> bool {
+    pub const fn is_idle(&self) -> bool {
         matches!(self, PendingToolUseStatus::Idle)
     }
 }
  
  
  
    
    @@ -47,7 +47,7 @@ impl From<bool> for AfterCompletion {
 }
 
 impl AfterCompletion {
-    pub fn run(&self) -> bool {
+    pub const fn run(&self) -> bool {
         match self {
             AfterCompletion::Run => true,
             AfterCompletion::Compose | AfterCompletion::Continue => false,
  
  
  
    
    @@ -23,7 +23,7 @@ pub struct ContextServerSlashCommand {
 }
 
 impl ContextServerSlashCommand {
-    pub fn new(store: Entity<ContextServerStore>, id: ContextServerId, prompt: Prompt) -> Self {
+    pub const fn new(store: Entity<ContextServerStore>, id: ContextServerId, prompt: Prompt) -> Self {
         Self {
             server_id: id,
             prompt,
@@ -242,7 +242,7 @@ fn prompt_arguments(prompt: &Prompt, arguments: &[String]) -> Result<HashMap<Str
 /// MCP servers can return prompts with multiple arguments. Since we only
 /// support one argument, we ignore all others. This is the necessary predicate
 /// for this.
-pub fn acceptable_prompt(prompt: &Prompt) -> bool {
+pub const fn acceptable_prompt(prompt: &Prompt) -> bool {
     match &prompt.arguments {
         None => true,
         Some(args) if args.len() <= 1 => true,
  
  
  
    
    @@ -65,7 +65,7 @@ pub enum Sound {
 }
 
 impl Sound {
-    fn file(&self) -> &'static str {
+    const fn file(&self) -> &'static str {
         match self {
             Self::Joined => "joined_call",
             Self::GuestJoined => "guest_joined_call",
  
  
  
    
    @@ -67,7 +67,7 @@ pub enum AutoUpdateStatus {
 }
 
 impl AutoUpdateStatus {
-    pub fn is_updated(&self) -> bool {
+    pub const fn is_updated(&self) -> bool {
         matches!(self, Self::Updated { .. })
     }
 }
@@ -371,7 +371,7 @@ impl AutoUpdater {
         }));
     }
 
-    pub fn current_version(&self) -> SemanticVersion {
+    pub const fn current_version(&self) -> SemanticVersion {
         self.current_version
     }
 
  
  
  
    
    @@ -357,7 +357,7 @@ impl Model {
         }
     }
 
-    pub fn max_token_count(&self) -> u64 {
+    pub const fn max_token_count(&self) -> u64 {
         match self {
             Self::Claude3_5SonnetV2
             | Self::Claude3Opus
@@ -421,7 +421,7 @@ impl Model {
         }
     }
 
-    pub fn supports_tool_use(&self) -> bool {
+    pub const fn supports_tool_use(&self) -> bool {
         match self {
             // Anthropic Claude 3 models (all support tool use)
             Self::Claude3Opus
@@ -458,7 +458,7 @@ impl Model {
         }
     }
 
-    pub fn supports_caching(&self) -> bool {
+    pub const fn supports_caching(&self) -> bool {
         match self {
             // Only Claude models on Bedrock support caching
             // Nova models support only text caching
@@ -514,7 +514,7 @@ impl Model {
         }
     }
 
-    pub fn mode(&self) -> BedrockModelMode {
+    pub const fn mode(&self) -> BedrockModelMode {
         match self {
             Model::Claude3_7SonnetThinking => BedrockModelMode::Thinking {
                 budget_tokens: Some(4096),
  
  
  
    
    @@ -284,7 +284,7 @@ impl BufferDiffSnapshot {
         self.inner.hunks_intersecting_range_rev(range, buffer)
     }
 
-    pub fn base_text(&self) -> &language::BufferSnapshot {
+    pub const fn base_text(&self) -> &language::BufferSnapshot {
         &self.inner.base_text
     }
 
@@ -1098,11 +1098,11 @@ impl BufferDiff {
         changed_range
     }
 
-    pub fn base_text(&self) -> &language::BufferSnapshot {
+    pub const fn base_text(&self) -> &language::BufferSnapshot {
         &self.inner.base_text
     }
 
-    pub fn base_text_exists(&self) -> bool {
+    pub const fn base_text_exists(&self) -> bool {
         self.inner.base_text_exists
     }
 
@@ -1248,7 +1248,7 @@ impl DiffHunk {
 }
 
 impl DiffHunkStatus {
-    pub fn has_secondary_hunk(&self) -> bool {
+    pub const fn has_secondary_hunk(&self) -> bool {
         matches!(
             self.secondary,
             DiffHunkSecondaryStatus::HasSecondaryHunk
@@ -1257,7 +1257,7 @@ impl DiffHunkStatus {
         )
     }
 
-    pub fn is_pending(&self) -> bool {
+    pub const fn is_pending(&self) -> bool {
         matches!(
             self.secondary,
             DiffHunkSecondaryStatus::SecondaryHunkAdditionPending
@@ -1277,42 +1277,42 @@ impl DiffHunkStatus {
         self.kind == DiffHunkStatusKind::Modified
     }
 
-    pub fn added(secondary: DiffHunkSecondaryStatus) -> Self {
+    pub const fn added(secondary: DiffHunkSecondaryStatus) -> Self {
         Self {
             kind: DiffHunkStatusKind::Added,
             secondary,
         }
     }
 
-    pub fn modified(secondary: DiffHunkSecondaryStatus) -> Self {
+    pub const fn modified(secondary: DiffHunkSecondaryStatus) -> Self {
         Self {
             kind: DiffHunkStatusKind::Modified,
             secondary,
         }
     }
 
-    pub fn deleted(secondary: DiffHunkSecondaryStatus) -> Self {
+    pub const fn deleted(secondary: DiffHunkSecondaryStatus) -> Self {
         Self {
             kind: DiffHunkStatusKind::Deleted,
             secondary,
         }
     }
 
-    pub fn deleted_none() -> Self {
+    pub const fn deleted_none() -> Self {
         Self {
             kind: DiffHunkStatusKind::Deleted,
             secondary: DiffHunkSecondaryStatus::NoSecondaryHunk,
         }
     }
 
-    pub fn added_none() -> Self {
+    pub const fn added_none() -> Self {
         Self {
             kind: DiffHunkStatusKind::Added,
             secondary: DiffHunkSecondaryStatus::NoSecondaryHunk,
         }
     }
 
-    pub fn modified_none() -> Self {
+    pub const fn modified_none() -> Self {
         Self {
             kind: DiffHunkStatusKind::Modified,
             secondary: DiffHunkSecondaryStatus::NoSecondaryHunk,
  
  
  
    
    @@ -404,7 +404,7 @@ impl ActiveCall {
         room.update(cx, |room, cx| room.unshare_project(project, cx))
     }
 
-    pub fn location(&self) -> Option<&WeakEntity<Project>> {
+    pub const fn location(&self) -> Option<&WeakEntity<Project>> {
         self.location.as_ref()
     }
 
@@ -466,7 +466,7 @@ impl ActiveCall {
         self.client.clone()
     }
 
-    pub fn pending_invites(&self) -> &HashSet<u64> {
+    pub const fn pending_invites(&self) -> &HashSet<u64> {
         &self.pending_invites
     }
 
  
  
  
    
    @@ -41,7 +41,7 @@ pub struct LocalParticipant {
 }
 
 impl LocalParticipant {
-    pub fn can_write(&self) -> bool {
+    pub const fn can_write(&self) -> bool {
         matches!(
             self.role,
             proto::ChannelRole::Admin | proto::ChannelRole::Member
@@ -67,7 +67,7 @@ impl RemoteParticipant {
         !self.video_tracks.is_empty()
     }
 
-    pub fn can_write(&self) -> bool {
+    pub const fn can_write(&self) -> bool {
         matches!(
             self.role,
             proto::ChannelRole::Admin | proto::ChannelRole::Member
  
  
  
    
    @@ -92,7 +92,7 @@ pub struct Room {
 impl EventEmitter<Event> for Room {}
 
 impl Room {
-    pub fn channel_id(&self) -> Option<ChannelId> {
+    pub const fn channel_id(&self) -> Option<ChannelId> {
         self.channel_id
     }
 
@@ -520,15 +520,15 @@ impl Room {
         })
     }
 
-    pub fn id(&self) -> u64 {
+    pub const fn id(&self) -> u64 {
         self.id
     }
 
-    pub fn status(&self) -> RoomStatus {
+    pub const fn status(&self) -> RoomStatus {
         self.status
     }
 
-    pub fn local_participant(&self) -> &LocalParticipant {
+    pub const fn local_participant(&self) -> &LocalParticipant {
         &self.local_participant
     }
 
@@ -536,7 +536,7 @@ impl Room {
         self.user_store.read(cx).current_user()
     }
 
-    pub fn remote_participants(&self) -> &BTreeMap<u64, RemoteParticipant> {
+    pub const fn remote_participants(&self) -> &BTreeMap<u64, RemoteParticipant> {
         &self.remote_participants
     }
 
@@ -1304,7 +1304,7 @@ impl Room {
         self.live_kit.as_ref().map(|live_kit| live_kit.deafened)
     }
 
-    pub fn can_use_microphone(&self) -> bool {
+    pub const fn can_use_microphone(&self) -> bool {
         use proto::ChannelRole::*;
 
         match self.local_participant.role {
@@ -1313,7 +1313,7 @@ impl Room {
         }
     }
 
-    pub fn can_share_projects(&self) -> bool {
+    pub const fn can_share_projects(&self) -> bool {
         use proto::ChannelRole::*;
         match self.local_participant.role {
             Admin | Member => true,
@@ -1708,11 +1708,11 @@ pub enum RoomStatus {
 }
 
 impl RoomStatus {
-    pub fn is_offline(&self) -> bool {
+    pub const fn is_offline(&self) -> bool {
         matches!(self, RoomStatus::Offline)
     }
 
-    pub fn is_online(&self) -> bool {
+    pub const fn is_online(&self) -> bool {
         matches!(self, RoomStatus::Online)
     }
 }
  
  
  
    
    @@ -119,7 +119,7 @@ impl ChannelBuffer {
         self.buffer.read(cx).remote_id()
     }
 
-    pub fn user_store(&self) -> &Entity<UserStore> {
+    pub const fn user_store(&self) -> &Entity<UserStore> {
         &self.user_store
     }
 
@@ -234,7 +234,7 @@ impl ChannelBuffer {
         }));
     }
 
-    pub fn epoch(&self) -> u64 {
+    pub const fn epoch(&self) -> u64 {
         self.buffer_epoch
     }
 
@@ -242,7 +242,7 @@ impl ChannelBuffer {
         self.buffer.clone()
     }
 
-    pub fn collaborators(&self) -> &HashMap<PeerId, Collaborator> {
+    pub const fn collaborators(&self) -> &HashMap<PeerId, Collaborator> {
         &self.collaborators
     }
 
@@ -268,7 +268,7 @@ impl ChannelBuffer {
         cx.notify()
     }
 
-    pub fn is_connected(&self) -> bool {
+    pub const fn is_connected(&self) -> bool {
         self.connected
     }
 
  
  
  
    
    @@ -85,7 +85,7 @@ impl Channel {
                 .unwrap_or_default()
     }
 
-    pub fn is_root_channel(&self) -> bool {
+    pub const fn is_root_channel(&self) -> bool {
         self.parent_path.is_empty()
     }
 
@@ -797,7 +797,7 @@ impl ChannelStore {
         }
     }
 
-    pub fn has_pending_channel_invite_response(&self, _: &Arc<Channel>) -> bool {
+    pub const fn has_pending_channel_invite_response(&self, _: &Arc<Channel>) -> bool {
         false
     }
 
@@ -1114,7 +1114,7 @@ impl ChannelStore {
 }
 
 impl ChannelState {
-    fn set_role(&mut self, role: ChannelRole) {
+    const fn set_role(&mut self, role: ChannelRole) {
         self.role = Some(role);
     }
 
  
  
  
    
    @@ -11,7 +11,7 @@ pub struct ChannelIndex {
 }
 
 impl ChannelIndex {
-    pub fn by_id(&self) -> &BTreeMap<ChannelId, Arc<Channel>> {
+    pub const fn by_id(&self) -> &BTreeMap<ChannelId, Arc<Channel>> {
         &self.channels_by_id
     }
 
@@ -32,7 +32,7 @@ impl ChannelIndex {
             .retain(|channel_id| !channels.contains(channel_id));
     }
 
-    pub fn bulk_insert(&mut self) -> ChannelPathsInsertGuard<'_> {
+    pub const fn bulk_insert(&mut self) -> ChannelPathsInsertGuard<'_> {
         ChannelPathsInsertGuard {
             channels_ordered: &mut self.channels_ordered,
             channels_by_id: &mut self.channels_by_id,
  
  
  
    
    @@ -283,11 +283,11 @@ pub enum Status {
 }
 
 impl Status {
-    pub fn is_connected(&self) -> bool {
+    pub const fn is_connected(&self) -> bool {
         matches!(self, Self::Connected { .. })
     }
 
-    pub fn was_connected(&self) -> bool {
+    pub const fn was_connected(&self) -> bool {
         matches!(
             self,
             Self::ConnectionLost
@@ -298,18 +298,18 @@ impl Status {
     }
 
     /// Returns whether the client is currently connected or was connected at some point.
-    pub fn is_or_was_connected(&self) -> bool {
+    pub const fn is_or_was_connected(&self) -> bool {
         self.is_connected() || self.was_connected()
     }
 
-    pub fn is_signing_in(&self) -> bool {
+    pub const fn is_signing_in(&self) -> bool {
         matches!(
             self,
             Self::Authenticating | Self::Reauthenticating | Self::Connecting | Self::Reconnecting
         )
     }
 
-    pub fn is_signed_out(&self) -> bool {
+    pub const fn is_signed_out(&self) -> bool {
         matches!(self, Self::SignedOut | Self::UpgradeRequired)
     }
 }
@@ -1692,7 +1692,7 @@ impl Client {
         .ok();
     }
 
-    pub fn telemetry(&self) -> &Arc<Telemetry> {
+    pub const fn telemetry(&self) -> &Arc<Telemetry> {
         &self.telemetry
     }
 }
  
  
  
    
    @@ -42,7 +42,7 @@ impl std::fmt::Display for ChannelId {
 pub struct ProjectId(pub u64);
 
 impl ProjectId {
-    pub fn to_proto(self) -> u64 {
+    pub const fn to_proto(self) -> u64 {
         self.0
     }
 }
@@ -320,7 +320,7 @@ impl UserStore {
         Ok(())
     }
 
-    pub fn invite_info(&self) -> Option<&InviteInfo> {
+    pub const fn invite_info(&self) -> Option<&InviteInfo> {
         self.invite_info.as_ref()
     }
 
@@ -766,7 +766,7 @@ impl UserStore {
         cx.notify();
     }
 
-    pub fn edit_prediction_usage(&self) -> Option<EditPredictionUsage> {
+    pub const fn edit_prediction_usage(&self) -> Option<EditPredictionUsage> {
         self.edit_prediction_usage
     }
 
@@ -879,7 +879,7 @@ impl UserStore {
         }
     }
 
-    pub fn participant_indices(&self) -> &HashMap<u64, ParticipantIndex> {
+    pub const fn participant_indices(&self) -> &HashMap<u64, ParticipantIndex> {
         &self.participant_indices
     }
 
@@ -953,7 +953,7 @@ impl Collaborator {
 }
 
 impl RequestUsage {
-    pub fn over_limit(&self) -> bool {
+    pub const fn over_limit(&self) -> bool {
         match self.limit {
             UsageLimit::Limited(limit) => self.amount >= limit,
             UsageLimit::Unlimited => false,
  
  
  
    
    @@ -182,18 +182,18 @@ impl Lamport {
         value: Seq::MAX,
     };
 
-    pub fn new(replica_id: ReplicaId) -> Self {
+    pub const fn new(replica_id: ReplicaId) -> Self {
         Self {
             value: 1,
             replica_id,
         }
     }
 
-    pub fn as_u64(self) -> u64 {
+    pub const fn as_u64(self) -> u64 {
         ((self.value as u64) << 32) | (self.replica_id as u64)
     }
 
-    pub fn tick(&mut self) -> Self {
+    pub const fn tick(&mut self) -> Self {
         let timestamp = *self;
         self.value += 1;
         timestamp
  
  
  
    
    @@ -26,7 +26,7 @@ pub struct CloudApiClient {
 }
 
 impl CloudApiClient {
-    pub fn new(http_client: Arc<HttpClientWithUrl>) -> Self {
+    pub const fn new(http_client: Arc<HttpClientWithUrl>) -> Self {
         Self {
             credentials: RwLock::new(None),
             http_client,
  
  
  
    
    @@ -6,7 +6,7 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer};
 pub struct Timestamp(pub DateTime<Utc>);
 
 impl Timestamp {
-    pub fn new(datetime: DateTime<Utc>) -> Self {
+    pub const fn new(datetime: DateTime<Utc>) -> Self {
         Self(datetime)
     }
 }
  
  
  
    
    @@ -86,7 +86,7 @@ pub enum Plan {
 }
 
 impl Plan {
-    pub fn is_v2(&self) -> bool {
+    pub const fn is_v2(&self) -> bool {
         matches!(self, Self::V2(_))
     }
 }
  
  
  
    
    @@ -625,7 +625,7 @@ fn declaration_score_density(declaration: &ReferencedDeclaration, style: Declara
     declaration_score(declaration, style) / declaration_size(declaration, style) as f32
 }
 
-fn declaration_score(declaration: &ReferencedDeclaration, style: DeclarationStyle) -> f32 {
+const fn declaration_score(declaration: &ReferencedDeclaration, style: DeclarationStyle) -> f32 {
     match style {
         DeclarationStyle::Signature => declaration.signature_score,
         DeclarationStyle::Declaration => declaration.declaration_score,
  
  
  
    
    @@ -84,7 +84,7 @@ impl Database {
         })
     }
 
-    pub fn options(&self) -> &ConnectOptions {
+    pub const fn options(&self) -> &ConnectOptions {
         &self.options
     }
 
@@ -319,7 +319,7 @@ pub enum Contact {
 }
 
 impl Contact {
-    pub fn user_id(&self) -> UserId {
+    pub const fn user_id(&self) -> UserId {
         match self {
             Contact::Accepted { user_id, .. } => *user_id,
             Contact::Outgoing { user_id } => *user_id,
@@ -675,7 +675,7 @@ pub struct ExtensionVersionConstraints {
 }
 
 impl LocalSettingsKind {
-    pub fn from_proto(proto_kind: proto::LocalSettingsKind) -> Self {
+    pub const fn from_proto(proto_kind: proto::LocalSettingsKind) -> Self {
         match proto_kind {
             proto::LocalSettingsKind::Settings => Self::Settings,
             proto::LocalSettingsKind::Tasks => Self::Tasks,
@@ -684,7 +684,7 @@ impl LocalSettingsKind {
         }
     }
 
-    pub fn to_proto(self) -> proto::LocalSettingsKind {
+    pub const fn to_proto(self) -> proto::LocalSettingsKind {
         match self {
             Self::Settings => proto::LocalSettingsKind::Settings,
             Self::Tasks => proto::LocalSettingsKind::Tasks,
  
  
  
    
    @@ -38,7 +38,7 @@ macro_rules! id_type {
 
             #[allow(unused)]
             #[allow(missing_docs)]
-            pub fn to_proto(self) -> u64 {
+            pub const fn to_proto(self) -> u64 {
                 self.0 as u64
             }
         }
@@ -120,7 +120,7 @@ pub enum ChannelRole {
 
 impl ChannelRole {
     /// Returns true if this role is more powerful than the other role.
-    pub fn should_override(&self, other: Self) -> bool {
+    pub const fn should_override(&self, other: Self) -> bool {
         use ChannelRole::*;
         match self {
             Admin => matches!(other, Member | Banned | Talker | Guest),
@@ -132,7 +132,7 @@ impl ChannelRole {
     }
 
     /// Returns the maximal role between the two
-    pub fn max(&self, other: Self) -> Self {
+    pub const fn max(&self, other: Self) -> Self {
         if self.should_override(other) {
             *self
         } else {
@@ -150,7 +150,7 @@ impl ChannelRole {
     }
 
     /// True if the role allows access to all descendant channels
-    pub fn can_see_all_descendants(&self) -> bool {
+    pub const fn can_see_all_descendants(&self) -> bool {
         use ChannelRole::*;
         match self {
             Admin | Member => true,
@@ -159,7 +159,7 @@ impl ChannelRole {
     }
 
     /// True if the role only allows access to public descendant channels
-    pub fn can_only_see_public_descendants(&self) -> bool {
+    pub const fn can_only_see_public_descendants(&self) -> bool {
         use ChannelRole::*;
         match self {
             Guest | Talker => true,
@@ -168,7 +168,7 @@ impl ChannelRole {
     }
 
     /// True if the role can share screen/microphone/projects into rooms.
-    pub fn can_use_microphone(&self) -> bool {
+    pub const fn can_use_microphone(&self) -> bool {
         use ChannelRole::*;
         match self {
             Admin | Member | Talker => true,
@@ -177,7 +177,7 @@ impl ChannelRole {
     }
 
     /// True if the role can edit shared projects.
-    pub fn can_edit_projects(&self) -> bool {
+    pub const fn can_edit_projects(&self) -> bool {
         use ChannelRole::*;
         match self {
             Admin | Member => true,
@@ -186,7 +186,7 @@ impl ChannelRole {
     }
 
     /// True if the role can read shared projects.
-    pub fn can_read_projects(&self) -> bool {
+    pub const fn can_read_projects(&self) -> bool {
         use ChannelRole::*;
         match self {
             Admin | Member | Guest | Talker => true,
@@ -194,7 +194,7 @@ impl ChannelRole {
         }
     }
 
-    pub fn requires_cla(&self) -> bool {
+    pub const fn requires_cla(&self) -> bool {
         use ChannelRole::*;
         match self {
             Admin | Member => true,
  
  
  
    
    @@ -469,7 +469,7 @@ fn metadata_from_extension_and_version(
     }
 }
 
-pub fn convert_time_to_chrono(time: time::PrimitiveDateTime) -> chrono::DateTime<Utc> {
+pub const fn convert_time_to_chrono(time: time::PrimitiveDateTime) -> chrono::DateTime<Utc> {
     chrono::DateTime::from_naive_utc_and_offset(
         #[allow(deprecated)]
         chrono::NaiveDateTime::from_timestamp_opt(time.assume_utc().unix_timestamp(), 0).unwrap(),
  
  
  
    
    @@ -20,7 +20,7 @@ impl Model {
         self.ancestors().last()
     }
 
-    pub fn is_root(&self) -> bool {
+    pub const fn is_root(&self) -> bool {
         self.parent_path.is_empty()
     }
 
  
  
  
    
    @@ -16,7 +16,7 @@ pub struct Model {
 }
 
 impl Model {
-    pub fn connection(&self) -> ConnectionId {
+    pub const fn connection(&self) -> ConnectionId {
         ConnectionId {
             owner_id: self.connection_server_id.0 as u32,
             id: self.connection_id as u32,
  
  
  
    
    @@ -14,7 +14,7 @@ pub struct Model {
 }
 
 impl Model {
-    pub fn connection(&self) -> ConnectionId {
+    pub const fn connection(&self) -> ConnectionId {
         ConnectionId {
             owner_id: self.connection_server_id.0 as u32,
             id: self.connection_id as u32,
  
  
  
    
    @@ -16,14 +16,14 @@ pub struct Model {
 }
 
 impl Model {
-    pub fn leader_connection(&self) -> ConnectionId {
+    pub const fn leader_connection(&self) -> ConnectionId {
         ConnectionId {
             owner_id: self.leader_connection_server_id.0 as u32,
             id: self.leader_connection_id as u32,
         }
     }
 
-    pub fn follower_connection(&self) -> ConnectionId {
+    pub const fn follower_connection(&self) -> ConnectionId {
         ConnectionId {
             owner_id: self.follower_connection_server_id.0 as u32,
             id: self.follower_connection_id as u32,
  
  
  
    
    @@ -18,7 +18,7 @@ pub struct Model {
 }
 
 impl Model {
-    pub fn connection(&self) -> ConnectionId {
+    pub const fn connection(&self) -> ConnectionId {
         ConnectionId {
             owner_id: self.connection_server_id.0 as u32,
             id: self.connection_id as u32,
  
  
  
    
    @@ -225,11 +225,11 @@ pub enum ServiceMode {
 }
 
 impl ServiceMode {
-    pub fn is_collab(&self) -> bool {
+    pub const fn is_collab(&self) -> bool {
         matches!(self, Self::Collab | Self::All)
     }
 
-    pub fn is_api(&self) -> bool {
+    pub const fn is_api(&self) -> bool {
         matches!(self, Self::Api | Self::All)
     }
 }
  
  
  
    
    @@ -32,7 +32,7 @@ impl LlmDatabase {
         })
     }
 
-    pub fn options(&self) -> &ConnectOptions {
+    pub const fn options(&self) -> &ConnectOptions {
         &self.options
     }
 
  
  
  
    
    @@ -224,14 +224,14 @@ impl Session {
         }
     }
 
-    fn is_staff(&self) -> bool {
+    const fn is_staff(&self) -> bool {
         match &self.principal {
             Principal::User(user) => user.admin,
             Principal::Impersonated { .. } => true,
         }
     }
 
-    fn user_id(&self) -> UserId {
+    const fn user_id(&self) -> UserId {
         match &self.principal {
             Principal::User(user) => user.id,
             Principal::Impersonated { user, .. } => user.id,
@@ -2809,7 +2809,7 @@ async fn remove_contact(
     Ok(())
 }
 
-fn should_auto_subscribe_to_channels(version: ZedVersion) -> bool {
+const fn should_auto_subscribe_to_channels(version: ZedVersion) -> bool {
     version.0.minor() < 139
 }
 
  
  
  
    
    @@ -1871,7 +1871,7 @@ impl CollabPanel {
             });
     }
 
-    fn start_move_channel(
+    const fn start_move_channel(
         &mut self,
         channel_id: ChannelId,
         _window: &mut Window,
  
  
  
    
    @@ -63,7 +63,7 @@ pub struct IncomingCallNotification {
     state: Arc<IncomingCallNotificationState>,
 }
 impl IncomingCallNotificationState {
-    pub fn new(call: IncomingCall, app_state: Weak<AppState>) -> Self {
+    pub const fn new(call: IncomingCall, app_state: Weak<AppState>) -> Self {
         Self { call, app_state }
     }
 
  
  
  
    
    @@ -87,7 +87,7 @@ pub struct ProjectSharedNotification {
 }
 
 impl ProjectSharedNotification {
-    fn new(
+    const fn new(
         owner: Arc<User>,
         project_id: u64,
         worktree_root_names: Vec<String>,
  
  
  
    
    @@ -283,7 +283,7 @@ pub enum ComponentStatus {
 }
 
 impl ComponentStatus {
-    pub fn description(&self) -> &str {
+    pub const fn description(&self) -> &str {
         match self {
             ComponentStatus::WorkInProgress => {
                 "These components are still being designed or refined. They shouldn't be used in the app yet."
  
  
  
    
    @@ -83,7 +83,7 @@ impl ComponentExample {
         self
     }
 
-    pub fn width(mut self, width: Pixels) -> Self {
+    pub const fn width(mut self, width: Pixels) -> Self {
         self.width = Some(width);
         self
     }
@@ -150,7 +150,7 @@ impl RenderOnce for ComponentExampleGroup {
 }
 
 impl ComponentExampleGroup {
-    pub fn new(examples: Vec<ComponentExample>) -> Self {
+    pub const fn new(examples: Vec<ComponentExample>) -> Self {
         Self {
             title: None,
             examples,
@@ -168,15 +168,15 @@ impl ComponentExampleGroup {
             vertical: false,
         }
     }
-    pub fn width(mut self, width: Pixels) -> Self {
+    pub const fn width(mut self, width: Pixels) -> Self {
         self.width = Some(width);
         self
     }
-    pub fn grow(mut self) -> Self {
+    pub const fn grow(mut self) -> Self {
         self.grow = true;
         self
     }
-    pub fn vertical(mut self) -> Self {
+    pub const fn vertical(mut self) -> Self {
         self.vertical = true;
         self
     }
@@ -193,7 +193,7 @@ pub fn empty_example(variant_name: impl Into<SharedString>) -> ComponentExample
     ComponentExample::new(variant_name, div().w_full().text_center().items_center().text_xs().opacity(0.4).child("This space is intentionally left blank. It indicates a case that should render nothing.").into_any_element())
 }
 
-pub fn example_group(examples: Vec<ComponentExample>) -> ComponentExampleGroup {
+pub const fn example_group(examples: Vec<ComponentExample>) -> ComponentExampleGroup {
     ComponentExampleGroup::new(examples)
 }
 
  
  
  
    
    @@ -20,7 +20,7 @@ pub struct ModelContextProtocol {
 }
 
 impl ModelContextProtocol {
-    pub(crate) fn new(inner: Client) -> Self {
+    pub(crate) const fn new(inner: Client) -> Self {
         Self { inner }
     }
 
@@ -86,7 +86,7 @@ pub enum ServerCapability {
 
 impl InitializedContextServerProtocol {
     /// Check if the server supports a specific capability
-    pub fn capable(&self, capability: ServerCapability) -> bool {
+    pub const fn capable(&self, capability: ServerCapability) -> bool {
         match capability {
             ServerCapability::Experimental => self.initialize.capabilities.experimental.is_some(),
             ServerCapability::Logging => self.initialize.capabilities.logging.is_some(),
  
  
  
    
    @@ -660,7 +660,7 @@ pub enum CompletionTotal {
 }
 
 impl CompletionTotal {
-    pub fn from_options(has_more: Option<bool>, total: Option<u32>) -> Self {
+    pub const fn from_options(has_more: Option<bool>, total: Option<u32>) -> Self {
         match (has_more, total) {
             (_, Some(count)) => CompletionTotal::Exact(count),
             (Some(true), _) => CompletionTotal::HasMore,
  
  
  
    
    @@ -183,11 +183,11 @@ pub enum Status {
 }
 
 impl Status {
-    pub fn is_authorized(&self) -> bool {
+    pub const fn is_authorized(&self) -> bool {
         matches!(self, Status::Authorized)
     }
 
-    pub fn is_configured(&self) -> bool {
+    pub const fn is_configured(&self) -> bool {
         matches!(
             self,
             Status::Starting { .. }
@@ -712,7 +712,7 @@ impl Copilot {
         start_task
     }
 
-    pub fn language_server(&self) -> Option<&Arc<LanguageServer>> {
+    pub const fn language_server(&self) -> Option<&Arc<LanguageServer>> {
         if let CopilotServer::Running(server) = &self.server {
             Some(&server.lsp)
         } else {
  
  
  
    
    @@ -189,35 +189,35 @@ pub struct ImageUrl {
 }
 
 impl Model {
-    pub fn uses_streaming(&self) -> bool {
+    pub const fn uses_streaming(&self) -> bool {
         self.capabilities.supports.streaming
     }
 
-    pub fn id(&self) -> &str {
+    pub const fn id(&self) -> &str {
         self.id.as_str()
     }
 
-    pub fn display_name(&self) -> &str {
+    pub const fn display_name(&self) -> &str {
         self.name.as_str()
     }
 
-    pub fn max_token_count(&self) -> u64 {
+    pub const fn max_token_count(&self) -> u64 {
         self.capabilities.limits.max_prompt_tokens
     }
 
-    pub fn supports_tools(&self) -> bool {
+    pub const fn supports_tools(&self) -> bool {
         self.capabilities.supports.tool_calls
     }
 
-    pub fn vendor(&self) -> ModelVendor {
+    pub const fn vendor(&self) -> ModelVendor {
         self.vendor
     }
 
-    pub fn supports_vision(&self) -> bool {
+    pub const fn supports_vision(&self) -> bool {
         self.capabilities.supports.vision
     }
 
-    pub fn supports_parallel_tool_calls(&self) -> bool {
+    pub const fn supports_parallel_tool_calls(&self) -> bool {
         self.capabilities.supports.parallel_tool_calls
     }
 
@@ -289,7 +289,7 @@ pub enum ChatMessageContent {
 }
 
 impl ChatMessageContent {
-    pub fn empty() -> Self {
+    pub const fn empty() -> Self {
         ChatMessageContent::Multipart(vec![])
     }
 }
@@ -541,7 +541,7 @@ impl CopilotChat {
         anyhow::Ok(())
     }
 
-    pub fn is_authenticated(&self) -> bool {
+    pub const fn is_authenticated(&self) -> bool {
         self.oauth_token.is_some()
     }
 
  
  
  
    
    @@ -20,7 +20,7 @@ pub struct CopilotCompletionProvider {
 }
 
 impl CopilotCompletionProvider {
-    pub fn new(copilot: Entity<Copilot>) -> Self {
+    pub const fn new(copilot: Entity<Copilot>) -> Self {
         Self {
             cycled: false,
             buffer_id: None,
  
  
  
    
    @@ -19,11 +19,11 @@ use std::{
 pub struct SessionId(pub u32);
 
 impl SessionId {
-    pub fn from_proto(client_id: u64) -> Self {
+    pub const fn from_proto(client_id: u64) -> Self {
         Self(client_id as u32)
     }
 
-    pub fn to_proto(self) -> u64 {
+    pub const fn to_proto(self) -> u64 {
         self.0 as u64
     }
 }
@@ -155,11 +155,11 @@ impl DebugAdapterClient {
         self.transport_delegate.send_message(message).await
     }
 
-    pub fn id(&self) -> SessionId {
+    pub const fn id(&self) -> SessionId {
         self.id
     }
 
-    pub fn binary(&self) -> &DebugAdapterBinary {
+    pub const fn binary(&self) -> &DebugAdapterBinary {
         &self.binary
     }
 
  
  
  
    
    @@ -49,7 +49,7 @@ impl Settings for DebuggerSettings {
     }
 }
 
-fn dap_granularity_from_settings(
+const fn dap_granularity_from_settings(
     granularity: settings::SteppingGranularity,
 ) -> dap_types::SteppingGranularity {
     match granularity {
  
  
  
    
    @@ -120,7 +120,7 @@ enum MessageKind {
 }
 
 impl MessageKind {
-    fn label(&self) -> &'static str {
+    const fn label(&self) -> &'static str {
         match self {
             Self::Send => SEND,
             Self::Receive => RECEIVE,
@@ -495,7 +495,7 @@ pub struct DapLogToolbarItemView {
 }
 
 impl DapLogToolbarItemView {
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         Self { log_view: None }
     }
 }
  
  
  
    
    @@ -135,7 +135,7 @@ impl DebugPanel {
             .map(|session| session.read(cx).running_state().clone())
     }
 
-    pub fn project(&self) -> &Entity<Project> {
+    pub const fn project(&self) -> &Entity<Project> {
         &self.project
     }
 
  
  
  
    
    @@ -964,7 +964,7 @@ impl AttachMode {
             attach_picker,
         })
     }
-    pub(super) fn debug_request(&self) -> task::AttachRequest {
+    pub(super) const fn debug_request(&self) -> task::AttachRequest {
         task::AttachRequest { process_id: None }
     }
 }
  
  
  
    
    @@ -55,7 +55,7 @@ impl DebuggerPaneItem {
         }
     }
 
-    pub(crate) fn to_shared_string(self) -> SharedString {
+    pub(crate) const fn to_shared_string(self) -> SharedString {
         match self {
             DebuggerPaneItem::Console => SharedString::new_static("Console"),
             DebuggerPaneItem::Variables => SharedString::new_static("Variables"),
@@ -67,7 +67,7 @@ impl DebuggerPaneItem {
             DebuggerPaneItem::MemoryView => SharedString::new_static("Memory View"),
         }
     }
-    pub(crate) fn tab_tooltip(self) -> SharedString {
+    pub(crate) const fn tab_tooltip(self) -> SharedString {
         let tooltip = match self {
             DebuggerPaneItem::Console => {
                 "Displays program output and allows manual input of debugger commands."
  
  
  
    
    @@ -116,7 +116,7 @@ impl DebugSession {
         })
     }
 
-    pub fn running_state(&self) -> &Entity<RunningState> {
+    pub const fn running_state(&self) -> &Entity<RunningState> {
         &self.running_state
     }
 }
  
  
  
    
    @@ -82,11 +82,11 @@ pub struct RunningState {
 }
 
 impl RunningState {
-    pub(crate) fn thread_id(&self) -> Option<ThreadId> {
+    pub(crate) const fn thread_id(&self) -> Option<ThreadId> {
         self.thread_id
     }
 
-    pub(crate) fn active_pane(&self) -> &Entity<Pane> {
+    pub(crate) const fn active_pane(&self) -> &Entity<Pane> {
         &self.active_pane
     }
 }
@@ -217,7 +217,7 @@ impl SubView {
         this
     }
 
-    pub(crate) fn view_kind(&self) -> DebuggerPaneItem {
+    pub(crate) const fn view_kind(&self) -> DebuggerPaneItem {
         self.kind
     }
     pub(crate) fn with_indicator(&mut self, indicator: Box<dyn Fn(&App) -> bool>) {
@@ -1447,11 +1447,11 @@ impl RunningState {
         self.variable_list.read(cx).has_open_context_menu()
     }
 
-    pub fn session(&self) -> &Entity<Session> {
+    pub const fn session(&self) -> &Entity<Session> {
         &self.session
     }
 
-    pub fn session_id(&self) -> SessionId {
+    pub const fn session_id(&self) -> SessionId {
         self.session_id
     }
 
@@ -1459,7 +1459,7 @@ impl RunningState {
         self.stack_frame_list.read(cx).opened_stack_frame_id()
     }
 
-    pub(crate) fn stack_frame_list(&self) -> &Entity<StackFrameList> {
+    pub(crate) const fn stack_frame_list(&self) -> &Entity<StackFrameList> {
         &self.stack_frame_list
     }
 
@@ -1532,7 +1532,7 @@ impl RunningState {
         }
     }
 
-    pub fn selected_thread_id(&self) -> Option<ThreadId> {
+    pub const fn selected_thread_id(&self) -> Option<ThreadId> {
         self.thread_id
     }
 
  
  
  
    
    @@ -1214,7 +1214,7 @@ impl BreakpointEntry {
         }
     }
 
-    fn has_log(&self) -> bool {
+    const fn has_log(&self) -> bool {
         match &self.kind {
             BreakpointEntryKind::LineBreakpoint(line_breakpoint) => {
                 line_breakpoint.breakpoint.message.is_some()
@@ -1223,7 +1223,7 @@ impl BreakpointEntry {
         }
     }
 
-    fn has_condition(&self) -> bool {
+    const fn has_condition(&self) -> bool {
         match &self.kind {
             BreakpointEntryKind::LineBreakpoint(line_breakpoint) => {
                 line_breakpoint.breakpoint.condition.is_some()
@@ -1233,7 +1233,7 @@ impl BreakpointEntry {
         }
     }
 
-    fn has_hit_condition(&self) -> bool {
+    const fn has_hit_condition(&self) -> bool {
         match &self.kind {
             BreakpointEntryKind::LineBreakpoint(line_breakpoint) => {
                 line_breakpoint.breakpoint.hit_condition.is_some()
@@ -1278,11 +1278,11 @@ impl From<&Capabilities> for SupportedBreakpointProperties {
 }
 
 impl SupportedBreakpointProperties {
-    fn for_exception_breakpoints(self) -> Self {
+    const fn for_exception_breakpoints(self) -> Self {
         // TODO: we don't yet support conditions for exception breakpoints at the data layer, hence all props are disabled here.
         Self::empty()
     }
-    fn for_data_breakpoints(self) -> Self {
+    const fn for_data_breakpoints(self) -> Self {
         // TODO: we don't yet support conditions for data breakpoints at the data layer, hence all props are disabled here.
         Self::empty()
     }
  
  
  
    
    @@ -56,7 +56,7 @@ impl Drag {
         range.contains(&address)
     }
 
-    fn memory_range(&self) -> RangeInclusive<u64> {
+    const fn memory_range(&self) -> RangeInclusive<u64> {
         if self.start_address < self.end_address {
             self.start_address..=self.end_address
         } else {
@@ -77,10 +77,10 @@ impl SelectedMemoryRange {
             SelectedMemoryRange::DragComplete(drag) => drag.contains(address),
         }
     }
-    fn is_dragging(&self) -> bool {
+    const fn is_dragging(&self) -> bool {
         matches!(self, SelectedMemoryRange::DragUnderway(_))
     }
-    fn drag(&self) -> &Drag {
+    const fn drag(&self) -> &Drag {
         match self {
             SelectedMemoryRange::DragUnderway(drag) => drag,
             SelectedMemoryRange::DragComplete(drag) => drag,
@@ -116,16 +116,16 @@ impl ViewState {
             selection: None,
         }
     }
-    fn row_count(&self) -> u64 {
+    const fn row_count(&self) -> u64 {
         // This was picked fully arbitrarily. There's no incentive for us to care about page sizes other than the fact that it seems to be a good
         // middle ground for data size.
         const PAGE_SIZE: u64 = 4096;
         PAGE_SIZE / self.line_width.width as u64
     }
-    fn schedule_scroll_down(&mut self) {
+    const fn schedule_scroll_down(&mut self) {
         self.base_row = self.base_row.saturating_add(1)
     }
-    fn schedule_scroll_up(&mut self) {
+    const fn schedule_scroll_up(&mut self) {
         self.base_row = self.base_row.saturating_sub(1);
     }
 
  
  
  
    
    @@ -199,7 +199,7 @@ impl StackFrameList {
         self.list_filter
     }
 
-    pub fn opened_stack_frame_id(&self) -> Option<StackFrameId> {
+    pub const fn opened_stack_frame_id(&self) -> Option<StackFrameId> {
         self.opened_stack_frame_id
     }
 
  
  
  
    
    @@ -100,21 +100,21 @@ enum DapEntry {
 }
 
 impl DapEntry {
-    fn as_watcher(&self) -> Option<&Watcher> {
+    const fn as_watcher(&self) -> Option<&Watcher> {
         match self {
             DapEntry::Watcher(watcher) => Some(watcher),
             _ => None,
         }
     }
 
-    fn as_variable(&self) -> Option<&dap::Variable> {
+    const fn as_variable(&self) -> Option<&dap::Variable> {
         match self {
             DapEntry::Variable(dap) => Some(dap),
             _ => None,
         }
     }
 
-    fn as_scope(&self) -> Option<&dap::Scope> {
+    const fn as_scope(&self) -> Option<&dap::Scope> {
         match self {
             DapEntry::Scope(dap) => Some(dap),
             _ => None,
@@ -138,15 +138,15 @@ struct ListEntry {
 }
 
 impl ListEntry {
-    fn as_watcher(&self) -> Option<&Watcher> {
+    const fn as_watcher(&self) -> Option<&Watcher> {
         self.entry.as_watcher()
     }
 
-    fn as_variable(&self) -> Option<&dap::Variable> {
+    const fn as_variable(&self) -> Option<&dap::Variable> {
         self.entry.as_variable()
     }
 
-    fn as_scope(&self) -> Option<&dap::Scope> {
+    const fn as_scope(&self) -> Option<&dap::Scope> {
         self.entry.as_scope()
     }
 
@@ -257,7 +257,7 @@ impl VariableList {
         }
     }
 
-    pub(super) fn has_open_context_menu(&self) -> bool {
+    pub(super) const fn has_open_context_menu(&self) -> bool {
         self.open_context_menu.is_some()
     }
 
  
  
  
    
    @@ -64,7 +64,7 @@ pub enum Model {
 }
 
 impl Model {
-    pub fn default_fast() -> Self {
+    pub const fn default_fast() -> Self {
         Model::Chat
     }
 
@@ -94,14 +94,14 @@ impl Model {
         }
     }
 
-    pub fn max_token_count(&self) -> u64 {
+    pub const fn max_token_count(&self) -> u64 {
         match self {
             Self::Chat | Self::Reasoner => 128_000,
             Self::Custom { max_tokens, .. } => *max_tokens,
         }
     }
 
-    pub fn max_output_tokens(&self) -> Option<u64> {
+    pub const fn max_output_tokens(&self) -> Option<u64> {
         match self {
             Self::Chat => Some(8_192),
             Self::Reasoner => Some(64_000),
  
  
  
    
    @@ -35,7 +35,7 @@ impl<S: Source> fmt::Debug for Denoiser<S> {
 struct Queue(VecDeque<[Sample; BLOCK_SHIFT]>);
 
 impl Queue {
-    fn new() -> Self {
+    const fn new() -> Self {
         Self(VecDeque::new())
     }
     fn push(&mut self, block: [Sample; BLOCK_SHIFT]) {
@@ -97,7 +97,7 @@ impl<S: Source> Denoiser<S> {
         })
     }
 
-    pub fn set_enabled(&mut self, enabled: bool) {
+    pub const fn set_enabled(&mut self, enabled: bool) {
         self.state = match (enabled, self.state) {
             (false, IterState::StartingMidAudio { .. }) | (false, IterState::Enabled) => {
                 IterState::Disabled
  
  
  
    
    @@ -621,7 +621,7 @@ impl BufferDiagnosticsEditor {
         self.update_all_diagnostics(window, cx);
     }
 
-    fn max_diagnostics_severity(include_warnings: bool) -> DiagnosticSeverity {
+    const fn max_diagnostics_severity(include_warnings: bool) -> DiagnosticSeverity {
         match include_warnings {
             true => DiagnosticSeverity::Warning,
             false => DiagnosticSeverity::Error,
  
  
  
    
    @@ -40,15 +40,15 @@ pub enum DataCollectionState {
 }
 
 impl DataCollectionState {
-    pub fn is_supported(&self) -> bool {
+    pub const fn is_supported(&self) -> bool {
         !matches!(self, DataCollectionState::Unsupported)
     }
 
-    pub fn is_enabled(&self) -> bool {
+    pub const fn is_enabled(&self) -> bool {
         matches!(self, DataCollectionState::Enabled { .. })
     }
 
-    pub fn is_project_open_source(&self) -> bool {
+    pub const fn is_project_open_source(&self) -> bool {
         match self {
             Self::Enabled {
                 is_project_open_source,
  
  
  
    
    @@ -945,7 +945,7 @@ impl StatusItemView for EditPredictionButton {
 }
 
 impl SupermavenButtonStatus {
-    fn to_icon(&self) -> IconName {
+    const fn to_icon(&self) -> IconName {
         match self {
             SupermavenButtonStatus::Ready => IconName::Supermaven,
             SupermavenButtonStatus::Errored(_) => IconName::SupermavenError,
@@ -963,7 +963,7 @@ impl SupermavenButtonStatus {
         }
     }
 
-    fn has_menu(&self) -> bool {
+    const fn has_menu(&self) -> bool {
         match self {
             SupermavenButtonStatus::Ready | SupermavenButtonStatus::NeedsActivation(_) => true,
             SupermavenButtonStatus::Errored(_) | SupermavenButtonStatus::Initializing => false,
  
  
  
    
    @@ -39,35 +39,35 @@ pub enum Declaration {
 const ITEM_TEXT_TRUNCATION_LENGTH: usize = 1024;
 
 impl Declaration {
-    pub fn identifier(&self) -> &Identifier {
+    pub const fn identifier(&self) -> &Identifier {
         match self {
             Declaration::File { declaration, .. } => &declaration.identifier,
             Declaration::Buffer { declaration, .. } => &declaration.identifier,
         }
     }
 
-    pub fn parent(&self) -> Option<DeclarationId> {
+    pub const fn parent(&self) -> Option<DeclarationId> {
         match self {
             Declaration::File { declaration, .. } => declaration.parent,
             Declaration::Buffer { declaration, .. } => declaration.parent,
         }
     }
 
-    pub fn as_buffer(&self) -> Option<&BufferDeclaration> {
+    pub const fn as_buffer(&self) -> Option<&BufferDeclaration> {
         match self {
             Declaration::File { .. } => None,
             Declaration::Buffer { declaration, .. } => Some(declaration),
         }
     }
 
-    pub fn as_file(&self) -> Option<&FileDeclaration> {
+    pub const fn as_file(&self) -> Option<&FileDeclaration> {
         match self {
             Declaration::Buffer { .. } => None,
             Declaration::File { declaration, .. } => Some(declaration),
         }
     }
 
-    pub fn project_entry_id(&self) -> ProjectEntryId {
+    pub const fn project_entry_id(&self) -> ProjectEntryId {
         match self {
             Declaration::File {
                 project_entry_id, ..
@@ -78,7 +78,7 @@ impl Declaration {
         }
     }
 
-    pub fn cached_path(&self) -> &CachedDeclarationPath {
+    pub const fn cached_path(&self) -> &CachedDeclarationPath {
         match self {
             Declaration::File { cached_path, .. } => cached_path,
             Declaration::Buffer { cached_path, .. } => cached_path,
  
  
  
    
    @@ -493,7 +493,7 @@ enum ContentKind {
 }
 
 impl ContentKind {
-    fn capture_name(&self) -> &'static str {
+    const fn capture_name(&self) -> &'static str {
         match self {
             ContentKind::Name => "name",
             ContentKind::Wildcard => "wildcard",
@@ -521,7 +521,7 @@ impl ImportTree {
     }
 
     #[allow(dead_code)]
-    fn debug<'a>(&'a self, snapshot: &'a BufferSnapshot) -> ImportTreeDebug<'a> {
+    const fn debug<'a>(&'a self, snapshot: &'a BufferSnapshot) -> ImportTreeDebug<'a> {
         ImportTreeDebug {
             tree: self,
             snapshot,
  
  
  
    
    @@ -324,7 +324,7 @@ impl SyntaxIndex {
         }
     }
 
-    pub fn state(&self) -> &Arc<Mutex<SyntaxIndexState>> {
+    pub const fn state(&self) -> &Arc<Mutex<SyntaxIndexState>> {
         &self.state
     }
 
  
  
  
    
    @@ -30,7 +30,7 @@ impl BlinkManager {
         }
     }
 
-    fn next_blink_epoch(&mut self) -> usize {
+    const fn next_blink_epoch(&mut self) -> usize {
         self.blink_epoch += 1;
         self.blink_epoch
     }
@@ -95,12 +95,12 @@ impl BlinkManager {
         self.blink_cursors(self.blink_epoch, cx);
     }
 
-    pub fn disable(&mut self, _cx: &mut Context<Self>) {
+    pub const fn disable(&mut self, _cx: &mut Context<Self>) {
         self.visible = false;
         self.enabled = false;
     }
 
-    pub fn visible(&self) -> bool {
+    pub const fn visible(&self) -> bool {
         self.visible
     }
 }
  
  
  
    
    @@ -141,7 +141,7 @@ impl CodeContextMenu {
         }
     }
 
-    pub fn origin(&self) -> ContextMenuOrigin {
+    pub const fn origin(&self) -> ContextMenuOrigin {
         match self {
             CodeContextMenu::Completions(menu) => menu.origin(),
             CodeContextMenu::CodeActions(menu) => menu.origin(),
@@ -725,7 +725,7 @@ impl CompletionsMenu {
         !self.entries.borrow().is_empty()
     }
 
-    fn origin(&self) -> ContextMenuOrigin {
+    const fn origin(&self) -> ContextMenuOrigin {
         ContextMenuOrigin::Cursor
     }
 
@@ -1356,20 +1356,20 @@ pub enum CodeActionsItem {
 }
 
 impl CodeActionsItem {
-    fn as_task(&self) -> Option<&ResolvedTask> {
+    const fn as_task(&self) -> Option<&ResolvedTask> {
         let Self::Task(_, task) = self else {
             return None;
         };
         Some(task)
     }
 
-    fn as_code_action(&self) -> Option<&CodeAction> {
+    const fn as_code_action(&self) -> Option<&CodeAction> {
         let Self::CodeAction { action, .. } = self else {
             return None;
         };
         Some(action)
     }
-    fn as_debug_scenario(&self) -> Option<&DebugScenario> {
+    const fn as_debug_scenario(&self) -> Option<&DebugScenario> {
         let Self::DebugScenario(scenario) = self else {
             return None;
         };
@@ -1458,7 +1458,7 @@ impl CodeActionsMenu {
         !self.actions.is_empty()
     }
 
-    fn origin(&self) -> ContextMenuOrigin {
+    const fn origin(&self) -> ContextMenuOrigin {
         match &self.deployed_from {
             Some(CodeActionSource::Indicator(row)) | Some(CodeActionSource::RunMenu(row)) => {
                 ContextMenuOrigin::GutterIndicator(*row)
  
  
  
    
    @@ -384,7 +384,7 @@ impl DisplayMap {
         self.block_map.folded_buffers.contains(&buffer_id)
     }
 
-    pub(crate) fn folded_buffers(&self) -> &HashSet<BufferId> {
+    pub(crate) const fn folded_buffers(&self) -> &HashSet<BufferId> {
         &self.block_map.folded_buffers
     }
 
@@ -767,18 +767,18 @@ pub struct DisplaySnapshot {
     pub(crate) fold_placeholder: FoldPlaceholder,
 }
 impl DisplaySnapshot {
-    pub fn wrap_snapshot(&self) -> &WrapSnapshot {
+    pub const fn wrap_snapshot(&self) -> &WrapSnapshot {
         &self.block_snapshot.wrap_snapshot
     }
-    pub fn tab_snapshot(&self) -> &TabSnapshot {
+    pub const fn tab_snapshot(&self) -> &TabSnapshot {
         &self.block_snapshot.wrap_snapshot.tab_snapshot
     }
 
-    pub fn fold_snapshot(&self) -> &FoldSnapshot {
+    pub const fn fold_snapshot(&self) -> &FoldSnapshot {
         &self.block_snapshot.wrap_snapshot.tab_snapshot.fold_snapshot
     }
 
-    pub fn inlay_snapshot(&self) -> &InlaySnapshot {
+    pub const fn inlay_snapshot(&self) -> &InlaySnapshot {
         &self
             .block_snapshot
             .wrap_snapshot
@@ -787,7 +787,7 @@ impl DisplaySnapshot {
             .inlay_snapshot
     }
 
-    pub fn buffer_snapshot(&self) -> &MultiBufferSnapshot {
+    pub const fn buffer_snapshot(&self) -> &MultiBufferSnapshot {
         &self
             .block_snapshot
             .wrap_snapshot
@@ -1394,11 +1394,11 @@ impl DisplaySnapshot {
         self.inlay_highlights.get(&type_id)
     }
 
-    pub fn buffer_header_height(&self) -> u32 {
+    pub const fn buffer_header_height(&self) -> u32 {
         self.block_snapshot.buffer_header_height
     }
 
-    pub fn excerpt_header_height(&self) -> u32 {
+    pub const fn excerpt_header_height(&self) -> u32 {
         self.block_snapshot.excerpt_header_height
     }
 
@@ -1489,11 +1489,11 @@ impl Sub<u32> for DisplayRow {
 }
 
 impl DisplayPoint {
-    pub fn new(row: DisplayRow, column: u32) -> Self {
+    pub const fn new(row: DisplayRow, column: u32) -> Self {
         Self(BlockPoint(Point::new(row.0, column)))
     }
 
-    pub fn zero() -> Self {
+    pub const fn zero() -> Self {
         Self::new(DisplayRow(0), 0)
     }
 
  
  
  
    
    @@ -89,7 +89,7 @@ pub enum BlockPlacement<T> {
 }
 
 impl<T> BlockPlacement<T> {
-    pub fn start(&self) -> &T {
+    pub const fn start(&self) -> &T {
         match self {
             BlockPlacement::Above(position) => position,
             BlockPlacement::Below(position) => position,
@@ -98,7 +98,7 @@ impl<T> BlockPlacement<T> {
         }
     }
 
-    fn end(&self) -> &T {
+    const fn end(&self) -> &T {
         match self {
             BlockPlacement::Above(position) => position,
             BlockPlacement::Below(position) => position,
@@ -107,7 +107,7 @@ impl<T> BlockPlacement<T> {
         }
     }
 
-    pub fn as_ref(&self) -> BlockPlacement<&T> {
+    pub const fn as_ref(&self) -> BlockPlacement<&T> {
         match self {
             BlockPlacement::Above(position) => BlockPlacement::Above(position),
             BlockPlacement::Below(position) => BlockPlacement::Below(position),
@@ -128,7 +128,7 @@ impl<T> BlockPlacement<T> {
         }
     }
 
-    fn tie_break(&self) -> u8 {
+    const fn tie_break(&self) -> u8 {
         match self {
             BlockPlacement::Replace(_) => 0,
             BlockPlacement::Above(_) => 1,
@@ -379,7 +379,7 @@ impl Block {
         }
     }
 
-    fn is_header(&self) -> bool {
+    const fn is_header(&self) -> bool {
         match self {
             Block::Custom(_) => false,
             Block::FoldedBuffer { .. } => true,
@@ -388,7 +388,7 @@ impl Block {
         }
     }
 
-    pub fn is_buffer_header(&self) -> bool {
+    pub const fn is_buffer_header(&self) -> bool {
         match self {
             Block::Custom(_) => false,
             Block::FoldedBuffer { .. } => true,
@@ -949,7 +949,7 @@ fn push_isomorphic(tree: &mut SumTree<Transform>, rows: u32, wrap_snapshot: &Wra
 }
 
 impl BlockPoint {
-    pub fn new(row: u32, column: u32) -> Self {
+    pub const fn new(row: u32, column: u32) -> Self {
         Self(Point::new(row, column))
     }
 }
@@ -1913,15 +1913,15 @@ impl CustomBlock {
         self.render.lock()(cx)
     }
 
-    pub fn start(&self) -> Anchor {
+    pub const fn start(&self) -> Anchor {
         *self.placement.start()
     }
 
-    pub fn end(&self) -> Anchor {
+    pub const fn end(&self) -> Anchor {
         *self.placement.end()
     }
 
-    pub fn style(&self) -> BlockStyle {
+    pub const fn style(&self) -> BlockStyle {
         self.style
     }
 }
  
  
  
    
    @@ -235,14 +235,14 @@ impl<T> Crease<T> {
         }
     }
 
-    pub fn range(&self) -> &Range<T> {
+    pub const fn range(&self) -> &Range<T> {
         match self {
             Crease::Inline { range, .. } => range,
             Crease::Block { range, .. } => range,
         }
     }
 
-    pub fn metadata(&self) -> Option<&CreaseMetadata> {
+    pub const fn metadata(&self) -> Option<&CreaseMetadata> {
         match self {
             Self::Inline { metadata, .. } => metadata.as_ref(),
             Self::Block { .. } => None,
  
  
  
    
    @@ -76,19 +76,19 @@ impl PartialEq for FoldPlaceholder {
 pub struct FoldPoint(pub Point);
 
 impl FoldPoint {
-    pub fn new(row: u32, column: u32) -> Self {
+    pub const fn new(row: u32, column: u32) -> Self {
         Self(Point::new(row, column))
     }
 
-    pub fn row(self) -> u32 {
+    pub const fn row(self) -> u32 {
         self.0.row
     }
 
-    pub fn column(self) -> u32 {
+    pub const fn column(self) -> u32 {
         self.0.column
     }
 
-    pub fn row_mut(&mut self) -> &mut u32 {
+    pub const fn row_mut(&mut self) -> &mut u32 {
         &mut self.0.row
     }
 
@@ -632,7 +632,7 @@ pub struct FoldSnapshot {
 }
 
 impl FoldSnapshot {
-    pub fn buffer(&self) -> &MultiBufferSnapshot {
+    pub const fn buffer(&self) -> &MultiBufferSnapshot {
         &self.inlay_snapshot.buffer
     }
 
@@ -1048,7 +1048,7 @@ struct TransformPlaceholder {
 }
 
 impl Transform {
-    fn is_fold(&self) -> bool {
+    const fn is_fold(&self) -> bool {
         self.placeholder.is_some()
     }
 }
  
  
  
    
    @@ -284,7 +284,7 @@ impl InlayChunks<'_> {
         self.max_output_offset = new_range.end;
     }
 
-    pub fn offset(&self) -> InlayOffset {
+    pub const fn offset(&self) -> InlayOffset {
         self.output_offset
     }
 }
@@ -543,11 +543,11 @@ impl Iterator for InlayBufferRows<'_> {
 }
 
 impl InlayPoint {
-    pub fn new(row: u32, column: u32) -> Self {
+    pub const fn new(row: u32, column: u32) -> Self {
         Self(Point::new(row, column))
     }
 
-    pub fn row(self) -> u32 {
+    pub const fn row(self) -> u32 {
         self.0.row
     }
 }
  
  
  
    
    @@ -168,7 +168,7 @@ pub struct TabSnapshot {
 }
 
 impl TabSnapshot {
-    pub fn buffer_snapshot(&self) -> &MultiBufferSnapshot {
+    pub const fn buffer_snapshot(&self) -> &MultiBufferSnapshot {
         &self.fold_snapshot.inlay_snapshot.buffer
     }
 
@@ -428,19 +428,19 @@ impl TabSnapshot {
 pub struct TabPoint(pub Point);
 
 impl TabPoint {
-    pub fn new(row: u32, column: u32) -> Self {
+    pub const fn new(row: u32, column: u32) -> Self {
         Self(Point::new(row, column))
     }
 
-    pub fn zero() -> Self {
+    pub const fn zero() -> Self {
         Self::new(0, 0)
     }
 
-    pub fn row(self) -> u32 {
+    pub const fn row(self) -> u32 {
         self.0.row
     }
 
-    pub fn column(self) -> u32 {
+    pub const fn column(self) -> u32 {
         self.0.column
     }
 }
@@ -1544,11 +1544,11 @@ where
         None
     }
 
-    fn byte_offset(&self) -> u32 {
+    const fn byte_offset(&self) -> u32 {
         self.byte_offset
     }
 
-    fn char_offset(&self) -> u32 {
+    const fn char_offset(&self) -> u32 {
         self.char_offset
     }
 }
  
  
  
    
    @@ -327,7 +327,7 @@ impl WrapSnapshot {
         }
     }
 
-    pub fn buffer_snapshot(&self) -> &MultiBufferSnapshot {
+    pub const fn buffer_snapshot(&self) -> &MultiBufferSnapshot {
         self.tab_snapshot.buffer_snapshot()
     }
 
@@ -1067,7 +1067,7 @@ impl Transform {
         }
     }
 
-    fn is_isomorphic(&self) -> bool {
+    const fn is_isomorphic(&self) -> bool {
         self.display_text.is_none()
     }
 }
@@ -1116,23 +1116,23 @@ impl SumTreeExt for SumTree<Transform> {
 }
 
 impl WrapPoint {
-    pub fn new(row: u32, column: u32) -> Self {
+    pub const fn new(row: u32, column: u32) -> Self {
         Self(Point::new(row, column))
     }
 
-    pub fn row(self) -> u32 {
+    pub const fn row(self) -> u32 {
         self.0.row
     }
 
-    pub fn row_mut(&mut self) -> &mut u32 {
+    pub const fn row_mut(&mut self) -> &mut u32 {
         &mut self.0.row
     }
 
-    pub fn column(self) -> u32 {
+    pub const fn column(self) -> u32 {
         self.0.column
     }
 
-    pub fn column_mut(&mut self) -> &mut u32 {
+    pub const fn column_mut(&mut self) -> &mut u32 {
         &mut self.0.column
     }
 }
  
  
  
    
    @@ -252,7 +252,7 @@ enum ReportEditorEvent {
 }
 
 impl ReportEditorEvent {
-    pub fn event_type(&self) -> &'static str {
+    pub const fn event_type(&self) -> &'static str {
         match self {
             Self::Saved { .. } => "Editor Saved",
             Self::EditorOpened => "Editor Opened",
@@ -268,7 +268,7 @@ struct InlineValueCache {
 }
 
 impl InlineValueCache {
-    fn new(enabled: bool) -> Self {
+    const fn new(enabled: bool) -> Self {
         Self {
             enabled,
             inlays: Vec::new(),
@@ -287,7 +287,7 @@ pub enum InlayId {
 }
 
 impl InlayId {
-    fn id(&self) -> u32 {
+    const fn id(&self) -> u32 {
         match self {
             Self::EditPrediction(id) => *id,
             Self::DebuggerValue(id) => *id,
@@ -318,7 +318,7 @@ pub enum Navigated {
 }
 
 impl Navigated {
-    pub fn from_bool(yes: bool) -> Navigated {
+    pub const fn from_bool(yes: bool) -> Navigated {
         if yes { Navigated::Yes } else { Navigated::No }
     }
 }
@@ -507,7 +507,7 @@ pub enum EditorMode {
 }
 
 impl EditorMode {
-    pub fn full() -> Self {
+    pub const fn full() -> Self {
         Self::Full {
             scale_ui_elements_with_buffer_font_size: true,
             show_active_line_background: true,
@@ -516,17 +516,17 @@ impl EditorMode {
     }
 
     #[inline]
-    pub fn is_full(&self) -> bool {
+    pub const fn is_full(&self) -> bool {
         matches!(self, Self::Full { .. })
     }
 
     #[inline]
-    pub fn is_single_line(&self) -> bool {
+    pub const fn is_single_line(&self) -> bool {
         matches!(self, Self::SingleLine { .. })
     }
 
     #[inline]
-    fn is_minimap(&self) -> bool {
+    const fn is_minimap(&self) -> bool {
         matches!(self, Self::Minimap { .. })
     }
 }
@@ -692,14 +692,14 @@ pub enum EditPredictionPreview {
 }
 
 impl EditPredictionPreview {
-    pub fn released_too_fast(&self) -> bool {
+    pub const fn released_too_fast(&self) -> bool {
         match self {
             EditPredictionPreview::Inactive { released_too_fast } => *released_too_fast,
             EditPredictionPreview::Active { .. } => false,
         }
     }
 
-    pub fn set_previous_scroll_position(&mut self, scroll_position: Option<ScrollAnchor>) {
+    pub const fn set_previous_scroll_position(&mut self, scroll_position: Option<ScrollAnchor>) {
         if let EditPredictionPreview::Active {
             previous_scroll_position,
             ..
@@ -726,7 +726,7 @@ pub enum ContextMenuPlacement {
 struct EditorActionId(usize);
 
 impl EditorActionId {
-    pub fn post_inc(&mut self) -> Self {
+    pub const fn post_inc(&mut self) -> Self {
         let answer = self.0;
 
         *self = Self(answer + 1);
@@ -778,7 +778,7 @@ impl MinimapVisibility {
         }
     }
 
-    fn hidden(&self) -> Self {
+    const fn hidden(&self) -> Self {
         match *self {
             Self::Enabled {
                 setting_configuration,
@@ -791,11 +791,11 @@ impl MinimapVisibility {
         }
     }
 
-    fn disabled(&self) -> bool {
+    const fn disabled(&self) -> bool {
         matches!(*self, Self::Disabled)
     }
 
-    fn settings_visibility(&self) -> bool {
+    const fn settings_visibility(&self) -> bool {
         match *self {
             Self::Enabled {
                 setting_configuration,
@@ -805,7 +805,7 @@ impl MinimapVisibility {
         }
     }
 
-    fn visible(&self) -> bool {
+    const fn visible(&self) -> bool {
         match *self {
             Self::Enabled {
                 setting_configuration,
@@ -815,7 +815,7 @@ impl MinimapVisibility {
         }
     }
 
-    fn toggle_visibility(&self) -> Self {
+    const fn toggle_visibility(&self) -> Self {
         match *self {
             Self::Enabled {
                 toggle_override,
@@ -901,7 +901,7 @@ pub struct ChangeList {
 }
 
 impl ChangeList {
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         Self {
             changes: Vec::new(),
             position: None,
@@ -1205,7 +1205,7 @@ enum NextScrollCursorCenterTopBottom {
 }
 
 impl NextScrollCursorCenterTopBottom {
-    fn next(&self) -> Self {
+    const fn next(&self) -> Self {
         match self {
             Self::Center => Self::Top,
             Self::Top => Self::Bottom,
@@ -1356,14 +1356,14 @@ impl SelectionEffects {
         }
     }
 
-    pub fn completions(self, completions: bool) -> Self {
+    pub const fn completions(self, completions: bool) -> Self {
         Self {
             completions,
             ..self
         }
     }
 
-    pub fn nav_history(self, nav_history: bool) -> Self {
+    pub const fn nav_history(self, nav_history: bool) -> Self {
         Self {
             nav_history: Some(nav_history),
             ..self
@@ -1632,7 +1632,7 @@ enum InlayHintRefreshReason {
 }
 
 impl InlayHintRefreshReason {
-    fn description(&self) -> &'static str {
+    const fn description(&self) -> &'static str {
         match self {
             Self::ModifiersChanged(_) => "modifiers changed",
             Self::Toggle(_) => "toggle",
@@ -2550,7 +2550,7 @@ impl Editor {
         key_context
     }
 
-    pub fn last_bounds(&self) -> Option<&Bounds<Pixels>> {
+    pub const fn last_bounds(&self) -> Option<&Bounds<Pixels>> {
         self.last_bounds.as_ref()
     }
 
@@ -2714,15 +2714,15 @@ impl Editor {
         });
     }
 
-    pub fn leader_id(&self) -> Option<CollaboratorId> {
+    pub const fn leader_id(&self) -> Option<CollaboratorId> {
         self.leader_id
     }
 
-    pub fn buffer(&self) -> &Entity<MultiBuffer> {
+    pub const fn buffer(&self) -> &Entity<MultiBuffer> {
         &self.buffer
     }
 
-    pub fn project(&self) -> Option<&Entity<Project>> {
+    pub const fn project(&self) -> Option<&Entity<Project>> {
         self.project.as_ref()
     }
 
@@ -2789,7 +2789,7 @@ impl Editor {
             .excerpt_containing(self.selections.newest_anchor().head(), cx)
     }
 
-    pub fn mode(&self) -> &EditorMode {
+    pub const fn mode(&self) -> &EditorMode {
         &self.mode
     }
 
@@ -2805,7 +2805,7 @@ impl Editor {
         self.collaboration_hub = Some(hub);
     }
 
-    pub fn set_in_project_search(&mut self, in_project_search: bool) {
+    pub const fn set_in_project_search(&mut self, in_project_search: bool) {
         self.in_project_search = in_project_search;
     }
 
@@ -2901,14 +2901,14 @@ impl Editor {
         cx.notify();
     }
 
-    pub fn set_current_line_highlight(
+    pub const fn set_current_line_highlight(
         &mut self,
         current_line_highlight: Option<CurrentLineHighlight>,
     ) {
         self.current_line_highlight = current_line_highlight;
     }
 
-    pub fn set_collapse_matches(&mut self, collapse_matches: bool) {
+    pub const fn set_collapse_matches(&mut self, collapse_matches: bool) {
         self.collapse_matches = collapse_matches;
     }
 
@@ -2926,7 +2926,7 @@ impl Editor {
         }
     }
 
-    pub fn set_input_enabled(&mut self, input_enabled: bool) {
+    pub const fn set_input_enabled(&mut self, input_enabled: bool) {
         self.input_enabled = input_enabled;
     }
 
@@ -2946,7 +2946,7 @@ impl Editor {
         }
     }
 
-    pub fn set_menu_edit_predictions_policy(&mut self, value: MenuEditPredictionsPolicy) {
+    pub const fn set_menu_edit_predictions_policy(&mut self, value: MenuEditPredictionsPolicy) {
         self.menu_edit_predictions_policy = value;
     }
 
@@ -2962,19 +2962,19 @@ impl Editor {
         self.read_only || self.buffer.read(cx).read_only()
     }
 
-    pub fn set_read_only(&mut self, read_only: bool) {
+    pub const fn set_read_only(&mut self, read_only: bool) {
         self.read_only = read_only;
     }
 
-    pub fn set_use_autoclose(&mut self, autoclose: bool) {
+    pub const fn set_use_autoclose(&mut self, autoclose: bool) {
         self.use_autoclose = autoclose;
     }
 
-    pub fn set_use_auto_surround(&mut self, auto_surround: bool) {
+    pub const fn set_use_auto_surround(&mut self, auto_surround: bool) {
         self.use_auto_surround = auto_surround;
     }
 
-    pub fn set_auto_replace_emoji_shortcode(&mut self, auto_replace: bool) {
+    pub const fn set_auto_replace_emoji_shortcode(&mut self, auto_replace: bool) {
         self.auto_replace_emoji_shortcode = auto_replace;
     }
 
@@ -3029,11 +3029,11 @@ impl Editor {
         })
     }
 
-    pub fn set_use_modal_editing(&mut self, to: bool) {
+    pub const fn set_use_modal_editing(&mut self, to: bool) {
         self.use_modal_editing = to;
     }
 
-    pub fn use_modal_editing(&self) -> bool {
+    pub const fn use_modal_editing(&self) -> bool {
         self.use_modal_editing
     }
 
@@ -5193,11 +5193,11 @@ impl Editor {
         );
     }
 
-    pub fn inlay_hints_enabled(&self) -> bool {
+    pub const fn inlay_hints_enabled(&self) -> bool {
         self.inlay_hint_cache.enabled
     }
 
-    pub fn inline_values_enabled(&self) -> bool {
+    pub const fn inline_values_enabled(&self) -> bool {
         self.inline_value_cache.enabled
     }
 
@@ -6627,7 +6627,7 @@ impl Editor {
             .into_any_element()
     }
 
-    pub fn context_menu(&self) -> &RefCell<Option<CodeContextMenu>> {
+    pub const fn context_menu(&self) -> &RefCell<Option<CodeContextMenu>> {
         &self.context_menu
     }
 
@@ -7222,21 +7222,21 @@ impl Editor {
         Some(())
     }
 
-    fn show_edit_predictions_in_menu(&self) -> bool {
+    const fn show_edit_predictions_in_menu(&self) -> bool {
         match self.edit_prediction_settings {
             EditPredictionSettings::Disabled => false,
             EditPredictionSettings::Enabled { show_in_menu, .. } => show_in_menu,
         }
     }
 
-    pub fn edit_predictions_enabled(&self) -> bool {
+    pub const fn edit_predictions_enabled(&self) -> bool {
         match self.edit_prediction_settings {
             EditPredictionSettings::Disabled => false,
             EditPredictionSettings::Enabled { .. } => true,
         }
     }
 
-    fn edit_prediction_requires_modifier(&self) -> bool {
+    const fn edit_prediction_requires_modifier(&self) -> bool {
         match self.edit_prediction_settings {
             EditPredictionSettings::Disabled => false,
             EditPredictionSettings::Enabled {
@@ -7308,7 +7308,7 @@ impl Editor {
         self.snippet_stack.is_empty() && self.edit_predictions_enabled()
     }
 
-    pub fn edit_prediction_preview_is_active(&self) -> bool {
+    pub const fn edit_prediction_preview_is_active(&self) -> bool {
         matches!(
             self.edit_prediction_preview,
             EditPredictionPreview::Active { .. }
@@ -7721,7 +7721,7 @@ impl Editor {
         })
     }
 
-    pub fn has_active_edit_prediction(&self) -> bool {
+    pub const fn has_active_edit_prediction(&self) -> bool {
         self.active_edit_prediction.is_some()
     }
 
@@ -8670,7 +8670,7 @@ impl Editor {
             .map(|menu| menu.origin())
     }
 
-    pub fn set_context_menu_options(&mut self, options: ContextMenuOptions) {
+    pub const fn set_context_menu_options(&mut self, options: ContextMenuOptions) {
         self.context_menu_options = Some(options);
     }
 
@@ -9257,7 +9257,7 @@ impl Editor {
         None
     }
 
-    fn edit_prediction_cursor_popover_height(&self) -> Pixels {
+    const fn edit_prediction_cursor_popover_height(&self) -> Pixels {
         px(30.)
     }
 
@@ -11707,7 +11707,7 @@ impl Editor {
         });
     }
 
-    pub fn clear_selection_drag_state(&mut self) {
+    pub const fn clear_selection_drag_state(&mut self) {
         self.selection_drag_state = SelectionDragState::None;
     }
 
@@ -14111,7 +14111,7 @@ impl Editor {
         self.nav_history = nav_history;
     }
 
-    pub fn nav_history(&self) -> Option<&ItemNavHistory> {
+    pub const fn nav_history(&self) -> Option<&ItemNavHistory> {
         self.nav_history.as_ref()
     }
 
@@ -17352,7 +17352,7 @@ impl Editor {
         Some(rename)
     }
 
-    pub fn pending_rename(&self) -> Option<&RenameState> {
+    pub const fn pending_rename(&self) -> Option<&RenameState> {
         self.pending_rename.as_ref()
     }
 
@@ -17642,7 +17642,7 @@ impl Editor {
         }
     }
 
-    pub fn active_diagnostic_group(&self) -> Option<&ActiveDiagnosticGroup> {
+    pub const fn active_diagnostic_group(&self) -> Option<&ActiveDiagnosticGroup> {
         match &self.active_diagnostics {
             ActiveDiagnostic::Group(group) => Some(group),
             _ => None,
@@ -17722,19 +17722,19 @@ impl Editor {
         self.inline_diagnostics.clear();
     }
 
-    pub fn disable_word_completions(&mut self) {
+    pub const fn disable_word_completions(&mut self) {
         self.word_completions_enabled = false;
     }
 
-    pub fn diagnostics_enabled(&self) -> bool {
+    pub const fn diagnostics_enabled(&self) -> bool {
         self.diagnostics_enabled && self.mode.is_full()
     }
 
-    pub fn inline_diagnostics_enabled(&self) -> bool {
+    pub const fn inline_diagnostics_enabled(&self) -> bool {
         self.inline_diagnostics_enabled && self.diagnostics_enabled()
     }
 
-    pub fn show_inline_diagnostics(&self) -> bool {
+    pub const fn show_inline_diagnostics(&self) -> bool {
         self.show_inline_diagnostics
     }
 
@@ -19199,7 +19199,7 @@ impl Editor {
         self.focused_block = Some(focused_block);
     }
 
-    pub(crate) fn take_focused_block(&mut self) -> Option<FocusedBlock> {
+    pub(crate) const fn take_focused_block(&mut self) -> Option<FocusedBlock> {
         self.focused_block.take()
     }
 
@@ -19403,7 +19403,7 @@ impl Editor {
         self.style = Some(style);
     }
 
-    pub fn style(&self) -> Option<&EditorStyle> {
+    pub const fn style(&self) -> Option<&EditorStyle> {
         self.style.as_ref()
     }
 
@@ -19422,7 +19422,7 @@ impl Editor {
         }
     }
 
-    pub fn set_soft_wrap(&mut self) {
+    pub const fn set_soft_wrap(&mut self) {
         self.soft_wrap_mode_override = Some(language_settings::SoftWrap::EditorWidth)
     }
 
@@ -19470,7 +19470,7 @@ impl Editor {
         cx.notify();
     }
 
-    fn should_show_indent_guides(&self) -> Option<bool> {
+    const fn should_show_indent_guides(&self) -> Option<bool> {
         self.show_indent_guides
     }
 
@@ -19846,7 +19846,7 @@ impl Editor {
         None
     }
 
-    pub fn git_blame_inline_enabled(&self) -> bool {
+    pub const fn git_blame_inline_enabled(&self) -> bool {
         self.git_blame_inline_enabled
     }
 
@@ -19930,11 +19930,11 @@ impl Editor {
         }
     }
 
-    pub fn blame(&self) -> Option<&Entity<GitBlame>> {
+    pub const fn blame(&self) -> Option<&Entity<GitBlame>> {
         self.blame.as_ref()
     }
 
-    pub fn show_git_blame_gutter(&self) -> bool {
+    pub const fn show_git_blame_gutter(&self) -> bool {
         self.show_git_blame_gutter
     }
 
@@ -21186,11 +21186,11 @@ impl Editor {
         cx.notify();
     }
 
-    pub fn set_searchable(&mut self, searchable: bool) {
+    pub const fn set_searchable(&mut self, searchable: bool) {
         self.searchable = searchable;
     }
 
-    pub fn searchable(&self) -> bool {
+    pub const fn searchable(&self) -> bool {
         self.searchable
     }
 
@@ -21639,7 +21639,7 @@ impl Editor {
         mouse_context_menu::deploy_context_menu(self, None, position, window, cx);
     }
 
-    pub fn inlay_hint_cache(&self) -> &InlayHintCache {
+    pub const fn inlay_hint_cache(&self) -> &InlayHintCache {
         &self.inlay_hint_cache
     }
 
@@ -21895,7 +21895,7 @@ impl Editor {
         })
     }
 
-    pub fn file_header_size(&self) -> u32 {
+    pub const fn file_header_size(&self) -> u32 {
         FILE_HEADER_HEIGHT
     }
 
@@ -22456,7 +22456,7 @@ struct WordBreakingTokenizer<'a> {
 }
 
 impl<'a> WordBreakingTokenizer<'a> {
-    fn new(input: &'a str) -> Self {
+    const fn new(input: &'a str) -> Self {
         Self { input }
     }
 }
@@ -23600,7 +23600,7 @@ impl EditorSnapshot {
             .language_at(position)
     }
 
-    pub fn is_focused(&self) -> bool {
+    pub const fn is_focused(&self) -> bool {
         self.is_focused
     }
 
@@ -24358,7 +24358,7 @@ fn edit_prediction_fallback_text(edits: &[(Range<Anchor>, String)], cx: &App) ->
     }
 }
 
-pub fn diagnostic_style(severity: lsp::DiagnosticSeverity, colors: &StatusColors) -> Hsla {
+pub const fn diagnostic_style(severity: lsp::DiagnosticSeverity, colors: &StatusColors) -> Hsla {
     match severity {
         lsp::DiagnosticSeverity::ERROR => colors.error,
         lsp::DiagnosticSeverity::WARNING => colors.warning,
@@ -24533,7 +24533,7 @@ impl RowRangeExt for Range<DisplayRow> {
 
 /// If select range has more than one line, we
 /// just point the cursor to range.start.
-fn collapse_multiline_range(range: Range<Point>) -> Range<Point> {
+const fn collapse_multiline_range(range: Range<Point>) -> Range<Point> {
     if range.start.row == range.end.row {
         range
     } else {
  
  
  
    
    @@ -105,7 +105,7 @@ impl Minimap {
         self.display_in == DisplayIn::ActiveEditor
     }
 
-    pub fn with_show_override(self) -> Self {
+    pub const fn with_show_override(self) -> Self {
         Self {
             show: ShowMinimap::Always,
             ..self
  
  
  
    
    @@ -9678,7 +9678,7 @@ impl Element for EditorElement {
     }
 }
 
-pub(super) fn gutter_bounds(
+pub(super) const fn gutter_bounds(
     editor_bounds: Bounds<Pixels>,
     gutter_dimensions: GutterDimensions,
 ) -> Bounds<Pixels> {
@@ -10047,7 +10047,7 @@ impl ScrollbarLayout {
         }
     }
 
-    fn with_thumb_state(self, thumb_state: Option<ScrollbarThumbState>) -> Self {
+    const fn with_thumb_state(self, thumb_state: Option<ScrollbarThumbState>) -> Self {
         if let Some(thumb_state) = thumb_state {
             Self {
                 thumb_state,
@@ -10367,7 +10367,7 @@ pub struct CursorName {
 }
 
 impl CursorLayout {
-    pub fn new(
+    pub const fn new(
         origin: gpui::Point<Pixels>,
         block_width: Pixels,
         line_height: Pixels,
@@ -10475,7 +10475,7 @@ impl CursorLayout {
         }
     }
 
-    pub fn shape(&self) -> CursorShape {
+    pub const fn shape(&self) -> CursorShape {
         self.shape
     }
 }
  
  
  
    
    @@ -326,7 +326,7 @@ impl GitBlame {
         max_author_length
     }
 
-    pub fn blur(&mut self, _: &mut Context<Self>) {
+    pub const fn blur(&mut self, _: &mut Context<Self>) {
         self.focused = false;
     }
 
  
  
  
    
    @@ -85,7 +85,7 @@ pub enum TriggerPoint {
 }
 
 impl TriggerPoint {
-    fn anchor(&self) -> &Anchor {
+    const fn anchor(&self) -> &Anchor {
         match self {
             TriggerPoint::Text(anchor) => anchor,
             TriggerPoint::InlayHint(inlay_range, _, _) => &inlay_range.inlay_position,
  
  
  
    
    @@ -756,7 +756,7 @@ pub struct HoverState {
 }
 
 impl HoverState {
-    pub fn visible(&self) -> bool {
+    pub const fn visible(&self) -> bool {
         !self.info_popovers.is_empty() || self.diagnostic_popover.is_some()
     }
 
  
  
  
    
    @@ -23,7 +23,7 @@ pub struct ActiveIndentGuidesState {
 }
 
 impl ActiveIndentGuidesState {
-    pub fn should_refresh(&self) -> bool {
+    pub const fn should_refresh(&self) -> bool {
         self.pending_refresh.is_none() && self.dirty
     }
 }
  
  
  
    
    @@ -109,7 +109,7 @@ struct ExcerptQuery {
 }
 
 impl InvalidationStrategy {
-    fn should_invalidate(&self) -> bool {
+    const fn should_invalidate(&self) -> bool {
         matches!(
             self,
             InvalidationStrategy::RefreshRequested | InvalidationStrategy::BufferEdited
@@ -660,7 +660,7 @@ impl InlayHintCache {
     }
 }
 
-fn debounce_value(debounce_ms: u64) -> Option<Duration> {
+const fn debounce_value(debounce_ms: u64) -> Option<Duration> {
     if debounce_ms > 0 {
         Some(Duration::from_millis(debounce_ms))
     } else {
@@ -751,7 +751,7 @@ struct QueryRanges {
 }
 
 impl QueryRanges {
-    fn is_empty(&self) -> bool {
+    const fn is_empty(&self) -> bool {
         self.before_visible.is_empty() && self.visible.is_empty() && self.after_visible.is_empty()
     }
 
  
  
  
    
    @@ -1809,7 +1809,7 @@ pub fn active_match_index(
     }
 }
 
-pub fn entry_label_color(selected: bool) -> Color {
+pub const fn entry_label_color(selected: bool) -> Color {
     if selected {
         Color::Default
     } else {
@@ -1817,7 +1817,7 @@ pub fn entry_label_color(selected: bool) -> Color {
     }
 }
 
-pub fn entry_diagnostic_aware_icon_name_and_color(
+pub const fn entry_diagnostic_aware_icon_name_and_color(
     diagnostic_severity: Option<DiagnosticSeverity>,
 ) -> Option<(IconName, Color)> {
     match diagnostic_severity {
@@ -1827,7 +1827,7 @@ pub fn entry_diagnostic_aware_icon_name_and_color(
     }
 }
 
-pub fn entry_diagnostic_aware_icon_decoration_and_color(
+pub const fn entry_diagnostic_aware_icon_decoration_and_color(
     diagnostic_severity: Option<DiagnosticSeverity>,
 ) -> Option<(IconDecorationKind, Color)> {
     match diagnostic_severity {
  
  
  
    
    @@ -354,13 +354,13 @@ impl Item for ProposedChangesEditor {
 }
 
 impl ProposedChangesEditorToolbar {
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         Self {
             current_editor: None,
         }
     }
 
-    fn get_toolbar_item_location(&self) -> ToolbarItemLocation {
+    const fn get_toolbar_item_location(&self) -> ToolbarItemLocation {
         if self.current_editor.is_some() {
             ToolbarItemLocation::PrimaryRight
         } else {
  
  
  
    
    @@ -139,7 +139,7 @@ pub struct ActiveScrollbarState {
 }
 
 impl ActiveScrollbarState {
-    pub fn new(axis: Axis, thumb_state: ScrollbarThumbState) -> Self {
+    pub const fn new(axis: Axis, thumb_state: ScrollbarThumbState) -> Self {
         ActiveScrollbarState { axis, thumb_state }
     }
 
@@ -189,16 +189,16 @@ impl ScrollManager {
         }
     }
 
-    pub fn clone_state(&mut self, other: &Self) {
+    pub const fn clone_state(&mut self, other: &Self) {
         self.anchor = other.anchor;
         self.ongoing = other.ongoing;
     }
 
-    pub fn anchor(&self) -> ScrollAnchor {
+    pub const fn anchor(&self) -> ScrollAnchor {
         self.anchor
     }
 
-    pub fn ongoing_scroll(&self) -> OngoingScroll {
+    pub const fn ongoing_scroll(&self) -> OngoingScroll {
         self.ongoing
     }
 
@@ -345,15 +345,15 @@ impl ScrollManager {
         }
     }
 
-    pub fn scrollbars_visible(&self) -> bool {
+    pub const fn scrollbars_visible(&self) -> bool {
         self.show_scrollbars
     }
 
-    pub fn take_autoscroll_request(&mut self) -> Option<(Autoscroll, bool)> {
+    pub const fn take_autoscroll_request(&mut self) -> Option<(Autoscroll, bool)> {
         self.autoscroll_request.take()
     }
 
-    pub fn active_scrollbar_state(&self) -> Option<&ActiveScrollbarState> {
+    pub const fn active_scrollbar_state(&self) -> Option<&ActiveScrollbarState> {
         self.active_scrollbar.as_ref()
     }
 
@@ -440,7 +440,7 @@ impl ScrollManager {
         }
     }
 
-    pub fn minimap_thumb_state(&self) -> Option<ScrollbarThumbState> {
+    pub const fn minimap_thumb_state(&self) -> Option<ScrollbarThumbState> {
         self.minimap_thumb_state
     }
 
@@ -453,17 +453,17 @@ impl ScrollManager {
         }
     }
 
-    pub fn set_forbid_vertical_scroll(&mut self, forbid: bool) {
+    pub const fn set_forbid_vertical_scroll(&mut self, forbid: bool) {
         self.forbid_vertical_scroll = forbid;
     }
 
-    pub fn forbid_vertical_scroll(&self) -> bool {
+    pub const fn forbid_vertical_scroll(&self) -> bool {
         self.forbid_vertical_scroll
     }
 }
 
 impl Editor {
-    pub fn vertical_scroll_margin(&self) -> usize {
+    pub const fn vertical_scroll_margin(&self) -> usize {
         self.scroll_manager.vertical_scroll_margin as usize
     }
 
@@ -472,7 +472,7 @@ impl Editor {
         cx.notify();
     }
 
-    pub fn visible_line_count(&self) -> Option<f64> {
+    pub const fn visible_line_count(&self) -> Option<f64> {
         self.scroll_manager.visible_line_count
     }
 
@@ -481,7 +481,7 @@ impl Editor {
             .map(|line_count| line_count as u32 - 1)
     }
 
-    pub fn visible_column_count(&self) -> Option<f64> {
+    pub const fn visible_column_count(&self) -> Option<f64> {
         self.scroll_manager.visible_column_count
     }
 
@@ -506,7 +506,7 @@ impl Editor {
         }
     }
 
-    pub(crate) fn set_visible_column_count(&mut self, columns: f64) {
+    pub(crate) const fn set_visible_column_count(&mut self, columns: f64) {
         self.scroll_manager.visible_column_count = Some(columns);
     }
 
  
  
  
    
    @@ -16,49 +16,49 @@ pub enum Autoscroll {
 
 impl Autoscroll {
     /// scrolls the minimal amount to (try) and fit all cursors onscreen
-    pub fn fit() -> Self {
+    pub const fn fit() -> Self {
         Self::Strategy(AutoscrollStrategy::Fit, None)
     }
 
     /// scrolls the minimal amount to fit the newest cursor
-    pub fn newest() -> Self {
+    pub const fn newest() -> Self {
         Self::Strategy(AutoscrollStrategy::Newest, None)
     }
 
     /// scrolls so the newest cursor is vertically centered
-    pub fn center() -> Self {
+    pub const fn center() -> Self {
         Self::Strategy(AutoscrollStrategy::Center, None)
     }
 
     /// scrolls so the newest cursor is near the top
     /// (offset by vertical_scroll_margin)
-    pub fn focused() -> Self {
+    pub const fn focused() -> Self {
         Self::Strategy(AutoscrollStrategy::Focused, None)
     }
 
     /// Scrolls so that the newest cursor is roughly an n-th line from the top.
-    pub fn top_relative(n: usize) -> Self {
+    pub const fn top_relative(n: usize) -> Self {
         Self::Strategy(AutoscrollStrategy::TopRelative(n), None)
     }
 
     /// Scrolls so that the newest cursor is at the top.
-    pub fn top() -> Self {
+    pub const fn top() -> Self {
         Self::Strategy(AutoscrollStrategy::Top, None)
     }
 
     /// Scrolls so that the newest cursor is roughly an n-th line from the bottom.
-    pub fn bottom_relative(n: usize) -> Self {
+    pub const fn bottom_relative(n: usize) -> Self {
         Self::Strategy(AutoscrollStrategy::BottomRelative(n), None)
     }
 
     /// Scrolls so that the newest cursor is at the bottom.
-    pub fn bottom() -> Self {
+    pub const fn bottom() -> Self {
         Self::Strategy(AutoscrollStrategy::Bottom, None)
     }
 
     /// Applies a given auto-scroll strategy to a given anchor instead of a cursor.
     /// E.G: Autoscroll::center().for_anchor(...) results in the anchor being at the center of the screen.
-    pub fn for_anchor(self, anchor: Anchor) -> Self {
+    pub const fn for_anchor(self, anchor: Anchor) -> Self {
         match self {
             Autoscroll::Next => self,
             Autoscroll::Strategy(autoscroll_strategy, _) => {
@@ -91,7 +91,7 @@ pub enum AutoscrollStrategy {
 }
 
 impl AutoscrollStrategy {
-    fn next(&self) -> Self {
+    const fn next(&self) -> Self {
         match self {
             AutoscrollStrategy::Center => AutoscrollStrategy::Top,
             AutoscrollStrategy::Top => AutoscrollStrategy::Bottom,
  
  
  
    
    @@ -10,7 +10,7 @@ pub enum ScrollDirection {
 }
 
 impl ScrollDirection {
-    pub fn is_upwards(&self) -> bool {
+    pub const fn is_upwards(&self) -> bool {
         matches!(self, ScrollDirection::Upwards)
     }
 }
@@ -70,7 +70,7 @@ impl ScrollAmount {
         matches!(self, ScrollAmount::Page(count) if count.abs() == 1.0)
     }
 
-    pub fn direction(&self) -> ScrollDirection {
+    pub const fn direction(&self) -> ScrollDirection {
         match self {
             Self::Line(amount) if amount.is_sign_positive() => ScrollDirection::Downwards,
             Self::Page(amount) if amount.is_sign_positive() => ScrollDirection::Downwards,
  
  
  
    
    @@ -451,31 +451,31 @@ impl SelectionsCollection {
         (mutable_collection.selections_changed, result)
     }
 
-    pub fn next_selection_id(&self) -> usize {
+    pub const fn next_selection_id(&self) -> usize {
         self.next_selection_id
     }
 
-    pub fn line_mode(&self) -> bool {
+    pub const fn line_mode(&self) -> bool {
         self.line_mode
     }
 
-    pub fn set_line_mode(&mut self, line_mode: bool) {
+    pub const fn set_line_mode(&mut self, line_mode: bool) {
         self.line_mode = line_mode;
     }
 
-    pub fn select_mode(&self) -> &SelectMode {
+    pub const fn select_mode(&self) -> &SelectMode {
         &self.select_mode
     }
 
-    pub fn set_select_mode(&mut self, select_mode: SelectMode) {
+    pub const fn set_select_mode(&mut self, select_mode: SelectMode) {
         self.select_mode = select_mode;
     }
 
-    pub fn is_extending(&self) -> bool {
+    pub const fn is_extending(&self) -> bool {
         self.is_extending
     }
 
-    pub fn set_is_extending(&mut self, is_extending: bool) {
+    pub const fn set_is_extending(&mut self, is_extending: bool) {
         self.is_extending = is_extending;
     }
 }
@@ -524,7 +524,7 @@ impl<'a> MutableSelectionsCollection<'a> {
         self.selections_changed |= changed;
     }
 
-    pub fn clear_pending(&mut self) {
+    pub const fn clear_pending(&mut self) {
         if self.collection.pending.is_some() {
             self.collection.pending = None;
             self.selections_changed = true;
@@ -556,7 +556,7 @@ impl<'a> MutableSelectionsCollection<'a> {
         self.selections_changed = true;
     }
 
-    pub(crate) fn set_pending(&mut self, selection: Selection<Anchor>, mode: SelectMode) {
+    pub(crate) const fn set_pending(&mut self, selection: Selection<Anchor>, mode: SelectMode) {
         self.collection.pending = Some(PendingSelection { selection, mode });
         self.selections_changed = true;
     }
  
  
  
    
    @@ -276,7 +276,7 @@ impl SignatureHelpState {
         self.popover.as_ref()
     }
 
-    pub fn popover_mut(&mut self) -> Option<&mut SignatureHelpPopover> {
+    pub const fn popover_mut(&mut self) -> Option<&mut SignatureHelpPopover> {
         self.popover.as_mut()
     }
 
@@ -296,7 +296,7 @@ impl SignatureHelpState {
         self.hidden_by == Some(SignatureHelpHiddenBy::Selection)
     }
 
-    pub fn is_shown(&self) -> bool {
+    pub const fn is_shown(&self) -> bool {
         self.popover.is_some()
     }
 
  
  
  
    
    @@ -23,7 +23,7 @@ impl ExtensionEvents {
             .map(|g| g.0.clone())
     }
 
-    fn new(_cx: &mut Context<Self>) -> Self {
+    const fn new(_cx: &mut Context<Self>) -> Self {
         Self
     }
 
  
  
  
    
    @@ -6,7 +6,7 @@ pub use crate::wit::zed::extension::http_client::{
 
 impl HttpRequest {
     /// Returns a builder for an [`HttpRequest`].
-    pub fn builder() -> HttpRequestBuilder {
+    pub const fn builder() -> HttpRequestBuilder {
         HttpRequestBuilder::new()
     }
 
@@ -39,7 +39,7 @@ impl Default for HttpRequestBuilder {
 
 impl HttpRequestBuilder {
     /// Returns a new [`HttpRequestBuilder`].
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         HttpRequestBuilder {
             method: None,
             url: None,
@@ -50,7 +50,7 @@ impl HttpRequestBuilder {
     }
 
     /// Sets the HTTP method for the request.
-    pub fn method(mut self, method: HttpMethod) -> Self {
+    pub const fn method(mut self, method: HttpMethod) -> Self {
         self.method = Some(method);
         self
     }
@@ -80,7 +80,7 @@ impl HttpRequestBuilder {
     }
 
     /// Sets the redirect policy for the request.
-    pub fn redirect_policy(mut self, policy: RedirectPolicy) -> Self {
+    pub const fn redirect_policy(mut self, policy: RedirectPolicy) -> Self {
         self.redirect_policy = policy;
         self
     }
  
  
  
    
    @@ -10,7 +10,7 @@ pub struct CapabilityGranter {
 }
 
 impl CapabilityGranter {
-    pub fn new(
+    pub const fn new(
         granted_capabilities: Vec<ExtensionCapability>,
         manifest: Arc<ExtensionManifest>,
     ) -> Self {
  
  
  
    
    @@ -80,7 +80,7 @@ const CURRENT_SCHEMA_VERSION: SchemaVersion = SchemaVersion(1);
 const SUPPRESSED_EXTENSIONS: &[&str] = &["snippets", "ruff", "ty", "basedpyright"];
 
 /// Returns the [`SchemaVersion`] range that is compatible with this version of Zed.
-pub fn schema_version_range() -> RangeInclusive<SchemaVersion> {
+pub const fn schema_version_range() -> RangeInclusive<SchemaVersion> {
     SchemaVersion::ZERO..=CURRENT_SCHEMA_VERSION
 }
 
@@ -428,11 +428,11 @@ impl ExtensionStore {
         self.installed_dir.clone()
     }
 
-    pub fn outstanding_operations(&self) -> &BTreeMap<Arc<str>, ExtensionOperation> {
+    pub const fn outstanding_operations(&self) -> &BTreeMap<Arc<str>, ExtensionOperation> {
         &self.outstanding_operations
     }
 
-    pub fn installed_extensions(&self) -> &BTreeMap<Arc<str>, ExtensionIndexEntry> {
+    pub const fn installed_extensions(&self) -> &BTreeMap<Arc<str>, ExtensionIndexEntry> {
         &self.extension_index.extensions
     }
 
  
  
  
    
    @@ -49,7 +49,7 @@ pub fn new_linker(
     linker
 }
 
-fn wasi_view(state: &mut WasmState) -> &mut WasmState {
+const fn wasi_view(state: &mut WasmState) -> &mut WasmState {
     state
 }
 
@@ -63,7 +63,7 @@ pub fn is_supported_wasm_api_version(
 
 /// Returns the Wasm API version range that is supported by the Wasm host.
 #[inline(always)]
-pub fn wasm_api_version_range(release_channel: ReleaseChannel) -> RangeInclusive<SemanticVersion> {
+pub const fn wasm_api_version_range(release_channel: ReleaseChannel) -> RangeInclusive<SemanticVersion> {
     // Note: The release channel can be used to stage a new version of the extension API.
     let _ = release_channel;
 
  
  
  
    
    @@ -16,7 +16,7 @@ impl ExtensionCard {
         }
     }
 
-    pub fn overridden_by_dev_extension(mut self, overridden: bool) -> Self {
+    pub const fn overridden_by_dev_extension(mut self, overridden: bool) -> Self {
         self.overridden_by_dev_extension = overridden;
         self
     }
  
  
  
    
    @@ -181,7 +181,7 @@ pub fn init(cx: &mut App) {
     .detach();
 }
 
-fn extension_provides_label(provides: ExtensionProvides) -> &'static str {
+const fn extension_provides_label(provides: ExtensionProvides) -> &'static str {
     match provides {
         ExtensionProvides::Themes => "Themes",
         ExtensionProvides::IconThemes => "Icon Themes",
@@ -213,7 +213,7 @@ enum ExtensionFilter {
 }
 
 impl ExtensionFilter {
-    pub fn include_dev_extensions(&self) -> bool {
+    pub const fn include_dev_extensions(&self) -> bool {
         match self {
             Self::All | Self::Installed => true,
             Self::NotInstalled => false,
  
  
  
    
    @@ -466,7 +466,7 @@ enum Match {
 }
 
 impl Match {
-    fn relative_path(&self) -> Option<&Arc<RelPath>> {
+    const fn relative_path(&self) -> Option<&Arc<RelPath>> {
         match self {
             Match::History { path, .. } => Some(&path.project.path),
             Match::Search(panel_match) => Some(&panel_match.0.path),
@@ -488,7 +488,7 @@ impl Match {
         }
     }
 
-    fn panel_match(&self) -> Option<&ProjectPanelOrdMatch> {
+    const fn panel_match(&self) -> Option<&ProjectPanelOrdMatch> {
         match self {
             Match::History { panel_match, .. } => panel_match.as_ref(),
             Match::Search(panel_match) => Some(panel_match),
@@ -498,7 +498,7 @@ impl Match {
 }
 
 impl Matches {
-    fn len(&self) -> usize {
+    const fn len(&self) -> usize {
         self.matches.len()
     }
 
@@ -771,7 +771,7 @@ struct FoundPath {
 }
 
 impl FoundPath {
-    fn new(project: ProjectPath, absolute: PathBuf) -> Self {
+    const fn new(project: ProjectPath, absolute: PathBuf) -> Self {
         Self { project, absolute }
     }
 }
  
  
  
    
    @@ -77,7 +77,7 @@ impl OpenPathDelegate {
         self
     }
 
-    pub fn show_hidden(mut self) -> Self {
+    pub const fn show_hidden(mut self) -> Self {
         self.hidden_entries = true;
         self
     }
@@ -144,7 +144,7 @@ impl OpenPathDelegate {
         }
     }
 
-    fn current_dir(&self) -> &'static str {
+    const fn current_dir(&self) -> &'static str {
         match self.path_style {
             PathStyle::Posix => "./",
             PathStyle::Windows => ".\\",
  
  
  
    
    @@ -229,7 +229,7 @@ impl MTime {
     /// Returns the value wrapped by this `MTime`, for presentation to the user. The name including
     /// "_for_user" is to discourage misuse - this method should not be used when making decisions
     /// about file dirtiness.
-    pub fn timestamp_for_user(self) -> SystemTime {
+    pub const fn timestamp_for_user(self) -> SystemTime {
         self.0
     }
 
@@ -328,7 +328,7 @@ impl FileHandle for std::fs::File {
 pub struct RealWatcher {}
 
 impl RealFs {
-    pub fn new(git_binary_path: Option<PathBuf>, executor: BackgroundExecutor) -> Self {
+    pub const fn new(git_binary_path: Option<PathBuf>, executor: BackgroundExecutor) -> Self {
         Self {
             bundled_git_binary_path: git_binary_path,
             executor,
  
  
  
    
    @@ -17,7 +17,7 @@ pub struct MacWatcher {
 }
 
 impl MacWatcher {
-    pub fn new(
+    pub const fn new(
         events_tx: smol::channel::Sender<Vec<fsevent::Event>>,
         handles: Weak<Mutex<BTreeMap<PathBuf, fsevent::Handle>>>,
         latency: Duration,
  
  
  
    
    @@ -4,11 +4,11 @@ use std::iter::FromIterator;
 pub struct CharBag(u64);
 
 impl CharBag {
-    pub fn is_superset(self, other: CharBag) -> bool {
+    pub const fn is_superset(self, other: CharBag) -> bool {
         self.0 & other.0 == other.0
     }
 
-    fn insert(&mut self, c: char) {
+    const fn insert(&mut self, c: char) {
         let c = c.to_ascii_lowercase();
         if c.is_ascii_lowercase() {
             let mut count = self.0;
  
  
  
    
    @@ -115,11 +115,11 @@ impl From<UpstreamTrackingStatus> for UpstreamTracking {
 }
 
 impl UpstreamTracking {
-    pub fn is_gone(&self) -> bool {
+    pub const fn is_gone(&self) -> bool {
         matches!(self, UpstreamTracking::Gone)
     }
 
-    pub fn status(&self) -> Option<UpstreamTrackingStatus> {
+    pub const fn status(&self) -> Option<UpstreamTrackingStatus> {
         match self {
             UpstreamTracking::Gone => None,
             UpstreamTracking::Tracked(status) => Some(*status),
@@ -134,7 +134,7 @@ pub struct RemoteCommandOutput {
 }
 
 impl RemoteCommandOutput {
-    pub fn is_empty(&self) -> bool {
+    pub const fn is_empty(&self) -> bool {
         self.stdout.is_empty() && self.stderr.is_empty()
     }
 }
  
  
  
    
    @@ -62,23 +62,23 @@ pub enum StageStatus {
 }
 
 impl StageStatus {
-    pub fn is_fully_staged(&self) -> bool {
+    pub const fn is_fully_staged(&self) -> bool {
         matches!(self, StageStatus::Staged)
     }
 
-    pub fn is_fully_unstaged(&self) -> bool {
+    pub const fn is_fully_unstaged(&self) -> bool {
         matches!(self, StageStatus::Unstaged)
     }
 
-    pub fn has_staged(&self) -> bool {
+    pub const fn has_staged(&self) -> bool {
         matches!(self, StageStatus::Staged | StageStatus::PartiallyStaged)
     }
 
-    pub fn has_unstaged(&self) -> bool {
+    pub const fn has_unstaged(&self) -> bool {
         matches!(self, StageStatus::Unstaged | StageStatus::PartiallyStaged)
     }
 
-    pub fn as_bool(self) -> Option<bool> {
+    pub const fn as_bool(self) -> Option<bool> {
         match self {
             StageStatus::Staged => Some(true),
             StageStatus::Unstaged => Some(false),
@@ -139,7 +139,7 @@ impl FileStatus {
         Ok(status)
     }
 
-    pub fn staging(self) -> StageStatus {
+    pub const fn staging(self) -> StageStatus {
         match self {
             FileStatus::Untracked | FileStatus::Ignored | FileStatus::Unmerged { .. } => {
                 StageStatus::Unstaged
@@ -152,15 +152,15 @@ impl FileStatus {
         }
     }
 
-    pub fn is_conflicted(self) -> bool {
+    pub const fn is_conflicted(self) -> bool {
         matches!(self, FileStatus::Unmerged { .. })
     }
 
-    pub fn is_ignored(self) -> bool {
+    pub const fn is_ignored(self) -> bool {
         matches!(self, FileStatus::Ignored)
     }
 
-    pub fn has_changes(&self) -> bool {
+    pub const fn has_changes(&self) -> bool {
         self.is_modified()
             || self.is_created()
             || self.is_deleted()
@@ -168,7 +168,7 @@ impl FileStatus {
             || self.is_conflicted()
     }
 
-    pub fn is_modified(self) -> bool {
+    pub const fn is_modified(self) -> bool {
         match self {
             FileStatus::Tracked(tracked) => matches!(
                 (tracked.index_status, tracked.worktree_status),
@@ -178,7 +178,7 @@ impl FileStatus {
         }
     }
 
-    pub fn is_created(self) -> bool {
+    pub const fn is_created(self) -> bool {
         match self {
             FileStatus::Tracked(tracked) => matches!(
                 (tracked.index_status, tracked.worktree_status),
@@ -189,15 +189,15 @@ impl FileStatus {
         }
     }
 
-    pub fn is_deleted(self) -> bool {
+    pub const fn is_deleted(self) -> bool {
         matches!(self, FileStatus::Tracked(tracked) if matches!((tracked.index_status, tracked.worktree_status), (StatusCode::Deleted, _) | (_, StatusCode::Deleted)))
     }
 
-    pub fn is_untracked(self) -> bool {
+    pub const fn is_untracked(self) -> bool {
         matches!(self, FileStatus::Untracked)
     }
 
-    pub fn summary(self) -> GitSummary {
+    pub const fn summary(self) -> GitSummary {
         match self {
             FileStatus::Ignored => GitSummary::UNCHANGED,
             FileStatus::Untracked => GitSummary::UNTRACKED,
@@ -230,7 +230,7 @@ impl StatusCode {
         }
     }
 
-    fn to_summary(self) -> TrackedSummary {
+    const fn to_summary(self) -> TrackedSummary {
         match self {
             StatusCode::Modified | StatusCode::TypeChanged => TrackedSummary {
                 modified: 1,
@@ -250,14 +250,14 @@ impl StatusCode {
         }
     }
 
-    pub fn index(self) -> FileStatus {
+    pub const fn index(self) -> FileStatus {
         FileStatus::Tracked(TrackedStatus {
             index_status: self,
             worktree_status: StatusCode::Unmodified,
         })
     }
 
-    pub fn worktree(self) -> FileStatus {
+    pub const fn worktree(self) -> FileStatus {
         FileStatus::Tracked(TrackedStatus {
             index_status: StatusCode::Unmodified,
             worktree_status: self,
  
  
  
    
    @@ -33,7 +33,7 @@ pub struct CommitAvatar<'a> {
 }
 
 impl<'a> CommitAvatar<'a> {
-    pub fn new(sha: &'a SharedString, remote: Option<&'a GitRemote>) -> Self {
+    pub const fn new(sha: &'a SharedString, remote: Option<&'a GitRemote>) -> Self {
         Self { sha, remote }
     }
 
@@ -83,7 +83,7 @@ impl Hash for CommitAvatarAsset {
 }
 
 impl CommitAvatarAsset {
-    fn new(remote: GitRemote, sha: SharedString) -> Self {
+    const fn new(remote: GitRemote, sha: SharedString) -> Self {
         Self { remote, sha }
     }
 }
  
  
  
    
    @@ -225,7 +225,7 @@ impl GitHeaderEntry {
             Section::New => status.is_created(),
         }
     }
-    pub fn title(&self) -> &'static str {
+    pub const fn title(&self) -> &'static str {
         match self.header {
             Section::Conflict => "Conflicts",
             Section::Tracked => "Tracked",
@@ -241,7 +241,7 @@ enum GitListEntry {
 }
 
 impl GitListEntry {
-    fn status_entry(&self) -> Option<&GitStatusEntry> {
+    const fn status_entry(&self) -> Option<&GitStatusEntry> {
         match self {
             GitListEntry::Status(entry) => Some(entry),
             _ => None,
@@ -1333,7 +1333,7 @@ impl GitPanel {
         .detach();
     }
 
-    pub fn total_staged_count(&self) -> usize {
+    pub const fn total_staged_count(&self) -> usize {
         self.tracked_staged_count + self.new_staged_count + self.conflicted_staged_count
     }
 
@@ -2807,7 +2807,7 @@ impl GitPanel {
         cx.notify();
     }
 
-    fn header_state(&self, header_type: Section) -> ToggleState {
+    const fn header_state(&self, header_type: Section) -> ToggleState {
         let (staged_count, count) = match header_type {
             Section::New => (self.new_staged_count, self.new_count),
             Section::Tracked => (self.tracked_staged_count, self.tracked_count),
@@ -2873,23 +2873,23 @@ impl GitPanel {
         entry.staging
     }
 
-    pub(crate) fn has_staged_changes(&self) -> bool {
+    pub(crate) const fn has_staged_changes(&self) -> bool {
         self.tracked_staged_count > 0
             || self.new_staged_count > 0
             || self.conflicted_staged_count > 0
     }
 
-    pub(crate) fn has_unstaged_changes(&self) -> bool {
+    pub(crate) const fn has_unstaged_changes(&self) -> bool {
         self.tracked_count > self.tracked_staged_count
             || self.new_count > self.new_staged_count
             || self.conflicted_count > self.conflicted_staged_count
     }
 
-    fn has_tracked_changes(&self) -> bool {
+    const fn has_tracked_changes(&self) -> bool {
         self.tracked_count > 0
     }
 
-    pub fn has_unstaged_conflicts(&self) -> bool {
+    pub const fn has_unstaged_conflicts(&self) -> bool {
         self.conflicted_count > 0 && self.conflicted_count != self.conflicted_staged_count
     }
 
@@ -3004,21 +3004,21 @@ impl GitPanel {
         workspace.add_item_to_center(Box::new(editor), window, cx);
     }
 
-    pub fn can_commit(&self) -> bool {
+    pub const fn can_commit(&self) -> bool {
         (self.has_staged_changes() || self.has_tracked_changes()) && !self.has_unstaged_conflicts()
     }
 
-    pub fn can_stage_all(&self) -> bool {
+    pub const fn can_stage_all(&self) -> bool {
         self.has_unstaged_changes()
     }
 
-    pub fn can_unstage_all(&self) -> bool {
+    pub const fn can_unstage_all(&self) -> bool {
         self.has_staged_changes()
     }
 
     // eventually we'll need to take depth into account here
     // if we add a tree view
-    fn item_width_estimate(path: usize, file_name: usize) -> usize {
+    const fn item_width_estimate(path: usize, file_name: usize) -> usize {
         path + file_name
     }
 
@@ -3235,7 +3235,7 @@ impl GitPanel {
         }
     }
 
-    pub fn commit_button_title(&self) -> &'static str {
+    pub const fn commit_button_title(&self) -> &'static str {
         if self.amend_pending {
             if self.has_staged_changes() {
                 "Amend"
@@ -3822,7 +3822,7 @@ impl GitPanel {
         Label::new(label.into()).color(color).single_line()
     }
 
-    fn list_item_height(&self) -> Rems {
+    const fn list_item_height(&self) -> Rems {
         rems(1.75)
     }
 
@@ -4160,7 +4160,7 @@ impl GitPanel {
         !self.project.read(cx).is_read_only(cx)
     }
 
-    pub fn amend_pending(&self) -> bool {
+    pub const fn amend_pending(&self) -> bool {
         self.amend_pending
     }
 
@@ -4186,7 +4186,7 @@ impl GitPanel {
         cx.notify();
     }
 
-    pub fn signoff_enabled(&self) -> bool {
+    pub const fn signoff_enabled(&self) -> bool {
         self.signoff_enabled
     }
 
@@ -4535,7 +4535,7 @@ pub struct PanelRepoFooter {
 }
 
 impl PanelRepoFooter {
-    pub fn new(
+    pub const fn new(
         active_repository: SharedString,
         branch: Option<Branch>,
         head_commit: Option<CommitDetails>,
@@ -4549,7 +4549,7 @@ impl PanelRepoFooter {
         }
     }
 
-    pub fn new_preview(active_repository: SharedString, branch: Option<Branch>) -> Self {
+    pub const fn new_preview(active_repository: SharedString, branch: Option<Branch>) -> Self {
         Self {
             active_repository,
             branch,
  
  
  
    
    @@ -687,7 +687,7 @@ pub struct GitStatusIcon {
 }
 
 impl GitStatusIcon {
-    pub fn new(status: FileStatus) -> Self {
+    pub const fn new(status: FileStatus) -> Self {
         Self { status }
     }
 }
@@ -729,7 +729,7 @@ impl Component for GitStatusIcon {
     }
 
     fn preview(_window: &mut Window, _cx: &mut App) -> Option<AnyElement> {
-        fn tracked_file_status(code: StatusCode) -> FileStatus {
+        const fn tracked_file_status(code: StatusCode) -> FileStatus {
             FileStatus::Tracked(git::status::TrackedStatus {
                 index_status: code,
                 worktree_status: code,
  
  
  
    
    @@ -98,7 +98,7 @@ pub struct PickerPromptDelegate {
 }
 
 impl PickerPromptDelegate {
-    pub fn new(
+    pub const fn new(
         prompt: Arc<str>,
         options: Vec<SharedString>,
         tx: oneshot::Sender<usize>,
  
  
  
    
    @@ -12,7 +12,7 @@ pub enum RemoteAction {
 }
 
 impl RemoteAction {
-    pub fn name(&self) -> &'static str {
+    pub const fn name(&self) -> &'static str {
         match self {
             RemoteAction::Fetch(_) => "fetch",
             RemoteAction::Pull(_) => "pull",
  
  
  
    
    @@ -442,7 +442,7 @@ pub struct ModelName {
 }
 
 impl ModelName {
-    pub fn is_empty(&self) -> bool {
+    pub const fn is_empty(&self) -> bool {
         self.model_id.is_empty()
     }
 }
@@ -529,7 +529,7 @@ pub enum Model {
 }
 
 impl Model {
-    pub fn default_fast() -> Self {
+    pub const fn default_fast() -> Self {
         Self::Gemini20FlashLite
     }
 
@@ -576,7 +576,7 @@ impl Model {
         }
     }
 
-    pub fn max_token_count(&self) -> u64 {
+    pub const fn max_token_count(&self) -> u64 {
         match self {
             Self::Gemini15Pro => 2_097_152,
             Self::Gemini15Flash8b => 1_048_576,
@@ -590,7 +590,7 @@ impl Model {
         }
     }
 
-    pub fn max_output_tokens(&self) -> Option<u64> {
+    pub const fn max_output_tokens(&self) -> Option<u64> {
         match self {
             Model::Gemini15Pro => Some(8_192),
             Model::Gemini15Flash8b => Some(8_192),
@@ -604,15 +604,15 @@ impl Model {
         }
     }
 
-    pub fn supports_tools(&self) -> bool {
+    pub const fn supports_tools(&self) -> bool {
         true
     }
 
-    pub fn supports_images(&self) -> bool {
+    pub const fn supports_images(&self) -> bool {
         true
     }
 
-    pub fn mode(&self) -> GoogleModelMode {
+    pub const fn mode(&self) -> GoogleModelMode {
         match self {
             Self::Gemini15Pro
             | Self::Gemini15Flash8b
  
  
  
    
    @@ -376,7 +376,7 @@ impl ActionRegistry {
         })
     }
 
-    pub fn all_action_names(&self) -> &[&'static str] {
+    pub const fn all_action_names(&self) -> &[&'static str] {
         self.all_names.as_slice()
     }
 
@@ -397,15 +397,15 @@ impl ActionRegistry {
             .collect::<Vec<_>>()
     }
 
-    pub fn deprecated_aliases(&self) -> &HashMap<&'static str, &'static str> {
+    pub const fn deprecated_aliases(&self) -> &HashMap<&'static str, &'static str> {
         &self.deprecated_aliases
     }
 
-    pub fn deprecation_messages(&self) -> &HashMap<&'static str, &'static str> {
+    pub const fn deprecation_messages(&self) -> &HashMap<&'static str, &'static str> {
         &self.deprecation_messages
     }
 
-    pub fn documentation(&self) -> &HashMap<&'static str, &'static str> {
+    pub const fn documentation(&self) -> &HashMap<&'static str, &'static str> {
         &self.documentation
     }
 }
  
  
  
    
    @@ -283,7 +283,7 @@ impl SystemWindowTabController {
     }
 
     /// Get all tab groups.
-    pub fn tab_groups(&self) -> &FxHashMap<usize, Vec<SystemWindowTab>> {
+    pub const fn tab_groups(&self) -> &FxHashMap<usize, Vec<SystemWindowTab>> {
         &self.tab_groups
     }
 
@@ -766,7 +766,7 @@ impl App {
         result
     }
 
-    pub(crate) fn start_update(&mut self) {
+    pub(crate) const fn start_update(&mut self) {
         self.pending_updates += 1;
     }
 
@@ -1402,7 +1402,7 @@ impl App {
     }
 
     /// Obtains a reference to the executor, which can be used to spawn futures.
-    pub fn background_executor(&self) -> &BackgroundExecutor {
+    pub const fn background_executor(&self) -> &BackgroundExecutor {
         &self.background_executor
     }
 
@@ -1446,7 +1446,7 @@ impl App {
     }
 
     /// Accessor for the text system.
-    pub fn text_system(&self) -> &Arc<TextSystem> {
+    pub const fn text_system(&self) -> &Arc<TextSystem> {
         &self.text_system
     }
 
@@ -1712,7 +1712,7 @@ impl App {
     /// event handlers with a lower z-index (mouse) or higher in the tree (keyboard). This is
     /// the opposite of [`Self::propagate`]. It's also possible to cancel a call to [`Self::propagate`] by
     /// calling this method before effects are flushed.
-    pub fn stop_propagation(&mut self) {
+    pub const fn stop_propagation(&mut self) {
         self.propagate_event = false;
     }
 
@@ -1720,7 +1720,7 @@ impl App {
     /// dispatching to action handlers higher in the element tree. This is the opposite of
     /// [`Self::stop_propagation`]. It's also possible to cancel a call to [`Self::stop_propagation`] by calling
     /// this method before effects are flushed.
-    pub fn propagate(&mut self) {
+    pub const fn propagate(&mut self) {
         self.propagate_event = true;
     }
 
@@ -1939,7 +1939,7 @@ impl App {
     }
 
     /// Is there currently something being dragged?
-    pub fn has_active_drag(&self) -> bool {
+    pub const fn has_active_drag(&self) -> bool {
         self.active_drag.is_some()
     }
 
@@ -2058,7 +2058,7 @@ impl App {
 
     /// Returns the name for this [`App`].
     #[cfg(any(test, feature = "test-support", debug_assertions))]
-    pub fn get_name(&self) -> Option<&'static str> {
+    pub const fn get_name(&self) -> Option<&'static str> {
         self.name
     }
 
  
  
  
    
    @@ -129,12 +129,12 @@ impl AsyncApp {
     }
 
     /// Get an executor which can be used to spawn futures in the background.
-    pub fn background_executor(&self) -> &BackgroundExecutor {
+    pub const fn background_executor(&self) -> &BackgroundExecutor {
         &self.background_executor
     }
 
     /// Get an executor which can be used to spawn futures in the foreground.
-    pub fn foreground_executor(&self) -> &ForegroundExecutor {
+    pub const fn foreground_executor(&self) -> &ForegroundExecutor {
         &self.foreground_executor
     }
 
@@ -271,12 +271,12 @@ pub struct AsyncWindowContext {
 }
 
 impl AsyncWindowContext {
-    pub(crate) fn new_context(app: AsyncApp, window: AnyWindowHandle) -> Self {
+    pub(crate) const fn new_context(app: AsyncApp, window: AnyWindowHandle) -> Self {
         Self { app, window }
     }
 
     /// Get the handle of the window this context is associated with.
-    pub fn window_handle(&self) -> AnyWindowHandle {
+    pub const fn window_handle(&self) -> AnyWindowHandle {
         self.window
     }
 
  
  
  
    
    @@ -37,7 +37,7 @@ impl<'a, T> ops::DerefMut for Context<'a, T> {
 }
 
 impl<'a, T: 'static> Context<'a, T> {
-    pub(crate) fn new_context(app: &'a mut App, entity_state: WeakEntity<T>) -> Self {
+    pub(crate) const fn new_context(app: &'a mut App, entity_state: WeakEntity<T>) -> Self {
         Self { app, entity_state }
     }
 
  
  
  
    
    @@ -244,12 +244,12 @@ impl AnyEntity {
     }
 
     /// Returns the id associated with this entity.
-    pub fn entity_id(&self) -> EntityId {
+    pub const fn entity_id(&self) -> EntityId {
         self.entity_id
     }
 
     /// Returns the [TypeId] associated with this entity.
-    pub fn entity_type(&self) -> TypeId {
+    pub const fn entity_type(&self) -> TypeId {
         self.entity_type
     }
 
@@ -395,7 +395,7 @@ impl<T: 'static> Entity<T> {
     }
 
     /// Get the entity ID associated with this entity
-    pub fn entity_id(&self) -> EntityId {
+    pub const fn entity_id(&self) -> EntityId {
         self.any_entity.entity_id
     }
 
@@ -520,7 +520,7 @@ pub struct AnyWeakEntity {
 
 impl AnyWeakEntity {
     /// Get the entity ID associated with this weak reference.
-    pub fn entity_id(&self) -> EntityId {
+    pub const fn entity_id(&self) -> EntityId {
         self.entity_id
     }
 
  
  
  
    
    @@ -64,7 +64,7 @@ impl Chunk {
         }
     }
 
-    fn reset(&mut self) {
+    const fn reset(&mut self) {
         self.offset = self.start;
     }
 }
@@ -95,7 +95,7 @@ impl Arena {
         }
     }
 
-    pub fn capacity(&self) -> usize {
+    pub const fn capacity(&self) -> usize {
         self.chunks.len() * self.chunk_size.get()
     }
 
  
  
  
    
    @@ -216,14 +216,14 @@ impl<U> Node<U>
 where
     U: Clone + Debug + Default + PartialEq,
 {
-    fn bounds(&self) -> &Bounds<U> {
+    const fn bounds(&self) -> &Bounds<U> {
         match self {
             Node::Leaf { bounds, .. } => bounds,
             Node::Internal { bounds, .. } => bounds,
         }
     }
 
-    fn max_ordering(&self) -> u32 {
+    const fn max_ordering(&self) -> u32 {
         match self {
             Node::Leaf {
                 order: ordering, ..
  
  
  
    
    @@ -333,7 +333,7 @@ impl Display for Hsla {
 }
 
 /// Construct an [`Hsla`] object from plain values
-pub fn hsla(h: f32, s: f32, l: f32, a: f32) -> Hsla {
+pub const fn hsla(h: f32, s: f32, l: f32, a: f32) -> Hsla {
     Hsla {
         h: h.clamp(0., 1.),
         s: s.clamp(0., 1.),
@@ -373,7 +373,7 @@ pub const fn transparent_white() -> Hsla {
 }
 
 /// Opaque grey in [`Hsla`], values will be clamped to the range [0, 1]
-pub fn opaque_grey(lightness: f32, opacity: f32) -> Hsla {
+pub const fn opaque_grey(lightness: f32, opacity: f32) -> Hsla {
     Hsla {
         h: 0.,
         s: 0.,
@@ -505,7 +505,7 @@ impl Hsla {
     }
 
     /// Returns a new HSLA color with the same hue, and lightness, but with no saturation.
-    pub fn grayscale(&self) -> Self {
+    pub const fn grayscale(&self) -> Self {
         Hsla {
             h: self.h,
             s: 0.,
@@ -576,7 +576,7 @@ impl Hsla {
     /// ```
     ///
     /// This will return a blue color with 25% opacity.
-    pub fn alpha(&self, a: f32) -> Self {
+    pub const fn alpha(&self, a: f32) -> Self {
         Hsla {
             h: self.h,
             s: self.s,
@@ -811,7 +811,7 @@ impl Background {
     /// Use specified color space for color interpolation.
     ///
     /// <https://developer.mozilla.org/en-US/docs/Web/CSS/color-interpolation-method>
-    pub fn color_space(mut self, color_space: ColorSpace) -> Self {
+    pub const fn color_space(mut self, color_space: ColorSpace) -> Self {
         self.color_space = color_space;
         self
     }
  
  
  
    
    @@ -188,7 +188,7 @@ pub struct Component<C: RenderOnce> {
 impl<C: RenderOnce> Component<C> {
     /// Create a new component from the given RenderOnce type.
     #[track_caller]
-    pub fn new(component: C) -> Self {
+    pub const fn new(component: C) -> Self {
         Component {
             component: Some(component),
             #[cfg(debug_assertions)]
@@ -341,7 +341,7 @@ enum ElementDrawPhase<RequestLayoutState, PrepaintState> {
 
 /// A wrapper around an implementer of [`Element`] that allows it to be drawn in a window.
 impl<E: Element> Drawable<E> {
-    pub(crate) fn new(element: E) -> Self {
+    pub(crate) const fn new(element: E) -> Self {
         Drawable {
             element,
             phase: ElementDrawPhase::Start,
  
  
  
    
    @@ -37,21 +37,21 @@ pub fn anchored() -> Anchored {
 
 impl Anchored {
     /// Sets which corner of the anchored element should be anchored to the current position.
-    pub fn anchor(mut self, anchor: Corner) -> Self {
+    pub const fn anchor(mut self, anchor: Corner) -> Self {
         self.anchor_corner = anchor;
         self
     }
 
     /// Sets the position in window coordinates
     /// (otherwise the location the anchored element is rendered is used)
-    pub fn position(mut self, anchor: Point<Pixels>) -> Self {
+    pub const fn position(mut self, anchor: Point<Pixels>) -> Self {
         self.anchor_position = Some(anchor);
         self
     }
 
     /// Offset the final position by this amount.
     /// Useful when you want to anchor to an element but offset from it, such as in PopoverMenu.
-    pub fn offset(mut self, offset: Point<Pixels>) -> Self {
+    pub const fn offset(mut self, offset: Point<Pixels>) -> Self {
         self.offset = Some(offset);
         self
     }
@@ -59,13 +59,13 @@ impl Anchored {
     /// Sets the position mode for this anchored element. Local will have this
     /// interpret its [`Anchored::position`] as relative to the parent element.
     /// While Window will have it interpret the position as relative to the window.
-    pub fn position_mode(mut self, mode: AnchoredPositionMode) -> Self {
+    pub const fn position_mode(mut self, mode: AnchoredPositionMode) -> Self {
         self.position_mode = mode;
         self
     }
 
     /// Snap to window edge instead of switching anchor corner when an overflow would occur.
-    pub fn snap_to_window(mut self) -> Self {
+    pub const fn snap_to_window(mut self) -> Self {
         self.fit_mode = AnchoredFitMode::SnapToWindow;
         self
     }
  
  
  
    
    @@ -34,7 +34,7 @@ impl Animation {
     }
 
     /// Set the animation to loop when it finishes.
-    pub fn repeat(mut self) -> Self {
+    pub const fn repeat(mut self) -> Self {
         self.oneshot = false;
         self
     }
@@ -210,7 +210,7 @@ mod easing {
     use std::f32::consts::PI;
 
     /// The linear easing function, or delta itself
-    pub fn linear(delta: f32) -> f32 {
+    pub const fn linear(delta: f32) -> f32 {
         delta
     }
 
  
  
  
    
    @@ -22,7 +22,7 @@ impl Deferred {
     /// Sets the `priority` value of the `deferred` element, which
     /// determines the drawing order relative to other deferred elements,
     /// with higher values being drawn on top.
-    pub fn with_priority(mut self, priority: usize) -> Self {
+    pub const fn with_priority(mut self, priority: usize) -> Self {
         self.priority = priority;
         self
     }
@@ -89,7 +89,7 @@ impl IntoElement for Deferred {
 impl Deferred {
     /// Sets a priority for the element. A higher priority conceptually means painting the element
     /// on top of deferred draws with a lower priority (i.e. closer to the viewer).
-    pub fn priority(mut self, priority: usize) -> Self {
+    pub const fn priority(mut self, priority: usize) -> Self {
         self.priority = priority;
         self
     }
  
  
  
    
    @@ -102,7 +102,7 @@ impl Interactivity {
     }
 
     /// Gets the source location of construction. Returns `None` when not in debug mode.
-    pub fn source_location(&self) -> Option<&'static std::panic::Location<'static>> {
+    pub const fn source_location(&self) -> Option<&'static std::panic::Location<'static>> {
         #[cfg(any(feature = "inspector", debug_assertions))]
         {
             self.source_location
@@ -572,13 +572,13 @@ impl Interactivity {
     /// `block_mouse_except_scroll` should be preferred.
     ///
     /// The imperative API equivalent to [`InteractiveElement::occlude`]
-    pub fn occlude_mouse(&mut self) {
+    pub const fn occlude_mouse(&mut self) {
         self.hitbox_behavior = HitboxBehavior::BlockMouse;
     }
 
     /// Set the bounds of this element as a window control area for the platform window.
     /// The imperative API equivalent to [`InteractiveElement::window_control_area`]
-    pub fn window_control_area(&mut self, area: WindowControlArea) {
+    pub const fn window_control_area(&mut self, area: WindowControlArea) {
         self.window_control = Some(area);
     }
 
@@ -586,7 +586,7 @@ impl Interactivity {
     /// [`Hitbox::is_hovered`] for details.
     ///
     /// The imperative API equivalent to [`InteractiveElement::block_mouse_except_scroll`]
-    pub fn block_mouse_except_scroll(&mut self) {
+    pub const fn block_mouse_except_scroll(&mut self) {
         self.hitbox_behavior = HitboxBehavior::BlockMouseExceptScroll;
     }
 }
@@ -2585,7 +2585,7 @@ pub struct ElementClickedState {
 }
 
 impl ElementClickedState {
-    fn is_clicked(&self) -> bool {
+    const fn is_clicked(&self) -> bool {
         self.group || self.element
     }
 }
  
  
  
    
    @@ -206,7 +206,7 @@ pub fn img(source: impl Into<ImageSource>) -> Img {
 
 impl Img {
     /// A list of all format extensions currently supported by this img element
-    pub fn extensions() -> &'static [&'static str] {
+    pub const fn extensions() -> &'static [&'static str] {
         // This is the list in [image::ImageFormat::from_extension] + `svg`
         &[
             "avif", "jpg", "jpeg", "png", "gif", "webp", "tif", "tiff", "tga", "dds", "bmp", "ico",
  
  
  
    
    @@ -43,7 +43,7 @@ pub struct List {
 
 impl List {
     /// Set the sizing behavior for the list.
-    pub fn with_sizing_behavior(mut self, behavior: ListSizingBehavior) -> Self {
+    pub const fn with_sizing_behavior(mut self, behavior: ListSizingBehavior) -> Self {
         self.sizing_behavior = behavior;
         self
     }
@@ -116,7 +116,7 @@ pub enum ListMeasuringBehavior {
 }
 
 impl ListMeasuringBehavior {
-    fn reset(&mut self) {
+    const fn reset(&mut self) {
         match self {
             ListMeasuringBehavior::Measure(has_measured) => *has_measured = false,
             ListMeasuringBehavior::Visible => {}
@@ -164,7 +164,7 @@ enum ListItem {
 }
 
 impl ListItem {
-    fn size(&self) -> Option<Size<Pixels>> {
+    const fn size(&self) -> Option<Size<Pixels>> {
         if let ListItem::Measured { size, .. } = self {
             Some(*size)
         } else {
  
  
  
    
    @@ -39,7 +39,7 @@ pub fn surface(source: impl Into<SurfaceSource>) -> Surface {
 
 impl Surface {
     /// Set the object fit for the image.
-    pub fn object_fit(mut self, object_fit: ObjectFit) -> Self {
+    pub const fn object_fit(mut self, object_fit: ObjectFit) -> Self {
         self.object_fit = object_fit;
         self
     }
  
  
  
    
    @@ -32,7 +32,7 @@ impl Svg {
 
     /// Transform the SVG element with the given transformation.
     /// Note that this won't effect the hitbox or layout of the element, only the rendering.
-    pub fn with_transformation(mut self, transformation: Transformation) -> Self {
+    pub const fn with_transformation(mut self, transformation: Transformation) -> Self {
         self.transformation = Some(transformation);
         self
     }
@@ -165,7 +165,7 @@ impl Default for Transformation {
 
 impl Transformation {
     /// Create a new Transformation with the specified scale along each axis.
-    pub fn scale(scale: Size<f32>) -> Self {
+    pub const fn scale(scale: Size<f32>) -> Self {
         Self {
             scale,
             translate: point(px(0.0), px(0.0)),
@@ -174,7 +174,7 @@ impl Transformation {
     }
 
     /// Create a new Transformation with the specified translation.
-    pub fn translate(translate: Point<Pixels>) -> Self {
+    pub const fn translate(translate: Point<Pixels>) -> Self {
         Self {
             scale: size(1.0, 1.0),
             translate,
@@ -193,13 +193,13 @@ impl Transformation {
     }
 
     /// Update the scaling factor of this transformation.
-    pub fn with_scaling(mut self, scale: Size<f32>) -> Self {
+    pub const fn with_scaling(mut self, scale: Size<f32>) -> Self {
         self.scale = scale;
         self
     }
 
     /// Update the translation value of this transformation.
-    pub fn with_translation(mut self, translate: Point<Pixels>) -> Self {
+    pub const fn with_translation(mut self, translate: Point<Pixels>) -> Self {
         self.translate = translate;
         self
     }
  
  
  
    
    @@ -164,7 +164,7 @@ impl StyledText {
     }
 
     /// Get the layout for this element. This can be used to map indices to pixels and vice versa.
-    pub fn layout(&self) -> &TextLayout {
+    pub const fn layout(&self) -> &TextLayout {
         &self.layout
     }
 
  
  
  
    
    @@ -627,7 +627,7 @@ impl UniformList {
     }
 
     /// Sets the sizing behavior, similar to the `List` element.
-    pub fn with_sizing_behavior(mut self, behavior: ListSizingBehavior) -> Self {
+    pub const fn with_sizing_behavior(mut self, behavior: ListSizingBehavior) -> Self {
         self.sizing_behavior = behavior;
         self
     }
  
  
  
    
    @@ -68,7 +68,7 @@ enum TaskState<T> {
 
 impl<T> Task<T> {
     /// Creates a new task that will resolve with the value
-    pub fn ready(val: T) -> Self {
+    pub const fn ready(val: T) -> Self {
         Task(TaskState::Ready(Some(val)))
     }
 
  
  
  
    
    @@ -31,7 +31,7 @@ pub enum Axis {
 
 impl Axis {
     /// Swap this axis to the opposite axis.
-    pub fn invert(self) -> Self {
+    pub const fn invert(self) -> Self {
         match self {
             Axis::Vertical => Axis::Horizontal,
             Axis::Horizontal => Axis::Vertical,
@@ -405,7 +405,7 @@ pub struct Size<T: Clone + Debug + Default + PartialEq> {
 
 impl<T: Clone + Debug + Default + PartialEq> Size<T> {
     /// Create a new Size, a synonym for [`size`]
-    pub fn new(width: T, height: T) -> Self {
+    pub const fn new(width: T, height: T) -> Self {
         size(width, height)
     }
 }
@@ -723,7 +723,7 @@ impl Size<Length> {
     /// # Returns
     ///
     /// A `Size<Length>` with width and height set to `Length::Auto`.
-    pub fn auto() -> Self {
+    pub const fn auto() -> Self {
         Self {
             width: Length::Auto,
             height: Length::Auto,
@@ -759,7 +759,7 @@ pub struct Bounds<T: Clone + Debug + Default + PartialEq> {
 }
 
 /// Create a bounds with the given origin and size
-pub fn bounds<T: Clone + Debug + Default + PartialEq>(
+pub const fn bounds<T: Clone + Debug + Default + PartialEq>(
     origin: Point<T>,
     size: Size<T>,
 ) -> Bounds<T> {
@@ -810,7 +810,7 @@ where
     /// # Returns
     ///
     /// Returns a `Bounds<T>` that has the given origin and size.
-    pub fn new(origin: Point<T>, size: Size<T>) -> Self {
+    pub const fn new(origin: Point<T>, size: Size<T>) -> Self {
         Bounds { origin, size }
     }
 }
@@ -1865,7 +1865,7 @@ impl Edges<Length> {
     /// assert_eq!(auto_edges.bottom, Length::Auto);
     /// assert_eq!(auto_edges.left, Length::Auto);
     /// ```
-    pub fn auto() -> Self {
+    pub const fn auto() -> Self {
         Self {
             top: Length::Auto,
             right: Length::Auto,
@@ -2137,7 +2137,7 @@ impl Corner {
     /// assert_eq!(Corner::TopLeft.opposite_corner(), Corner::BottomRight);
     /// ```
     #[must_use]
-    pub fn opposite_corner(self) -> Self {
+    pub const fn opposite_corner(self) -> Self {
         match self {
             Corner::TopLeft => Corner::BottomRight,
             Corner::TopRight => Corner::BottomLeft,
@@ -2156,7 +2156,7 @@ impl Corner {
     /// assert_eq!(result, Corner::TopRight);
     /// ```
     #[must_use]
-    pub fn other_side_corner_along(self, axis: Axis) -> Self {
+    pub const fn other_side_corner_along(self, axis: Axis) -> Self {
         match axis {
             Axis::Vertical => match self {
                 Corner::TopLeft => Corner::BottomLeft,
@@ -2492,7 +2492,7 @@ impl From<Pixels> for Corners<Pixels> {
 pub struct Radians(pub f32);
 
 /// Create a `Radian` from a raw value
-pub fn radians(value: f32) -> Radians {
+pub const fn radians(value: f32) -> Radians {
     Radians(value)
 }
 
@@ -2675,7 +2675,7 @@ impl Pixels {
     /// # Returns
     ///
     /// Returns a new `Pixels` instance with the floored value.
-    pub fn floor(&self) -> Self {
+    pub const fn floor(&self) -> Self {
         Self(self.0.floor())
     }
 
@@ -2684,7 +2684,7 @@ impl Pixels {
     /// # Returns
     ///
     /// Returns a new `Pixels` instance with the rounded value.
-    pub fn round(&self) -> Self {
+    pub const fn round(&self) -> Self {
         Self(self.0.round())
     }
 
@@ -2693,7 +2693,7 @@ impl Pixels {
     /// # Returns
     ///
     /// Returns a new `Pixels` instance with the ceiling value.
-    pub fn ceil(&self) -> Self {
+    pub const fn ceil(&self) -> Self {
         Self(self.0.ceil())
     }
 
@@ -2728,7 +2728,7 @@ impl Pixels {
     /// # Returns
     ///
     /// A new `Pixels` instance with the absolute value of the original `Pixels`.
-    pub fn abs(&self) -> Self {
+    pub const fn abs(&self) -> Self {
         Self(self.0.abs())
     }
 
@@ -2739,7 +2739,7 @@ impl Pixels {
     /// Returns:
     /// * `1.0` if the value is positive
     /// * `-1.0` if the value is negative
-    pub fn signum(&self) -> f32 {
+    pub const fn signum(&self) -> f32 {
         self.0.signum()
     }
 
@@ -2748,7 +2748,7 @@ impl Pixels {
     /// # Returns
     ///
     /// A f64 value of the `Pixels`.
-    pub fn to_f64(self) -> f64 {
+    pub const fn to_f64(self) -> f64 {
         self.0 as f64
     }
 }
@@ -2883,7 +2883,7 @@ impl DevicePixels {
     /// let total_bytes = pixels.to_bytes(bytes_per_pixel);
     /// assert_eq!(total_bytes, 40); // 10 pixels * 4 bytes/pixel = 40 bytes
     /// ```
-    pub fn to_bytes(self, bytes_per_pixel: u8) -> u32 {
+    pub const fn to_bytes(self, bytes_per_pixel: u8) -> u32 {
         self.0 as u32 * bytes_per_pixel as u32
     }
 }
@@ -2959,7 +2959,7 @@ impl ScaledPixels {
     /// # Returns
     ///
     /// Returns a new `ScaledPixels` instance with the floored value.
-    pub fn floor(&self) -> Self {
+    pub const fn floor(&self) -> Self {
         Self(self.0.floor())
     }
 
@@ -2968,7 +2968,7 @@ impl ScaledPixels {
     /// # Returns
     ///
     /// Returns a new `ScaledPixels` instance with the rounded value.
-    pub fn round(&self) -> Self {
+    pub const fn round(&self) -> Self {
         Self(self.0.round())
     }
 
@@ -2977,7 +2977,7 @@ impl ScaledPixels {
     /// # Returns
     ///
     /// Returns a new `ScaledPixels` instance with the ceiled value.
-    pub fn ceil(&self) -> Self {
+    pub const fn ceil(&self) -> Self {
         Self(self.0.ceil())
     }
 }
@@ -3569,7 +3569,7 @@ pub const fn relative(fraction: f32) -> DefiniteLength {
 }
 
 /// Returns the Golden Ratio, i.e. `~(1.0 + sqrt(5.0)) / 2.0`.
-pub fn phi() -> DefiniteLength {
+pub const fn phi() -> DefiniteLength {
     relative(1.618_034)
 }
 
@@ -3582,7 +3582,7 @@ pub fn phi() -> DefiniteLength {
 /// # Returns
 ///
 /// A `Rems` representing the specified number of rems.
-pub fn rems(rems: f32) -> Rems {
+pub const fn rems(rems: f32) -> Rems {
     Rems(rems)
 }
 
@@ -3610,7 +3610,7 @@ pub const fn px(pixels: f32) -> Pixels {
 /// # Returns
 ///
 /// A `Length` variant set to `Auto`.
-pub fn auto() -> Length {
+pub const fn auto() -> Length {
     Length::Auto
 }
 
  
  
  
    
    @@ -83,7 +83,7 @@ impl<V: 'static> ElementInputHandler<V> {
     /// Used in [`Element::paint`][element_paint] with the element's bounds, a `Window`, and a `App` context.
     ///
     /// [element_paint]: crate::Element::paint
-    pub fn new(element_bounds: Bounds<Pixels>, view: Entity<V>) -> Self {
+    pub const fn new(element_bounds: Bounds<Pixels>, view: Entity<V>) -> Self {
         ElementInputHandler {
             view,
             element_bounds,
  
  
  
    
    @@ -77,7 +77,7 @@ mod conditional {
     }
 
     impl Inspector {
-        pub(crate) fn new() -> Self {
+        pub(crate) const fn new() -> Self {
             Self {
                 active_element: None,
                 pick_depth: Some(0.0),
@@ -143,12 +143,12 @@ mod conditional {
         }
 
         /// Starts element picking mode, allowing the user to select elements by clicking.
-        pub fn start_picking(&mut self) {
+        pub const fn start_picking(&mut self) {
             self.pick_depth = Some(0.0);
         }
 
         /// Returns whether the inspector is currently in picking mode.
-        pub fn is_picking(&self) -> bool {
+        pub const fn is_picking(&self) -> bool {
             self.pick_depth.is_some()
         }
 
  
  
  
    
    @@ -205,7 +205,7 @@ impl ClickEvent {
     ///
     /// `Keyboard`: None
     /// `Mouse`: The position of the mouse when the button was released.
-    pub fn mouse_position(&self) -> Option<Point<Pixels>> {
+    pub const fn mouse_position(&self) -> Option<Point<Pixels>> {
         match self {
             ClickEvent::Keyboard(_) => None,
             ClickEvent::Mouse(event) => Some(event.up.position),
@@ -242,7 +242,7 @@ impl ClickEvent {
     ///
     /// `Keyboard`: false, keyboard clicks only work if an element is already focused
     /// `Mouse`: Whether this was the first focusing click
-    pub fn first_focus(&self) -> bool {
+    pub const fn first_focus(&self) -> bool {
         match self {
             ClickEvent::Keyboard(_) => false,
             ClickEvent::Mouse(event) => event.down.first_mouse,
@@ -253,7 +253,7 @@ impl ClickEvent {
     ///
     /// `Keyboard`: Always 1
     /// `Mouse`: Count of clicks from MouseUpEvent
-    pub fn click_count(&self) -> usize {
+    pub const fn click_count(&self) -> usize {
         match self {
             ClickEvent::Keyboard(_) => 1,
             ClickEvent::Mouse(event) => event.up.click_count,
@@ -261,7 +261,7 @@ impl ClickEvent {
     }
 
     /// Returns whether the click event is generated by a keyboard event
-    pub fn is_keyboard(&self) -> bool {
+    pub const fn is_keyboard(&self) -> bool {
         match self {
             ClickEvent::Mouse(_) => false,
             ClickEvent::Keyboard(_) => true,
@@ -407,7 +407,7 @@ impl Default for ScrollDelta {
 
 impl ScrollDelta {
     /// Returns true if this is a precise scroll delta in pixels.
-    pub fn precise(&self) -> bool {
+    pub const fn precise(&self) -> bool {
         match self {
             ScrollDelta::Pixels(_) => true,
             ScrollDelta::Lines(_) => false,
  
  
  
    
    @@ -107,7 +107,7 @@ impl ReusedSubtree {
         DispatchNodeId((node_id.0 - self.old_range.start) + self.new_range.start)
     }
 
-    pub fn contains_focus(&self) -> bool {
+    pub const fn contains_focus(&self) -> bool {
         self.contains_focus
     }
 }
@@ -158,7 +158,7 @@ impl DispatchTree {
         self.view_node_ids.clear();
     }
 
-    pub fn len(&self) -> usize {
+    pub const fn len(&self) -> usize {
         self.nodes.len()
     }
 
  
  
  
    
    @@ -36,7 +36,7 @@ impl Keymap {
     }
 
     /// Get the current version of the keymap.
-    pub fn version(&self) -> KeymapVersion {
+    pub const fn version(&self) -> KeymapVersion {
         self.version
     }
 
  
  
  
    
    @@ -75,13 +75,13 @@ impl KeyBinding {
     }
 
     /// Set the metadata for this binding.
-    pub fn with_meta(mut self, meta: KeyBindingMetaIndex) -> Self {
+    pub const fn with_meta(mut self, meta: KeyBindingMetaIndex) -> Self {
         self.meta = Some(meta);
         self
     }
 
     /// Set the metadata for this binding.
-    pub fn set_meta(&mut self, meta: KeyBindingMetaIndex) {
+    pub const fn set_meta(&mut self, meta: KeyBindingMetaIndex) {
         self.meta = Some(meta);
     }
 
@@ -116,7 +116,7 @@ impl KeyBinding {
     }
 
     /// Get the metadata for this binding
-    pub fn meta(&self) -> Option<KeyBindingMetaIndex> {
+    pub const fn meta(&self) -> Option<KeyBindingMetaIndex> {
         self.meta
     }
 
  
  
  
    
    @@ -95,7 +95,7 @@ impl KeyContext {
     }
 
     /// Check if this context is empty.
-    pub fn is_empty(&self) -> bool {
+    pub const fn is_empty(&self) -> bool {
         self.0.is_empty()
     }
 
@@ -448,7 +448,7 @@ fn is_identifier_char(c: char) -> bool {
     c.is_alphanumeric() || c == '_' || c == '-'
 }
 
-fn is_vim_operator_char(c: char) -> bool {
+const fn is_vim_operator_char(c: char) -> bool {
     c == '>' || c == '<' || c == '~' || c == '"' || c == '?'
 }
 
  
  
  
    
    @@ -202,7 +202,7 @@ impl PathBuilder {
 
     /// Applies a transform to the path.
     #[inline]
-    pub fn transform(&mut self, transform: Transform) {
+    pub const fn transform(&mut self, transform: Transform) {
         self.transform = Some(transform);
     }
 
  
  
  
    
    @@ -432,7 +432,7 @@ pub struct Tiling {
 
 impl Tiling {
     /// Initializes a [`Tiling`] type with all sides tiled
-    pub fn tiled() -> Self {
+    pub const fn tiled() -> Self {
         Self {
             top: true,
             left: true,
@@ -442,7 +442,7 @@ impl Tiling {
     }
 
     /// Whether any edge is tiled
-    pub fn is_tiled(&self) -> bool {
+    pub const fn is_tiled(&self) -> bool {
         self.top || self.left || self.right || self.bottom
     }
 }
@@ -592,7 +592,7 @@ pub(crate) struct NoopTextSystem;
 
 impl NoopTextSystem {
     #[allow(dead_code)]
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         Self
     }
 }
@@ -723,7 +723,7 @@ impl AtlasKey {
         ),
         allow(dead_code)
     )]
-    pub(crate) fn texture_kind(&self) -> AtlasTextureKind {
+    pub(crate) const fn texture_kind(&self) -> AtlasTextureKind {
         match self {
             AtlasKey::Glyph(params) => {
                 if params.is_emoji {
@@ -1201,7 +1201,7 @@ impl Default for WindowBounds {
 
 impl WindowBounds {
     /// Retrieve the inner bounds
-    pub fn get_bounds(&self) -> Bounds<Pixels> {
+    pub const fn get_bounds(&self) -> Bounds<Pixels> {
         match self {
             WindowBounds::Windowed(bounds) => *bounds,
             WindowBounds::Maximized(bounds) => *bounds,
@@ -1376,12 +1376,12 @@ impl PromptButton {
     }
 
     #[allow(dead_code)]
-    pub(crate) fn is_cancel(&self) -> bool {
+    pub(crate) const fn is_cancel(&self) -> bool {
         matches!(self, PromptButton::Cancel(_))
     }
 
     /// Returns the label of the button
-    pub fn label(&self) -> &SharedString {
+    pub const fn label(&self) -> &SharedString {
         match self {
             PromptButton::Ok(label) => label,
             PromptButton::Cancel(label) => label,
@@ -1705,7 +1705,7 @@ impl Image {
     }
 
     /// Get this image's ID
-    pub fn id(&self) -> u64 {
+    pub const fn id(&self) -> u64 {
         self.id
     }
 
@@ -1788,12 +1788,12 @@ impl Image {
     }
 
     /// Get the format of the clipboard image
-    pub fn format(&self) -> ImageFormat {
+    pub const fn format(&self) -> ImageFormat {
         self.format
     }
 
     /// Get the raw bytes of the clipboard image
-    pub fn bytes(&self) -> &[u8] {
+    pub const fn bytes(&self) -> &[u8] {
         self.bytes.as_slice()
     }
 }
@@ -1807,7 +1807,7 @@ pub struct ClipboardString {
 
 impl ClipboardString {
     /// Create a new clipboard string with the given text
-    pub fn new(text: String) -> Self {
+    pub const fn new(text: String) -> Self {
         Self {
             text,
             metadata: None,
@@ -1822,7 +1822,7 @@ impl ClipboardString {
     }
 
     /// Get the text of the clipboard string
-    pub fn text(&self) -> &String {
+    pub const fn text(&self) -> &String {
         &self.text
     }
 
  
  
  
    
    @@ -75,12 +75,12 @@ pub enum MenuItem {
 
 impl MenuItem {
     /// Creates a new menu item that is a separator
-    pub fn separator() -> Self {
+    pub const fn separator() -> Self {
         Self::Separator
     }
 
     /// Creates a new menu item that is a submenu
-    pub fn submenu(menu: Menu) -> Self {
+    pub const fn submenu(menu: Menu) -> Self {
         Self::Submenu(menu)
     }
 
  
  
  
    
    @@ -283,7 +283,7 @@ impl KeybindingKeystroke {
     }
 
     /// Create a new keybinding keystroke from the given keystroke, without any platform-specific mapping.
-    pub fn from_keystroke(keystroke: Keystroke) -> Self {
+    pub const fn from_keystroke(keystroke: Keystroke) -> Self {
         #[cfg(target_os = "windows")]
         {
             let key = keystroke.key.clone();
@@ -301,7 +301,7 @@ impl KeybindingKeystroke {
     }
 
     /// Returns the GPUI representation of the keystroke.
-    pub fn inner(&self) -> &Keystroke {
+    pub const fn inner(&self) -> &Keystroke {
         &self.inner
     }
 
@@ -311,7 +311,7 @@ impl KeybindingKeystroke {
     /// - On macOS and Linux, this modifiers is the same as `inner.modifiers`, which is the GPUI representation of the keystroke.
     /// - On Windows, this modifiers is the display modifiers, for example, a `ctrl-@` keystroke will have `inner.modifiers` as
     /// `Modifiers::control()` and `display_modifiers` as `Modifiers::control_shift()`.
-    pub fn modifiers(&self) -> &Modifiers {
+    pub const fn modifiers(&self) -> &Modifiers {
         #[cfg(target_os = "windows")]
         {
             &self.display_modifiers
@@ -339,7 +339,7 @@ impl KeybindingKeystroke {
     }
 
     /// Sets the modifiers. On Windows this modifies both `inner.modifiers` and `display_modifiers`.
-    pub fn set_modifiers(&mut self, modifiers: Modifiers) {
+    pub const fn set_modifiers(&mut self, modifiers: Modifiers) {
         self.inner.modifiers = modifiers;
         #[cfg(target_os = "windows")]
         {
@@ -471,7 +471,7 @@ pub struct Modifiers {
 
 impl Modifiers {
     /// Returns whether any modifier key is pressed.
-    pub fn modified(&self) -> bool {
+    pub const fn modified(&self) -> bool {
         self.control || self.alt || self.shift || self.platform || self.function
     }
 
@@ -479,7 +479,7 @@ impl Modifiers {
     ///
     /// On macOS, this is the command key.
     /// On Linux and Windows, this is the control key.
-    pub fn secondary(&self) -> bool {
+    pub const fn secondary(&self) -> bool {
         #[cfg(target_os = "macos")]
         {
             self.platform
@@ -492,7 +492,7 @@ impl Modifiers {
     }
 
     /// Returns how many modifier keys are pressed.
-    pub fn number_of_modifiers(&self) -> u8 {
+    pub const fn number_of_modifiers(&self) -> u8 {
         self.control as u8
             + self.alt as u8
             + self.shift as u8
  
  
  
    
    @@ -93,18 +93,18 @@ struct NSRange {
 }
 
 impl NSRange {
-    fn invalid() -> Self {
+    const fn invalid() -> Self {
         Self {
             location: NSNotFound as NSUInteger,
             length: 0,
         }
     }
 
-    fn is_valid(&self) -> bool {
+    const fn is_valid(&self) -> bool {
         self.location != NSNotFound as NSUInteger
     }
 
-    fn to_range(self) -> Option<Range<usize>> {
+    const fn to_range(self) -> Option<Range<usize>> {
         if self.is_valid() {
             let start = self.location as usize;
             let end = start + self.length as usize;
  
  
  
    
    @@ -233,11 +233,11 @@ impl MetalAtlasTexture {
         }
     }
 
-    fn decrement_ref_count(&mut self) {
+    const fn decrement_ref_count(&mut self) {
         self.live_atlas_keys -= 1;
     }
 
-    fn is_unreferenced(&mut self) -> bool {
+    const fn is_unreferenced(&mut self) -> bool {
         self.live_atlas_keys == 0
     }
 }
  
  
  
    
    @@ -162,7 +162,7 @@ impl MetalRenderer {
             .new_library_with_data(SHADERS_METALLIB)
             .expect("error building metal library");
 
-        fn to_float2_bits(point: PointF) -> u64 {
+        const fn to_float2_bits(point: PointF) -> u64 {
             let mut output = point.y.to_bits() as u64;
             output <<= 32;
             output |= point.x.to_bits() as u64;
@@ -285,7 +285,7 @@ impl MetalRenderer {
         self.layer.as_ptr()
     }
 
-    pub fn sprite_atlas(&self) -> &Arc<MetalAtlas> {
+    pub const fn sprite_atlas(&self) -> &Arc<MetalAtlas> {
         &self.sprite_atlas
     }
 
@@ -342,11 +342,11 @@ impl MetalRenderer {
         }
     }
 
-    pub fn update_transparency(&self, _transparent: bool) {
+    pub const fn update_transparency(&self, _transparent: bool) {
         // todo(mac)?
     }
 
-    pub fn destroy(&self) {
+    pub const fn destroy(&self) {
         // nothing to do
     }
 
@@ -1291,7 +1291,7 @@ fn build_path_rasterization_pipeline_state(
 }
 
 // Align to multiples of 256 make Metal happy.
-fn align_offset(offset: &mut usize) {
+const fn align_offset(offset: &mut usize) {
     *offset = (*offset).div_ceil(256) * 256;
 }
 
  
  
  
    
    @@ -1650,11 +1650,11 @@ impl UTType {
         Self(unsafe { NSPasteboardTypeTIFF }) // This is a rare case where there's a built-in NSPasteboardType
     }
 
-    fn inner(&self) -> *const Object {
+    const fn inner(&self) -> *const Object {
         self.0
     }
 
-    fn inner_mut(&self) -> *mut Object {
+    const fn inner_mut(&self) -> *mut Object {
         self.0 as *mut _
     }
 }
  
  
  
    
    @@ -304,11 +304,11 @@ unsafe fn build_classes() {
     }
 }
 
-extern "C" fn output_video_effect_did_start_for_stream(_this: &Object, _: Sel, _stream: id) {}
+const extern "C" fn output_video_effect_did_start_for_stream(_this: &Object, _: Sel, _stream: id) {}
 
-extern "C" fn output_video_effect_did_stop_for_stream(_this: &Object, _: Sel, _stream: id) {}
+const extern "C" fn output_video_effect_did_stop_for_stream(_this: &Object, _: Sel, _stream: id) {}
 
-extern "C" fn stream_did_stop_with_error(_this: &Object, _: Sel, _stream: id, _error: id) {}
+const extern "C" fn stream_did_stop_with_error(_this: &Object, _: Sel, _stream: id, _error: id) {}
 
 extern "C" fn stream_did_output_sample_buffer_of_type(
     this: &Object,
  
  
  
    
    @@ -558,7 +558,7 @@ struct StringIndexConverter<'a> {
 }
 
 impl<'a> StringIndexConverter<'a> {
-    fn new(text: &'a str) -> Self {
+    const fn new(text: &'a str) -> Self {
         Self {
             text,
             utf8_ix: 0,
  
  
  
    
    @@ -1602,7 +1602,7 @@ unsafe fn drop_window_state(object: &Object) {
     }
 }
 
-extern "C" fn yes(_: &Object, _: Sel) -> BOOL {
+const extern "C" fn yes(_: &Object, _: Sel) -> BOOL {
     YES
 }
 
  
  
  
    
    @@ -48,7 +48,7 @@ impl Scene {
         self.surfaces.clear();
     }
 
-    pub fn len(&self) -> usize {
+    pub const fn len(&self) -> usize {
         self.paint_operations.len()
     }
 
@@ -207,7 +207,7 @@ pub(crate) enum Primitive {
 }
 
 impl Primitive {
-    pub fn bounds(&self) -> &Bounds<ScaledPixels> {
+    pub const fn bounds(&self) -> &Bounds<ScaledPixels> {
         match self {
             Primitive::Shadow(shadow) => &shadow.bounds,
             Primitive::Quad(quad) => &quad.bounds,
@@ -219,7 +219,7 @@ impl Primitive {
         }
     }
 
-    pub fn content_mask(&self) -> &ContentMask<ScaledPixels> {
+    pub const fn content_mask(&self) -> &ContentMask<ScaledPixels> {
         match self {
             Primitive::Shadow(shadow) => &shadow.content_mask,
             Primitive::Quad(quad) => &quad.content_mask,
@@ -528,7 +528,7 @@ impl Eq for TransformationMatrix {}
 
 impl TransformationMatrix {
     /// The unit matrix, has no effect.
-    pub fn unit() -> Self {
+    pub const fn unit() -> Self {
         Self {
             rotation_scale: [[1.0, 0.0], [0.0, 1.0]],
             translation: [0.0, 0.0],
@@ -724,7 +724,7 @@ impl Path<Pixels> {
     }
 
     /// Move the start, current point to the given point.
-    pub fn move_to(&mut self, to: Point<Pixels>) {
+    pub const fn move_to(&mut self, to: Point<Pixels>) {
         self.contour_count += 1;
         self.start = to;
         self.current = to;
  
  
  
    
    @@ -819,7 +819,7 @@ impl Fill {
     /// Unwrap this fill into a solid color, if it is one.
     ///
     /// If the fill is not a solid color, this method returns `None`.
-    pub fn color(&self) -> Option<Background> {
+    pub const fn color(&self) -> Option<Background> {
         match self {
             Fill::Color(color) => Some(*color),
         }
  
  
  
    
    @@ -23,7 +23,7 @@ pub enum TabStopOperation {
 }
 
 impl TabStopOperation {
-    fn focus_handle(&self) -> Option<&FocusHandle> {
+    const fn focus_handle(&self) -> Option<&FocusHandle> {
         match self {
             TabStopOperation::Insert(focus_handle) => Some(focus_handle),
             _ => None,
@@ -192,7 +192,7 @@ impl TabStopMap {
         }
     }
 
-    pub fn paint_index(&self) -> usize {
+    pub const fn paint_index(&self) -> usize {
         self.insertion_history.len()
     }
 
  
  
  
    
    @@ -818,13 +818,13 @@ pub fn font(family: impl Into<SharedString>) -> Font {
 
 impl Font {
     /// Set this Font to be bold
-    pub fn bold(mut self) -> Self {
+    pub const fn bold(mut self) -> Self {
         self.weight = FontWeight::BOLD;
         self
     }
 
     /// Set this Font to be italic
-    pub fn italic(mut self) -> Self {
+    pub const fn italic(mut self) -> Self {
         self.style = FontStyle::Italic;
         self
     }
  
  
  
    
    @@ -165,7 +165,7 @@ impl LineWrapper {
 
     /// Any character in this list should be treated as a word character,
     /// meaning it can be part of a word that should not be wrapped.
-    pub(crate) fn is_word_char(c: char) -> bool {
+    pub(crate) const fn is_word_char(c: char) -> bool {
         // ASCII alphanumeric characters, for English, numbers: `Hello123`, etc.
         c.is_ascii_alphanumeric() ||
         // Latin script in Unicode for French, German, Spanish, etc.
@@ -255,12 +255,12 @@ pub enum LineFragment<'a> {
 
 impl<'a> LineFragment<'a> {
     /// Creates a new text fragment from the given text.
-    pub fn text(text: &'a str) -> Self {
+    pub const fn text(text: &'a str) -> Self {
         LineFragment::Text { text }
     }
 
     /// Creates a new non-text element with the given width and UTF-8 encoded length.
-    pub fn element(width: Pixels, len_utf8: usize) -> Self {
+    pub const fn element(width: Pixels, len_utf8: usize) -> Self {
         LineFragment::Element { width, len_utf8 }
     }
 
@@ -288,7 +288,7 @@ enum WrapBoundaryCandidate {
 }
 
 impl WrapBoundaryCandidate {
-    pub fn len_utf8(&self) -> usize {
+    pub const fn len_utf8(&self) -> usize {
         match self {
             WrapBoundaryCandidate::Char { character } => character.len_utf8(),
             WrapBoundaryCandidate::Element { len_utf8: len, .. } => *len,
@@ -306,7 +306,7 @@ pub struct Boundary {
 }
 
 impl Boundary {
-    fn new(ix: usize, next_indent: u32) -> Self {
+    const fn new(ix: usize, next_indent: u32) -> Self {
         Self { ix, next_indent }
     }
 }
  
  
  
    
    @@ -127,12 +127,12 @@ impl AnyView {
     }
 
     /// Gets the [TypeId] of the underlying view.
-    pub fn entity_type(&self) -> TypeId {
+    pub const fn entity_type(&self) -> TypeId {
         self.entity.entity_type
     }
 
     /// Gets the entity id of this handle.
-    pub fn entity_id(&self) -> EntityId {
+    pub const fn entity_id(&self) -> EntityId {
         self.entity.entity_id()
     }
 }
  
  
  
    
    @@ -515,7 +515,7 @@ impl HitboxId {
         window.mouse_hit_test.ids.contains(&self)
     }
 
-    fn next(mut self) -> HitboxId {
+    const fn next(mut self) -> HitboxId {
         HitboxId(self.0.wrapping_add(1))
     }
 }
@@ -1359,7 +1359,7 @@ impl Window {
     }
 
     /// Obtain a handle to the window that belongs to this context.
-    pub fn window_handle(&self) -> AnyWindowHandle {
+    pub const fn window_handle(&self) -> AnyWindowHandle {
         self.handle
     }
 
@@ -1372,7 +1372,7 @@ impl Window {
     }
 
     /// Close this window.
-    pub fn remove_window(&mut self) {
+    pub const fn remove_window(&mut self) {
         self.removed = true;
     }
 
@@ -1432,7 +1432,7 @@ impl Window {
     }
 
     /// Accessor for the text system.
-    pub fn text_system(&self) -> &Arc<WindowTextSystem> {
+    pub const fn text_system(&self) -> &Arc<WindowTextSystem> {
         &self.text_system
     }
 
@@ -1708,12 +1708,12 @@ impl Window {
     }
 
     /// Returns the appearance of the current window.
-    pub fn appearance(&self) -> WindowAppearance {
+    pub const fn appearance(&self) -> WindowAppearance {
         self.appearance
     }
 
     /// Returns the size of the drawable area within the window.
-    pub fn viewport_size(&self) -> Size<Pixels> {
+    pub const fn viewport_size(&self) -> Size<Pixels> {
         self.viewport_size
     }
 
@@ -1761,7 +1761,7 @@ impl Window {
     }
 
     /// Returns the client_inset value by [`Self::set_client_inset`].
-    pub fn client_inset(&self) -> Option<Pixels> {
+    pub const fn client_inset(&self) -> Option<Pixels> {
         self.client_inset
     }
 
@@ -1812,7 +1812,7 @@ impl Window {
     /// The scale factor of the display associated with the window. For example, it could
     /// return 2.0 for a "retina" display, indicating that each logical pixel should actually
     /// be rendered as two pixels on screen.
-    pub fn scale_factor(&self) -> f32 {
+    pub const fn scale_factor(&self) -> f32 {
         self.scale_factor
     }
 
@@ -1871,12 +1871,12 @@ impl Window {
 
     /// Call to prevent the default action of an event. Currently only used to prevent
     /// parent elements from becoming focused on mouse down.
-    pub fn prevent_default(&mut self) {
+    pub const fn prevent_default(&mut self) {
         self.default_prevented = true;
     }
 
     /// Obtain whether default has been prevented for the event currently being dispatched.
-    pub fn default_prevented(&self) -> bool {
+    pub const fn default_prevented(&self) -> bool {
         self.default_prevented
     }
 
@@ -1890,17 +1890,17 @@ impl Window {
     }
 
     /// The position of the mouse relative to the window.
-    pub fn mouse_position(&self) -> Point<Pixels> {
+    pub const fn mouse_position(&self) -> Point<Pixels> {
         self.mouse_position
     }
 
     /// The current state of the keyboard's modifiers
-    pub fn modifiers(&self) -> Modifiers {
+    pub const fn modifiers(&self) -> Modifiers {
         self.modifiers
     }
 
     /// The current state of the keyboard's capslock
-    pub fn capslock(&self) -> Capslock {
+    pub const fn capslock(&self) -> Capslock {
         self.capslock
     }
 
@@ -3927,7 +3927,7 @@ impl Window {
     }
 
     /// Determine whether a potential multi-stroke key binding is in progress on this window.
-    pub fn has_pending_keystrokes(&self) -> bool {
+    pub const fn has_pending_keystrokes(&self) -> bool {
         self.pending_input.is_some()
     }
 
@@ -4795,7 +4795,7 @@ pub struct AnyWindowHandle {
 
 impl AnyWindowHandle {
     /// Get the ID of this window.
-    pub fn window_id(&self) -> WindowId {
+    pub const fn window_id(&self) -> WindowId {
         self.id
     }
 
  
  
  
    
    @@ -26,7 +26,7 @@ pub struct PromptHandle {
 }
 
 impl PromptHandle {
-    pub(crate) fn new(sender: oneshot::Sender<usize>) -> Self {
+    pub(crate) const fn new(sender: oneshot::Sender<usize>) -> Self {
         Self { sender }
     }
 
  
  
  
    
    @@ -28,7 +28,7 @@ pub struct HtmlElement {
 }
 
 impl HtmlElement {
-    pub fn new(tag: String, attrs: RefCell<Vec<Attribute>>) -> Self {
+    pub const fn new(tag: String, attrs: RefCell<Vec<Attribute>>) -> Self {
         Self { tag, attrs }
     }
 
  
  
  
    
    @@ -122,7 +122,7 @@ pub struct TableHandler {
 }
 
 impl TableHandler {
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         Self {
             current_table_columns: 0,
             is_first_th: true,
  
  
  
    
    @@ -38,14 +38,14 @@ impl Default for MarkdownWriter {
 }
 
 impl MarkdownWriter {
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         Self {
             current_element_stack: VecDeque::new(),
             markdown: String::new(),
         }
     }
 
-    pub fn current_element_stack(&self) -> &VecDeque<HtmlElement> {
+    pub const fn current_element_stack(&self) -> &VecDeque<HtmlElement> {
         &self.current_element_stack
     }
 
  
  
  
    
    @@ -67,7 +67,7 @@ pub struct WikipediaCodeHandler {
 }
 
 impl WikipediaCodeHandler {
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         Self { language: None }
     }
 }
  
  
  
    
    @@ -28,7 +28,7 @@ impl AsyncBody {
     ///
     /// An empty body represents the *absence* of a body, which is semantically
     /// different than the presence of a body of zero length.
-    pub fn empty() -> Self {
+    pub const fn empty() -> Self {
         Self(Inner::Empty)
     }
     /// Create a streaming body that reads from the given reader.
@@ -39,7 +39,7 @@ impl AsyncBody {
         Self(Inner::AsyncReader(Box::pin(read)))
     }
 
-    pub fn from_bytes(bytes: Bytes) -> Self {
+    pub const fn from_bytes(bytes: Bytes) -> Self {
         Self(Inner::Bytes(Cursor::new(bytes)))
     }
 }
  
  
  
    
    @@ -346,7 +346,7 @@ pub fn read_no_proxy_from_env() -> Option<String> {
 pub struct BlockedHttpClient;
 
 impl BlockedHttpClient {
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         BlockedHttpClient
     }
 }
  
  
  
    
    @@ -14,7 +14,7 @@ pub struct ImageInfo {
 }
 
 impl ImageInfo {
-    pub fn new(_workspace: &Workspace) -> Self {
+    pub const fn new(_workspace: &Workspace) -> Self {
         Self {
             metadata: None,
             _observe_active_image: None,
  
  
  
    
    @@ -115,7 +115,7 @@ pub struct KeymapEventChannel {}
 impl Global for KeymapEventChannel {}
 
 impl KeymapEventChannel {
-    fn new() -> Self {
+    const fn new() -> Self {
         Self {}
     }
 
@@ -140,14 +140,14 @@ enum SearchMode {
 }
 
 impl SearchMode {
-    fn invert(&self) -> Self {
+    const fn invert(&self) -> Self {
         match self {
             SearchMode::Normal => SearchMode::KeyStroke { exact_match: false },
             SearchMode::KeyStroke { .. } => SearchMode::Normal,
         }
     }
 
-    fn exact_match(&self) -> bool {
+    const fn exact_match(&self) -> bool {
         match self {
             SearchMode::Normal => false,
             SearchMode::KeyStroke { exact_match } => *exact_match,
@@ -163,7 +163,7 @@ enum FilterState {
 }
 
 impl FilterState {
-    fn invert(&self) -> Self {
+    const fn invert(&self) -> Self {
         match self {
             FilterState::All => FilterState::Conflicts,
             FilterState::Conflicts => FilterState::All,
@@ -191,7 +191,7 @@ struct ConflictOrigin {
 }
 
 impl ConflictOrigin {
-    fn new(source: KeybindSource, index: usize) -> Self {
+    const fn new(source: KeybindSource, index: usize) -> Self {
         Self {
             override_source: source,
             index,
@@ -199,7 +199,7 @@ impl ConflictOrigin {
         }
     }
 
-    fn with_overridden_source(self, source: KeybindSource) -> Self {
+    const fn with_overridden_source(self, source: KeybindSource) -> Self {
         Self {
             overridden_source: Some(source),
             ..self
@@ -347,7 +347,7 @@ impl ConflictState {
             .is_some_and(|conflict| conflict.is_user_keybind_conflict())
     }
 
-    fn any_user_binding_conflicts(&self) -> bool {
+    const fn any_user_binding_conflicts(&self) -> bool {
         self.has_user_conflicts
     }
 }
@@ -959,7 +959,7 @@ impl KeymapEditor {
         cx.notify();
     }
 
-    fn context_menu_deployed(&self) -> bool {
+    const fn context_menu_deployed(&self) -> bool {
         self.context_menu.is_some()
     }
 
@@ -1417,7 +1417,7 @@ impl ProcessedBinding {
         )
     }
 
-    fn is_unbound(&self) -> bool {
+    const fn is_unbound(&self) -> bool {
         matches!(self, Self::Unmapped(_))
     }
 
@@ -1431,7 +1431,7 @@ impl ProcessedBinding {
             .map(|binding| binding.keystrokes.as_slice())
     }
 
-    fn keybind_information(&self) -> Option<&KeybindInformation> {
+    const fn keybind_information(&self) -> Option<&KeybindInformation> {
         match self {
             Self::Mapped(keybind_information, _) => Some(keybind_information),
             Self::Unmapped(_) => None,
@@ -1456,7 +1456,7 @@ impl ProcessedBinding {
             .map(|binding| &binding.keystroke_text)
     }
 
-    fn action(&self) -> &ActionInformation {
+    const fn action(&self) -> &ActionInformation {
         match self {
             Self::Mapped(_, action) | Self::Unmapped(action) => action,
         }
@@ -1488,7 +1488,7 @@ enum KeybindContextString {
 impl KeybindContextString {
     const GLOBAL: SharedString = SharedString::new_static("<global>");
 
-    pub fn local(&self) -> Option<&SharedString> {
+    pub const fn local(&self) -> Option<&SharedString> {
         match self {
             KeybindContextString::Global => None,
             KeybindContextString::Local(name, _) => Some(name),
  
  
  
    
    @@ -102,7 +102,7 @@ impl KeystrokeInput {
         self.keystrokes_changed(cx);
     }
 
-    pub fn set_search(&mut self, search: bool) {
+    pub const fn set_search(&mut self, search: bool) {
         self.search = search;
     }
 
  
  
  
    
    @@ -389,7 +389,7 @@ pub enum DiskState {
 
 impl DiskState {
     /// Returns the file's last known modification time on disk.
-    pub fn mtime(self) -> Option<MTime> {
+    pub const fn mtime(self) -> Option<MTime> {
         match self {
             DiskState::New => None,
             DiskState::Present { mtime } => Some(mtime),
@@ -397,7 +397,7 @@ impl DiskState {
         }
     }
 
-    pub fn exists(&self) -> bool {
+    pub const fn exists(&self) -> bool {
         match self {
             DiskState::New => false,
             DiskState::Present { .. } => true,
@@ -954,7 +954,7 @@ impl Buffer {
     }
 
     /// Returns the [`Capability`] of this buffer.
-    pub fn capability(&self) -> Capability {
+    pub const fn capability(&self) -> Capability {
         self.capability
     }
 
@@ -1252,12 +1252,12 @@ impl Buffer {
     }
 
     /// The version of the buffer that was last saved or reloaded from disk.
-    pub fn saved_version(&self) -> &clock::Global {
+    pub const fn saved_version(&self) -> &clock::Global {
         &self.saved_version
     }
 
     /// The mtime of the buffer's file when the buffer was last saved or reloaded from disk.
-    pub fn saved_mtime(&self) -> Option<MTime> {
+    pub const fn saved_mtime(&self) -> Option<MTime> {
         self.saved_mtime
     }
 
@@ -1423,7 +1423,7 @@ impl Buffer {
     }
 
     /// Returns the primary [`Language`] assigned to this [`Buffer`].
-    pub fn language(&self) -> Option<&Arc<Language>> {
+    pub const fn language(&self) -> Option<&Arc<Language>> {
         self.language.as_ref()
     }
 
@@ -1479,7 +1479,7 @@ impl Buffer {
 
     /// An integer version number that accounts for all updates besides
     /// the buffer's text itself (which is versioned via a version vector).
-    pub fn non_text_state_update_count(&self) -> usize {
+    pub const fn non_text_state_update_count(&self) -> usize {
         self.non_text_state_update_count
     }
 
@@ -2859,7 +2859,7 @@ impl Buffer {
 
     /// Returns a list of strings which trigger a completion menu for this language.
     /// Usually this is driven by LSP server which returns a list of trigger characters for completions.
-    pub fn completion_triggers(&self) -> &BTreeSet<String> {
+    pub const fn completion_triggers(&self) -> &BTreeSet<String> {
         &self.completion_triggers
     }
 
@@ -3380,7 +3380,7 @@ impl BufferSnapshot {
     }
 
     /// Returns the main [`Language`].
-    pub fn language(&self) -> Option<&Arc<Language>> {
+    pub const fn language(&self) -> Option<&Arc<Language>> {
         self.language.as_ref()
     }
 
@@ -4564,7 +4564,7 @@ impl BufferSnapshot {
 
     /// Raw access to the diagnostic sets. Typically `diagnostic_groups` or `diagnostic_group`
     /// should be used instead.
-    pub fn diagnostic_sets(&self) -> &SmallVec<[(LanguageServerId, DiagnosticSet); 2]> {
+    pub const fn diagnostic_sets(&self) -> &SmallVec<[(LanguageServerId, DiagnosticSet); 2]> {
         &self.diagnostics
     }
 
@@ -4616,12 +4616,12 @@ impl BufferSnapshot {
 
     /// An integer version number that accounts for all updates besides
     /// the buffer's text itself (which is versioned via a version vector).
-    pub fn non_text_state_update_count(&self) -> usize {
+    pub const fn non_text_state_update_count(&self) -> usize {
         self.non_text_state_update_count
     }
 
     /// An integer version that changes when the buffer's syntax changes.
-    pub fn syntax_update_count(&self) -> usize {
+    pub const fn syntax_update_count(&self) -> usize {
         self.syntax.update_count()
     }
 
@@ -4866,7 +4866,7 @@ impl<'a> BufferChunks<'a> {
     }
 
     /// The current byte offset in the buffer.
-    pub fn offset(&self) -> usize {
+    pub const fn offset(&self) -> usize {
         self.range.start
     }
 
@@ -4874,7 +4874,7 @@ impl<'a> BufferChunks<'a> {
         self.range.clone()
     }
 
-    fn update_diagnostic_depths(&mut self, endpoint: DiagnosticEndpoint) {
+    const fn update_diagnostic_depths(&mut self, endpoint: DiagnosticEndpoint) {
         let depth = match endpoint.severity {
             DiagnosticSeverity::ERROR => &mut self.error_depth,
             DiagnosticSeverity::WARNING => &mut self.warning_depth,
@@ -4897,7 +4897,7 @@ impl<'a> BufferChunks<'a> {
         }
     }
 
-    fn current_diagnostic_severity(&self) -> Option<DiagnosticSeverity> {
+    const fn current_diagnostic_severity(&self) -> Option<DiagnosticSeverity> {
         if self.error_depth > 0 {
             Some(DiagnosticSeverity::ERROR)
         } else if self.warning_depth > 0 {
@@ -4911,7 +4911,7 @@ impl<'a> BufferChunks<'a> {
         }
     }
 
-    fn current_code_is_unnecessary(&self) -> bool {
+    const fn current_code_is_unnecessary(&self) -> bool {
         self.unnecessary_depth > 0
     }
 }
@@ -5061,7 +5061,7 @@ impl Default for Diagnostic {
 
 impl IndentSize {
     /// Returns an [`IndentSize`] representing the given spaces.
-    pub fn spaces(len: u32) -> Self {
+    pub const fn spaces(len: u32) -> Self {
         Self {
             len,
             kind: IndentKind::Space,
@@ -5069,7 +5069,7 @@ impl IndentSize {
     }
 
     /// Returns an [`IndentSize`] representing a tab.
-    pub fn tab() -> Self {
+    pub const fn tab() -> Self {
         Self {
             len: 1,
             kind: IndentKind::Tab,
@@ -5082,7 +5082,7 @@ impl IndentSize {
     }
 
     /// The character representation of this [`IndentSize`].
-    pub fn char(&self) -> char {
+    pub const fn char(&self) -> char {
         match self.kind {
             IndentKind::Space => ' ',
             IndentKind::Tab => '\t',
@@ -5110,7 +5110,7 @@ impl IndentSize {
         self
     }
 
-    pub fn len_with_expanded_tabs(&self, tab_size: NonZeroU32) -> usize {
+    pub const fn len_with_expanded_tabs(&self, tab_size: NonZeroU32) -> usize {
         match self.kind {
             IndentKind::Space => self.len as usize,
             IndentKind::Tab => self.len as usize * tab_size.get() as usize,
@@ -5222,7 +5222,7 @@ pub struct CharClassifier {
 }
 
 impl CharClassifier {
-    pub fn new(scope: Option<LanguageScope>) -> Self {
+    pub const fn new(scope: Option<LanguageScope>) -> Self {
         Self {
             scope,
             scope_context: None,
  
  
  
    
    @@ -951,7 +951,7 @@ impl<T> Default for Override<T> {
 }
 
 impl<T> Override<T> {
-    fn as_option<'a>(this: Option<&'a Self>, original: Option<&'a T>) -> Option<&'a T> {
+    const fn as_option<'a>(this: Option<&'a Self>, original: Option<&'a T>) -> Option<&'a T> {
         match this {
             Some(Self::Set(value)) => Some(value),
             Some(Self::Remove { remove: true }) => None,
@@ -1010,7 +1010,7 @@ pub struct WrapCharactersConfig {
     pub end_suffix: String,
 }
 
-fn auto_indent_using_last_non_empty_line_default() -> bool {
+const fn auto_indent_using_last_non_empty_line_default() -> bool {
     true
 }
 
@@ -1251,7 +1251,7 @@ impl TextObject {
         }
     }
 
-    pub fn around(&self) -> Option<Self> {
+    pub const fn around(&self) -> Option<Self> {
         match self {
             TextObject::InsideFunction => Some(TextObject::AroundFunction),
             TextObject::InsideClass => Some(TextObject::AroundClass),
@@ -1352,7 +1352,7 @@ impl Language {
         Self::new_with_id(LanguageId::new(), config, ts_language)
     }
 
-    pub fn id(&self) -> LanguageId {
+    pub const fn id(&self) -> LanguageId {
         self.id
     }
 
@@ -1929,7 +1929,7 @@ impl Language {
     pub fn name(&self) -> LanguageName {
         self.config.name.clone()
     }
-    pub fn manifest(&self) -> Option<&ManifestName> {
+    pub const fn manifest(&self) -> Option<&ManifestName> {
         self.manifest_name.as_ref()
     }
 
@@ -1997,7 +1997,7 @@ impl Language {
         }
     }
 
-    pub fn grammar(&self) -> Option<&Arc<Grammar>> {
+    pub const fn grammar(&self) -> Option<&Arc<Grammar>> {
         self.grammar.as_ref()
     }
 
@@ -2016,7 +2016,7 @@ impl Language {
         self.config.prettier_parser_name.as_deref()
     }
 
-    pub fn config(&self) -> &LanguageConfig {
+    pub const fn config(&self) -> &LanguageConfig {
         &self.config
     }
 }
@@ -2188,7 +2188,7 @@ impl Debug for Language {
 }
 
 impl Grammar {
-    pub fn id(&self) -> GrammarId {
+    pub const fn id(&self) -> GrammarId {
         self.id
     }
 
@@ -2224,11 +2224,11 @@ impl Grammar {
         Some(self.highlight_map.lock().get(capture_id))
     }
 
-    pub fn debug_variables_config(&self) -> Option<&DebugVariablesConfig> {
+    pub const fn debug_variables_config(&self) -> Option<&DebugVariablesConfig> {
         self.debug_variables_config.as_ref()
     }
 
-    pub fn imports_config(&self) -> Option<&ImportsConfig> {
+    pub const fn imports_config(&self) -> Option<&ImportsConfig> {
         self.imports_config.as_ref()
     }
 }
@@ -2357,7 +2357,7 @@ impl CodeLabel {
         }
     }
 
-    pub fn text(&self) -> &str {
+    pub const fn text(&self) -> &str {
         self.text.as_str()
     }
 
@@ -2568,7 +2568,7 @@ pub fn point_to_lsp(point: PointUtf16) -> lsp::Position {
     lsp::Position::new(point.row, point.column)
 }
 
-pub fn point_from_lsp(point: lsp::Position) -> Unclipped<PointUtf16> {
+pub const fn point_from_lsp(point: lsp::Position) -> Unclipped<PointUtf16> {
     Unclipped(PointUtf16::new(point.line, point.character))
 }
 
  
  
  
    
    @@ -177,11 +177,11 @@ impl AvailableLanguage {
         self.name.clone()
     }
 
-    pub fn matcher(&self) -> &LanguageMatcher {
+    pub const fn matcher(&self) -> &LanguageMatcher {
         &self.matcher
     }
 
-    pub fn hidden(&self) -> bool {
+    pub const fn hidden(&self) -> bool {
         self.hidden
     }
 }
  
  
  
    
    @@ -459,7 +459,7 @@ impl AllLanguageSettings {
     }
 
     /// Returns the edit predictions preview mode for the given language and path.
-    pub fn edit_predictions_mode(&self) -> EditPredictionsMode {
+    pub const fn edit_predictions_mode(&self) -> EditPredictionsMode {
         self.edit_predictions.mode
     }
 }
  
  
  
    
    @@ -14,7 +14,7 @@ pub use proto::{BufferState, File, Operation};
 use super::{point_from_lsp, point_to_lsp};
 
 /// Deserializes a `[text::LineEnding]` from the RPC representation.
-pub fn deserialize_line_ending(message: proto::LineEnding) -> text::LineEnding {
+pub const fn deserialize_line_ending(message: proto::LineEnding) -> text::LineEnding {
     match message {
         proto::LineEnding::Unix => text::LineEnding::Unix,
         proto::LineEnding::Windows => text::LineEnding::Windows,
@@ -22,7 +22,7 @@ pub fn deserialize_line_ending(message: proto::LineEnding) -> text::LineEnding {
 }
 
 /// Serializes a [`text::LineEnding`] to be sent over RPC.
-pub fn serialize_line_ending(message: text::LineEnding) -> proto::LineEnding {
+pub const fn serialize_line_ending(message: text::LineEnding) -> proto::LineEnding {
     match message {
         text::LineEnding::Unix => proto::LineEnding::Unix,
         text::LineEnding::Windows => proto::LineEnding::Windows,
@@ -184,7 +184,7 @@ pub fn serialize_selection(selection: &Selection<Anchor>) -> proto::Selection {
 }
 
 /// Serializes a [`CursorShape`] to be sent over RPC.
-pub fn serialize_cursor_shape(cursor_shape: &CursorShape) -> proto::CursorShape {
+pub const fn serialize_cursor_shape(cursor_shape: &CursorShape) -> proto::CursorShape {
     match cursor_shape {
         CursorShape::Bar => proto::CursorShape::CursorBar,
         CursorShape::Block => proto::CursorShape::CursorBlock,
@@ -194,7 +194,7 @@ pub fn serialize_cursor_shape(cursor_shape: &CursorShape) -> proto::CursorShape
 }
 
 /// Deserializes a [`CursorShape`] from the RPC representation.
-pub fn deserialize_cursor_shape(cursor_shape: proto::CursorShape) -> CursorShape {
+pub const fn deserialize_cursor_shape(cursor_shape: proto::CursorShape) -> CursorShape {
     match cursor_shape {
         proto::CursorShape::CursorBar => CursorShape::Bar,
         proto::CursorShape::CursorBlock => CursorShape::Block,
@@ -557,7 +557,7 @@ pub fn deserialize_transaction(transaction: proto::Transaction) -> Result<Transa
 }
 
 /// Serializes a [`clock::Lamport`] timestamp to be sent over RPC.
-pub fn serialize_timestamp(timestamp: clock::Lamport) -> proto::LamportTimestamp {
+pub const fn serialize_timestamp(timestamp: clock::Lamport) -> proto::LamportTimestamp {
     proto::LamportTimestamp {
         replica_id: timestamp.replica_id as u32,
         value: timestamp.value,
@@ -565,7 +565,7 @@ pub fn serialize_timestamp(timestamp: clock::Lamport) -> proto::LamportTimestamp
 }
 
 /// Deserializes a [`clock::Lamport`] timestamp from the RPC representation.
-pub fn deserialize_timestamp(timestamp: proto::LamportTimestamp) -> clock::Lamport {
+pub const fn deserialize_timestamp(timestamp: proto::LamportTimestamp) -> clock::Lamport {
     clock::Lamport {
         replica_id: timestamp.replica_id as ReplicaId,
         value: timestamp.value,
@@ -573,7 +573,7 @@ pub fn deserialize_timestamp(timestamp: proto::LamportTimestamp) -> clock::Lampo
 }
 
 /// Serializes a range of [`FullOffset`]s to be sent over RPC.
-pub fn serialize_range(range: &Range<FullOffset>) -> proto::Range {
+pub const fn serialize_range(range: &Range<FullOffset>) -> proto::Range {
     proto::Range {
         start: range.start.0 as u64,
         end: range.end.0 as u64,
@@ -581,7 +581,7 @@ pub fn serialize_range(range: &Range<FullOffset>) -> proto::Range {
 }
 
 /// Deserializes a range of [`FullOffset`]s from the RPC representation.
-pub fn deserialize_range(range: proto::Range) -> Range<FullOffset> {
+pub const fn deserialize_range(range: proto::Range) -> Range<FullOffset> {
     FullOffset(range.start as usize)..FullOffset(range.end as usize)
 }
 
  
  
  
    
    @@ -111,7 +111,7 @@ impl SyntaxLayerContent {
         }
     }
 
-    fn tree(&self) -> Option<&Tree> {
+    const fn tree(&self) -> Option<&Tree> {
         match self {
             SyntaxLayerContent::Parsed { tree, .. } => Some(tree),
             SyntaxLayerContent::Pending { .. } => None,
@@ -279,7 +279,7 @@ impl SyntaxSnapshot {
         self.layers.is_empty()
     }
 
-    pub fn update_count(&self) -> usize {
+    pub const fn update_count(&self) -> usize {
         self.update_count
     }
 
@@ -953,7 +953,7 @@ impl SyntaxSnapshot {
         self.layers.summary().contains_unknown_injections
     }
 
-    pub fn language_registry_version(&self) -> usize {
+    pub const fn language_registry_version(&self) -> usize {
         self.language_registry_version
     }
 }
@@ -1086,7 +1086,7 @@ pub struct TreeSitterOptions {
     max_start_depth: Option<u32>,
 }
 impl TreeSitterOptions {
-    pub fn max_start_depth(max_start_depth: u32) -> Self {
+    pub const fn max_start_depth(max_start_depth: u32) -> Self {
         Self {
             max_start_depth: Some(max_start_depth),
         }
  
  
  
    
    @@ -43,7 +43,7 @@ pub enum ToolchainScope {
 }
 
 impl ToolchainScope {
-    pub fn label(&self) -> &'static str {
+    pub const fn label(&self) -> &'static str {
         match self {
             ToolchainScope::Subproject(_, _) => "Subproject",
             ToolchainScope::Project => "Project",
@@ -51,7 +51,7 @@ impl ToolchainScope {
         }
     }
 
-    pub fn description(&self) -> &'static str {
+    pub const fn description(&self) -> &'static str {
         match self {
             ToolchainScope::Subproject(_, _) => {
                 "Available only in the subproject you're currently in."
  
  
  
    
    @@ -440,7 +440,7 @@ pub struct TokenUsage {
 }
 
 impl TokenUsage {
-    pub fn total_tokens(&self) -> u64 {
+    pub const fn total_tokens(&self) -> u64 {
         self.input_tokens
             + self.output_tokens
             + self.cache_read_input_tokens
  
  
  
    
    @@ -145,7 +145,7 @@ impl LanguageModelImage {
         })
     }
 
-    pub fn estimate_tokens(&self) -> usize {
+    pub const fn estimate_tokens(&self) -> usize {
         let width = self.size.width.0.unsigned_abs() as usize;
         let height = self.size.height.0.unsigned_abs() as usize;
 
  
  
  
    
    @@ -19,7 +19,7 @@ impl Role {
         }
     }
 
-    pub fn to_proto(self) -> proto::LanguageModelRole {
+    pub const fn to_proto(self) -> proto::LanguageModelRole {
         match self {
             Role::User => proto::LanguageModelRole::LanguageModelUser,
             Role::Assistant => proto::LanguageModelRole::LanguageModelAssistant,
@@ -27,7 +27,7 @@ impl Role {
         }
     }
 
-    pub fn cycle(self) -> Role {
+    pub const fn cycle(self) -> Role {
         match self {
             Role::User => Role::Assistant,
             Role::Assistant => Role::System,
  
  
  
    
    @@ -35,7 +35,7 @@ pub struct ApiKey {
 }
 
 impl ApiKeyState {
-    pub fn new(url: SharedString) -> Self {
+    pub const fn new(url: SharedString) -> Self {
         Self {
             url,
             load_status: LoadStatus::NotPresent,
@@ -43,11 +43,11 @@ impl ApiKeyState {
         }
     }
 
-    pub fn has_key(&self) -> bool {
+    pub const fn has_key(&self) -> bool {
         matches!(self.load_status, LoadStatus::Loaded { .. })
     }
 
-    pub fn is_from_env_var(&self) -> bool {
+    pub const fn is_from_env_var(&self) -> bool {
         match &self.load_status {
             LoadStatus::Loaded(ApiKey {
                 source: ApiKeySource::EnvVar { .. },
  
  
  
    
    @@ -53,7 +53,7 @@ pub struct State {
 }
 
 impl State {
-    fn is_authenticated(&self) -> bool {
+    const fn is_authenticated(&self) -> bool {
         self.api_key_state.has_key()
     }
 
@@ -798,7 +798,7 @@ struct RawToolUse {
 }
 
 /// Updates usage data by preferring counts from `new`.
-fn update_usage(usage: &mut Usage, new: &Usage) {
+const fn update_usage(usage: &mut Usage, new: &Usage) {
     if let Some(input_tokens) = new.input_tokens {
         usage.input_tokens = Some(input_tokens);
     }
  
  
  
    
    @@ -54,7 +54,7 @@ pub struct State {
 }
 
 impl State {
-    fn is_authenticated(&self) -> bool {
+    const fn is_authenticated(&self) -> bool {
         self.api_key_state.has_key()
     }
 
  
  
  
    
    @@ -75,7 +75,7 @@ static API_KEY_ENV_VAR: LazyLock<EnvVar> = LazyLock::new(|| {
 });
 
 impl State {
-    fn is_authenticated(&self) -> bool {
+    const fn is_authenticated(&self) -> bool {
         self.api_key_state.has_key()
     }
 
@@ -715,7 +715,7 @@ pub fn count_google_tokens(
     .boxed()
 }
 
-fn update_usage(usage: &mut UsageMetadata, new: &UsageMetadata) {
+const fn update_usage(usage: &mut UsageMetadata, new: &UsageMetadata) {
     if let Some(prompt_token_count) = new.prompt_token_count {
         usage.prompt_token_count = Some(prompt_token_count);
     }
  
  
  
    
    @@ -52,7 +52,7 @@ pub struct State {
 }
 
 impl State {
-    fn is_authenticated(&self) -> bool {
+    const fn is_authenticated(&self) -> bool {
         !self.available_models.is_empty()
     }
 
  
  
  
    
    @@ -52,7 +52,7 @@ pub struct State {
 }
 
 impl State {
-    fn is_authenticated(&self) -> bool {
+    const fn is_authenticated(&self) -> bool {
         self.api_key_state.has_key()
     }
 
  
  
  
    
    @@ -59,7 +59,7 @@ pub struct State {
 }
 
 impl State {
-    fn is_authenticated(&self) -> bool {
+    const fn is_authenticated(&self) -> bool {
         !self.fetched_models.is_empty()
     }
 
  
  
  
    
    @@ -49,7 +49,7 @@ pub struct State {
 }
 
 impl State {
-    fn is_authenticated(&self) -> bool {
+    const fn is_authenticated(&self) -> bool {
         self.api_key_state.has_key()
     }
 
  
  
  
    
    @@ -44,7 +44,7 @@ pub struct State {
 }
 
 impl State {
-    fn is_authenticated(&self) -> bool {
+    const fn is_authenticated(&self) -> bool {
         self.api_key_state.has_key()
     }
 
  
  
  
    
    @@ -49,7 +49,7 @@ pub struct State {
 }
 
 impl State {
-    fn is_authenticated(&self) -> bool {
+    const fn is_authenticated(&self) -> bool {
         self.api_key_state.has_key()
     }
 
  
  
  
    
    @@ -44,7 +44,7 @@ pub struct State {
 }
 
 impl State {
-    fn is_authenticated(&self) -> bool {
+    const fn is_authenticated(&self) -> bool {
         self.api_key_state.has_key()
     }
 
  
  
  
    
    @@ -44,7 +44,7 @@ pub struct State {
 }
 
 impl State {
-    fn is_authenticated(&self) -> bool {
+    const fn is_authenticated(&self) -> bool {
         self.api_key_state.has_key()
     }
 
  
  
  
    
    @@ -31,7 +31,7 @@ impl BasedPyrightBanner {
         }
     }
 
-    fn onboarding_banner_enabled(&self) -> bool {
+    const fn onboarding_banner_enabled(&self) -> bool {
         !self.dismissed && self.have_basedpyright
     }
 }
  
  
  
    
    @@ -668,7 +668,7 @@ impl LspLogView {
     }
 }
 
-fn log_type(log_kind: LogKind) -> Option<LogType> {
+const fn log_type(log_kind: LogKind) -> Option<LogType> {
     match log_kind {
         LogKind::Rpc => Some(LogType::Rpc),
         LogKind::Trace => Some(LogType::Trace),
@@ -1275,7 +1275,7 @@ const SERVER_TRACE: &str = "Server Trace";
 const SERVER_INFO: &str = "Server Info";
 
 impl LspLogToolbarItemView {
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         Self {
             log_view: None,
             _log_view_subscription: None,
  
  
  
    
    @@ -594,7 +594,7 @@ impl Default for SyntaxTreeToolbarItemView {
 }
 
 impl SyntaxTreeToolbarItemView {
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         Self {
             tree_view: None,
             subscription: None,
  
  
  
    
    @@ -28,7 +28,7 @@ pub struct CssLspAdapter {
 
 impl CssLspAdapter {
     const PACKAGE_NAME: &str = "vscode-langservers-extracted";
-    pub fn new(node: NodeRuntime) -> Self {
+    pub const fn new(node: NodeRuntime) -> Self {
         CssLspAdapter { node }
     }
 }
  
  
  
    
    @@ -135,7 +135,7 @@ pub struct JsonLspAdapter {
 impl JsonLspAdapter {
     const PACKAGE_NAME: &str = "vscode-langservers-extracted";
 
-    pub fn new(node: NodeRuntime) -> Self {
+    pub const fn new(node: NodeRuntime) -> Self {
         Self { node }
     }
 }
  
  
  
    
    @@ -341,7 +341,7 @@ impl PyrightLspAdapter {
     const SERVER_PATH: &str = "node_modules/pyright/langserver.index.js";
     const NODE_MODULE_RELATIVE_SERVER_PATH: &str = "pyright/langserver.index.js";
 
-    pub fn new(node: NodeRuntime) -> Self {
+    pub const fn new(node: NodeRuntime) -> Self {
         PyrightLspAdapter { node }
     }
 
@@ -905,7 +905,7 @@ fn python_module_name_from_relative_path(relative_path: &str) -> String {
         .to_string()
 }
 
-fn is_python_env_global(k: &PythonEnvironmentKind) -> bool {
+const fn is_python_env_global(k: &PythonEnvironmentKind) -> bool {
     matches!(
         k,
         PythonEnvironmentKind::Homebrew
@@ -920,7 +920,7 @@ fn is_python_env_global(k: &PythonEnvironmentKind) -> bool {
     )
 }
 
-fn python_env_kind_display(k: &PythonEnvironmentKind) -> &'static str {
+const fn python_env_kind_display(k: &PythonEnvironmentKind) -> &'static str {
     match k {
         PythonEnvironmentKind::Conda => "Conda",
         PythonEnvironmentKind::Pixi => "pixi",
@@ -1320,7 +1320,7 @@ pub(crate) struct PyLspAdapter {
 }
 impl PyLspAdapter {
     const SERVER_NAME: LanguageServerName = LanguageServerName::new_static("pylsp");
-    pub(crate) fn new() -> Self {
+    pub(crate) const fn new() -> Self {
         Self {
             python_venv_base: OnceCell::new(),
         }
@@ -1631,7 +1631,7 @@ impl BasedPyrightLspAdapter {
     const SERVER_PATH: &str = "node_modules/basedpyright/langserver.index.js";
     const NODE_MODULE_RELATIVE_SERVER_PATH: &str = "basedpyright/langserver.index.js";
 
-    pub(crate) fn new(node: NodeRuntime) -> Self {
+    pub(crate) const fn new(node: NodeRuntime) -> Self {
         BasedPyrightLspAdapter { node }
     }
 
  
  
  
    
    @@ -35,7 +35,7 @@ impl TailwindLspAdapter {
         LanguageServerName::new_static("tailwindcss-language-server");
     const PACKAGE_NAME: &str = "@tailwindcss/language-server";
 
-    pub fn new(node: NodeRuntime) -> Self {
+    pub const fn new(node: NodeRuntime) -> Self {
         TailwindLspAdapter { node }
     }
 }
  
  
  
    
    @@ -890,7 +890,7 @@ impl EsLintLspAdapter {
         "eslint.config.mts",
     ];
 
-    pub fn new(node: NodeRuntime) -> Self {
+    pub const fn new(node: NodeRuntime) -> Self {
         EsLintLspAdapter { node }
     }
 
  
  
  
    
    @@ -31,7 +31,7 @@ pub struct YamlLspAdapter {
 impl YamlLspAdapter {
     const SERVER_NAME: LanguageServerName = LanguageServerName::new_static("yaml-language-server");
     const PACKAGE_NAME: &str = "yaml-language-server";
-    pub fn new(node: NodeRuntime) -> Self {
+    pub const fn new(node: NodeRuntime) -> Self {
         YamlLspAdapter { node }
     }
 }
  
  
  
    
    @@ -76,11 +76,11 @@ impl Model {
         self.display_name.as_ref().unwrap_or(&self.name)
     }
 
-    pub fn max_token_count(&self) -> u64 {
+    pub const fn max_token_count(&self) -> u64 {
         self.max_tokens
     }
 
-    pub fn supports_tool_calls(&self) -> bool {
+    pub const fn supports_tool_calls(&self) -> bool {
         self.supports_tool_calls
     }
 }
@@ -138,7 +138,7 @@ pub enum MessageContent {
 }
 
 impl MessageContent {
-    pub fn empty() -> Self {
+    pub const fn empty() -> Self {
         MessageContent::Multipart(vec![])
     }
 
  
  
  
    
    @@ -121,11 +121,11 @@ pub enum LanguageServerSelector {
 pub struct LanguageServerId(pub usize);
 
 impl LanguageServerId {
-    pub fn from_proto(id: u64) -> Self {
+    pub const fn from_proto(id: u64) -> Self {
         Self(id as usize)
     }
 
-    pub fn to_proto(self) -> u64 {
+    pub const fn to_proto(self) -> u64 {
         self.0 as u64
     }
 }
@@ -279,7 +279,7 @@ struct LspRequest<F> {
 }
 
 impl<F> LspRequest<F> {
-    pub fn new(id: i32, request: F) -> Self {
+    pub const fn new(id: i32, request: F) -> Self {
         Self { id, request }
     }
 }
@@ -1176,12 +1176,12 @@ impl LanguageServer {
     }
 
     /// Get the id of the running language server.
-    pub fn server_id(&self) -> LanguageServerId {
+    pub const fn server_id(&self) -> LanguageServerId {
         self.server_id
     }
 
     /// Language server's binary information.
-    pub fn binary(&self) -> &LanguageServerBinary {
+    pub const fn binary(&self) -> &LanguageServerBinary {
         &self.binary
     }
 
  
  
  
    
    @@ -204,7 +204,7 @@ impl Markdown {
         this
     }
 
-    pub fn is_parsing(&self) -> bool {
+    pub const fn is_parsing(&self) -> bool {
         self.pending_parse.is_some()
     }
 
@@ -411,7 +411,7 @@ struct Selection {
 }
 
 impl Selection {
-    fn set_head(&mut self, head: usize) {
+    const fn set_head(&mut self, head: usize) {
         if head < self.tail() {
             if !self.reversed {
                 self.end = self.start;
@@ -427,7 +427,7 @@ impl Selection {
         }
     }
 
-    fn tail(&self) -> usize {
+    const fn tail(&self) -> usize {
         if self.reversed { self.end } else { self.start }
     }
 }
@@ -441,11 +441,11 @@ pub struct ParsedMarkdown {
 }
 
 impl ParsedMarkdown {
-    pub fn source(&self) -> &SharedString {
+    pub const fn source(&self) -> &SharedString {
         &self.source
     }
 
-    pub fn events(&self) -> &Arc<[(Range<usize>, MarkdownEvent)]> {
+    pub const fn events(&self) -> &Arc<[(Range<usize>, MarkdownEvent)]> {
         &self.events
     }
 }
  
  
  
    
    @@ -36,7 +36,7 @@ impl ParsedMarkdownElement {
         })
     }
 
-    pub fn is_list_item(&self) -> bool {
+    pub const fn is_list_item(&self) -> bool {
         matches!(self, Self::ListItem(_))
     }
 }
@@ -132,13 +132,13 @@ impl Default for ParsedMarkdownTableRow {
 }
 
 impl ParsedMarkdownTableRow {
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         Self {
             children: Vec::new(),
         }
     }
 
-    pub fn with_children(children: Vec<MarkdownParagraph>) -> Self {
+    pub const fn with_children(children: Vec<MarkdownParagraph>) -> Self {
         Self { children }
     }
 }
@@ -326,11 +326,11 @@ impl Image {
         self.alt_text = Some(alt_text);
     }
 
-    pub fn set_width(&mut self, width: DefiniteLength) {
+    pub const fn set_width(&mut self, width: DefiniteLength) {
         self.width = Some(width);
     }
 
-    pub fn set_height(&mut self, height: DefiniteLength) {
+    pub const fn set_height(&mut self, height: DefiniteLength) {
         self.height = Some(height);
     }
 }
  
  
  
    
    @@ -24,7 +24,7 @@ where
 {
     /// Creates a new `Minifier` instance.
     #[inline]
-    pub fn new(w: &'a mut W, options: MinifierOptions) -> Self {
+    pub const fn new(w: &'a mut W, options: MinifierOptions) -> Self {
         Self {
             w,
             options,
  
  
  
    
    @@ -76,7 +76,7 @@ impl Default for MarkdownListItem {
 }
 
 impl<'a> MarkdownParser<'a> {
-    fn new(
+    const fn new(
         tokens: Vec<(Event<'a>, Range<usize>)>,
         file_location_directory: Option<PathBuf>,
         language_registry: Option<Arc<LanguageRegistry>>,
@@ -90,7 +90,7 @@ impl<'a> MarkdownParser<'a> {
         }
     }
 
-    fn eof(&self) -> bool {
+    const fn eof(&self) -> bool {
         if self.tokens.is_empty() {
             return true;
         }
@@ -119,7 +119,7 @@ impl<'a> MarkdownParser<'a> {
         self.current().map(|(event, _)| event)
     }
 
-    fn is_text_like(event: &Event) -> bool {
+    const fn is_text_like(event: &Event) -> bool {
         match event {
             Event::Text(_)
             // Represent an inline code block
@@ -515,7 +515,7 @@ impl<'a> MarkdownParser<'a> {
         }
     }
 
-    fn convert_alignment(alignment: &Alignment) -> ParsedMarkdownTableAlignment {
+    const fn convert_alignment(alignment: &Alignment) -> ParsedMarkdownTableAlignment {
         match alignment {
             Alignment::None => ParsedMarkdownTableAlignment::None,
             Alignment::Left => ParsedMarkdownTableAlignment::Left,
  
  
  
    
    @@ -36,7 +36,7 @@ impl CheckboxClickedEvent {
         self.source_range.clone()
     }
 
-    pub fn checked(&self) -> bool {
+    pub const fn checked(&self) -> bool {
         self.checked
     }
 }
  
  
  
    
    @@ -7,7 +7,7 @@ use gpui::actions;
 // These may provide relevant context:
 // https://github.com/rust-lang/rust/issues/47384
 // https://github.com/mmastrac/rust-ctor/issues/280
-pub fn init() {}
+pub const fn init() {}
 
 actions!(
     menu,
  
  
  
    
    @@ -92,7 +92,7 @@ pub enum Model {
 }
 
 impl Model {
-    pub fn default_fast() -> Self {
+    pub const fn default_fast() -> Self {
         Model::MistralSmallLatest
     }
 
@@ -152,7 +152,7 @@ impl Model {
         }
     }
 
-    pub fn max_token_count(&self) -> u64 {
+    pub const fn max_token_count(&self) -> u64 {
         match self {
             Self::CodestralLatest => 256000,
             Self::MistralLargeLatest => 131000,
@@ -170,7 +170,7 @@ impl Model {
         }
     }
 
-    pub fn max_output_tokens(&self) -> Option<u64> {
+    pub const fn max_output_tokens(&self) -> Option<u64> {
         match self {
             Self::Custom {
                 max_output_tokens, ..
@@ -313,7 +313,7 @@ pub enum MessageContent {
 }
 
 impl MessageContent {
-    pub fn empty() -> Self {
+    pub const fn empty() -> Self {
         Self::Plain {
             content: String::new(),
         }
  
  
  
    
    @@ -16,14 +16,14 @@ pub struct Anchor {
 }
 
 impl Anchor {
-    pub fn with_diff_base_anchor(self, diff_base_anchor: text::Anchor) -> Self {
+    pub const fn with_diff_base_anchor(self, diff_base_anchor: text::Anchor) -> Self {
         Self {
             diff_base_anchor: Some(diff_base_anchor),
             ..self
         }
     }
 
-    pub fn in_buffer(
+    pub const fn in_buffer(
         excerpt_id: ExcerptId,
         buffer_id: BufferId,
         text_anchor: text::Anchor,
@@ -36,7 +36,7 @@ impl Anchor {
         }
     }
 
-    pub fn range_in_buffer(
+    pub const fn range_in_buffer(
         excerpt_id: ExcerptId,
         buffer_id: BufferId,
         range: Range<text::Anchor>,
@@ -45,7 +45,7 @@ impl Anchor {
             ..Self::in_buffer(excerpt_id, buffer_id, range.end)
     }
 
-    pub fn min() -> Self {
+    pub const fn min() -> Self {
         Self {
             buffer_id: None,
             excerpt_id: ExcerptId::min(),
@@ -54,7 +54,7 @@ impl Anchor {
         }
     }
 
-    pub fn max() -> Self {
+    pub const fn max() -> Self {
         Self {
             buffer_id: None,
             excerpt_id: ExcerptId::max(),
@@ -108,7 +108,7 @@ impl Anchor {
         Ordering::Equal
     }
 
-    pub fn bias(&self) -> Bias {
+    pub const fn bias(&self) -> Bias {
         self.text_anchor.bias
     }
 
  
  
  
    
    @@ -156,7 +156,7 @@ impl MultiBufferDiffHunk {
             && self.buffer_range == (text::Anchor::MIN..text::Anchor::MAX)
     }
 
-    pub fn multi_buffer_range(&self) -> Range<Anchor> {
+    pub const fn multi_buffer_range(&self) -> Range<Anchor> {
         let start = Anchor::in_buffer(self.excerpt_id, self.buffer_id, self.buffer_range.start);
         let end = Anchor::in_buffer(self.excerpt_id, self.buffer_id, self.buffer_range.end);
         start..end
@@ -171,7 +171,7 @@ pub struct PathKey {
 }
 
 impl PathKey {
-    pub fn with_sort_prefix(sort_prefix: u64, path: Arc<RelPath>) -> Self {
+    pub const fn with_sort_prefix(sort_prefix: u64, path: Arc<RelPath>) -> Self {
         Self {
             sort_prefix: Some(sort_prefix),
             path,
@@ -587,7 +587,7 @@ pub enum ExpandExcerptDirection {
 }
 
 impl ExpandExcerptDirection {
-    pub fn should_expand_up(&self) -> bool {
+    pub const fn should_expand_up(&self) -> bool {
         match self {
             ExpandExcerptDirection::Up => true,
             ExpandExcerptDirection::Down => false,
@@ -595,7 +595,7 @@ impl ExpandExcerptDirection {
         }
     }
 
-    pub fn should_expand_down(&self) -> bool {
+    pub const fn should_expand_down(&self) -> bool {
         match self {
             ExpandExcerptDirection::Up => false,
             ExpandExcerptDirection::Down => true,
@@ -615,7 +615,7 @@ pub struct IndentGuide {
 }
 
 impl IndentGuide {
-    pub fn indent_level(&self) -> u32 {
+    pub const fn indent_level(&self) -> u32 {
         self.depth * self.tab_size
     }
 }
@@ -745,7 +745,7 @@ impl MultiBuffer {
         }
     }
 
-    pub fn is_singleton(&self) -> bool {
+    pub const fn is_singleton(&self) -> bool {
         self.singleton
     }
 
@@ -4224,7 +4224,7 @@ impl MultiBufferSnapshot {
             .map(|ch| classifier.kind(ch))
     }
 
-    pub fn is_singleton(&self) -> bool {
+    pub const fn is_singleton(&self) -> bool {
         self.singleton
     }
 
@@ -5408,11 +5408,11 @@ impl MultiBufferSnapshot {
         })
     }
 
-    pub fn edit_count(&self) -> usize {
+    pub const fn edit_count(&self) -> usize {
         self.edit_count
     }
 
-    pub fn non_text_state_update_count(&self) -> usize {
+    pub const fn non_text_state_update_count(&self) -> usize {
         self.non_text_state_update_count
     }
 
@@ -5891,7 +5891,7 @@ impl MultiBufferSnapshot {
         result.into_iter()
     }
 
-    pub fn trailing_excerpt_update_count(&self) -> usize {
+    pub const fn trailing_excerpt_update_count(&self) -> usize {
         self.trailing_excerpt_update_count
     }
 
@@ -5953,15 +5953,15 @@ impl MultiBufferSnapshot {
         Some(buffer_snapshot.language_indent_size_at(offset, cx))
     }
 
-    pub fn is_dirty(&self) -> bool {
+    pub const fn is_dirty(&self) -> bool {
         self.is_dirty
     }
 
-    pub fn has_deleted_file(&self) -> bool {
+    pub const fn has_deleted_file(&self) -> bool {
         self.has_deleted_file
     }
 
-    pub fn has_conflict(&self) -> bool {
+    pub const fn has_conflict(&self) -> bool {
         self.has_conflict
     }
 
@@ -6333,7 +6333,7 @@ impl MultiBufferSnapshot {
             })
     }
 
-    pub fn show_headers(&self) -> bool {
+    pub const fn show_headers(&self) -> bool {
         self.show_headers
     }
 
@@ -7027,15 +7027,15 @@ impl Excerpt {
 }
 
 impl<'a> MultiBufferExcerpt<'a> {
-    pub fn id(&self) -> ExcerptId {
+    pub const fn id(&self) -> ExcerptId {
         self.excerpt.id
     }
 
-    pub fn buffer_id(&self) -> BufferId {
+    pub const fn buffer_id(&self) -> BufferId {
         self.excerpt.buffer_id
     }
 
-    pub fn start_anchor(&self) -> Anchor {
+    pub const fn start_anchor(&self) -> Anchor {
         Anchor::in_buffer(
             self.excerpt.id,
             self.excerpt.buffer_id,
@@ -7043,7 +7043,7 @@ impl<'a> MultiBufferExcerpt<'a> {
         )
     }
 
-    pub fn end_anchor(&self) -> Anchor {
+    pub const fn end_anchor(&self) -> Anchor {
         Anchor::in_buffer(
             self.excerpt.id,
             self.excerpt.buffer_id,
@@ -7051,7 +7051,7 @@ impl<'a> MultiBufferExcerpt<'a> {
         )
     }
 
-    pub fn buffer(&self) -> &'a BufferSnapshot {
+    pub const fn buffer(&self) -> &'a BufferSnapshot {
         &self.excerpt.buffer
     }
 
@@ -7065,7 +7065,7 @@ impl<'a> MultiBufferExcerpt<'a> {
                 .to_offset(&self.excerpt.buffer.text)
     }
 
-    pub fn start_offset(&self) -> usize {
+    pub const fn start_offset(&self) -> usize {
         self.offset
     }
 
@@ -7144,25 +7144,25 @@ impl<'a> MultiBufferExcerpt<'a> {
             && range.end <= self.excerpt.buffer_end_offset()
     }
 
-    pub fn max_buffer_row(&self) -> u32 {
+    pub const fn max_buffer_row(&self) -> u32 {
         self.excerpt.max_buffer_row
     }
 }
 
 impl ExcerptId {
-    pub fn min() -> Self {
+    pub const fn min() -> Self {
         Self(0)
     }
 
-    pub fn max() -> Self {
+    pub const fn max() -> Self {
         Self(u32::MAX)
     }
 
-    pub fn to_proto(self) -> u64 {
+    pub const fn to_proto(self) -> u64 {
         self.0 as _
     }
 
-    pub fn from_proto(proto: u64) -> Self {
+    pub const fn from_proto(proto: u64) -> Self {
         Self(proto as _)
     }
 
@@ -7226,7 +7226,7 @@ impl sum_tree::KeyedItem for ExcerptIdMapping {
 }
 
 impl DiffTransform {
-    fn hunk_info(&self) -> Option<DiffTransformHunkInfo> {
+    const fn hunk_info(&self) -> Option<DiffTransformHunkInfo> {
         match self {
             DiffTransform::DeletedHunk { hunk_info, .. } => Some(*hunk_info),
             DiffTransform::BufferContent {
@@ -7254,7 +7254,7 @@ impl sum_tree::Item for DiffTransform {
 }
 
 impl DiffTransformSummary {
-    fn excerpt_len(&self) -> ExcerptOffset {
+    const fn excerpt_len(&self) -> ExcerptOffset {
         ExcerptOffset::new(self.input.len)
     }
 }
@@ -7593,7 +7593,7 @@ impl Iterator for MultiBufferRows<'_> {
 }
 
 impl<'a> MultiBufferChunks<'a> {
-    pub fn offset(&self) -> usize {
+    pub const fn offset(&self) -> usize {
         self.range.start
     }
 
  
  
  
    
    @@ -24,63 +24,63 @@ pub struct TypedRow<T> {
 }
 
 impl<T> TypedOffset<T> {
-    pub fn new(offset: usize) -> Self {
+    pub const fn new(offset: usize) -> Self {
         Self {
             value: offset,
             _marker: PhantomData,
         }
     }
 
-    pub fn saturating_sub(self, n: TypedOffset<T>) -> Self {
+    pub const fn saturating_sub(self, n: TypedOffset<T>) -> Self {
         Self {
             value: self.value.saturating_sub(n.value),
             _marker: PhantomData,
         }
     }
 
-    pub fn zero() -> Self {
+    pub const fn zero() -> Self {
         Self::new(0)
     }
 
-    pub fn is_zero(&self) -> bool {
+    pub const fn is_zero(&self) -> bool {
         self.value == 0
     }
 }
 
 impl<T> TypedPoint<T> {
-    pub fn new(row: u32, column: u32) -> Self {
+    pub const fn new(row: u32, column: u32) -> Self {
         Self {
             value: Point::new(row, column),
             _marker: PhantomData,
         }
     }
 
-    pub fn wrap(point: Point) -> Self {
+    pub const fn wrap(point: Point) -> Self {
         Self {
             value: point,
             _marker: PhantomData,
         }
     }
 
-    pub fn row(&self) -> u32 {
+    pub const fn row(&self) -> u32 {
         self.value.row
     }
 
-    pub fn column(&self) -> u32 {
+    pub const fn column(&self) -> u32 {
         self.value.column
     }
 
-    pub fn zero() -> Self {
+    pub const fn zero() -> Self {
         Self::wrap(Point::zero())
     }
 
-    pub fn is_zero(&self) -> bool {
+    pub const fn is_zero(&self) -> bool {
         self.value.is_zero()
     }
 }
 
 impl<T> TypedRow<T> {
-    pub fn new(row: u32) -> Self {
+    pub const fn new(row: u32) -> Self {
         Self {
             value: row,
             _marker: PhantomData,
  
  
  
    
    @@ -19,7 +19,7 @@ impl ToastIcon {
         }
     }
 
-    pub fn color(mut self, color: Color) -> Self {
+    pub const fn color(mut self, color: Color) -> Self {
         self.color = color;
         self
     }
@@ -67,7 +67,7 @@ impl StatusToast {
         })
     }
 
-    pub fn icon(mut self, icon: ToastIcon) -> Self {
+    pub const fn icon(mut self, icon: ToastIcon) -> Self {
         self.icon = Some(icon);
         self
     }
@@ -90,7 +90,7 @@ impl StatusToast {
         self
     }
 
-    pub fn dismiss_button(mut self, show: bool) -> Self {
+    pub const fn dismiss_button(mut self, show: bool) -> Self {
         self.show_dismiss = show;
         self
     }
  
  
  
    
    @@ -72,7 +72,7 @@ impl Model {
         self.display_name.as_ref().unwrap_or(&self.name)
     }
 
-    pub fn max_token_count(&self) -> u64 {
+    pub const fn max_token_count(&self) -> u64 {
         self.max_tokens
     }
 }
  
  
  
    
    @@ -43,7 +43,7 @@ impl ThemePreviewTile {
     pub const ROOT_PADDING: Pixels = px(2.0);
     pub const CHILD_BORDER: Pixels = px(1.0);
 
-    pub fn new(theme: Arc<Theme>, seed: f32) -> Self {
+    pub const fn new(theme: Arc<Theme>, seed: f32) -> Self {
         Self {
             theme,
             seed,
  
  
  
    
    @@ -95,7 +95,7 @@ pub enum Model {
 }
 
 impl Model {
-    pub fn default_fast() -> Self {
+    pub const fn default_fast() -> Self {
         // TODO: Replace with FiveMini since all other models are deprecated
         Self::FourPointOneMini
     }
@@ -165,7 +165,7 @@ impl Model {
         }
     }
 
-    pub fn max_token_count(&self) -> u64 {
+    pub const fn max_token_count(&self) -> u64 {
         match self {
             Self::ThreePointFiveTurbo => 16_385,
             Self::Four => 8_192,
@@ -186,7 +186,7 @@ impl Model {
         }
     }
 
-    pub fn max_output_tokens(&self) -> Option<u64> {
+    pub const fn max_output_tokens(&self) -> Option<u64> {
         match self {
             Self::Custom {
                 max_output_tokens, ..
@@ -221,7 +221,7 @@ impl Model {
     /// Returns whether the given model supports the `parallel_tool_calls` parameter.
     ///
     /// If the model does not support the parameter, do not pass it up, or the API will return an error.
-    pub fn supports_parallel_tool_calls(&self) -> bool {
+    pub const fn supports_parallel_tool_calls(&self) -> bool {
         match self {
             Self::ThreePointFiveTurbo
             | Self::Four
@@ -241,7 +241,7 @@ impl Model {
     /// Returns whether the given model supports the `prompt_cache_key` parameter.
     ///
     /// If the model does not support the parameter, do not pass it up.
-    pub fn supports_prompt_cache_key(&self) -> bool {
+    pub const fn supports_prompt_cache_key(&self) -> bool {
         true
     }
 }
@@ -321,7 +321,7 @@ pub enum MessageContent {
 }
 
 impl MessageContent {
-    pub fn empty() -> Self {
+    pub const fn empty() -> Self {
         MessageContent::Multipart(vec![])
     }
 
  
  
  
    
    @@ -126,11 +126,11 @@ impl Model {
         self.display_name.as_ref().unwrap_or(&self.name)
     }
 
-    pub fn max_token_count(&self) -> u64 {
+    pub const fn max_token_count(&self) -> u64 {
         self.max_tokens
     }
 
-    pub fn max_output_tokens(&self) -> Option<u64> {
+    pub const fn max_output_tokens(&self) -> Option<u64> {
         None
     }
 
@@ -138,7 +138,7 @@ impl Model {
         self.supports_tools.unwrap_or(false)
     }
 
-    pub fn supports_parallel_tool_calls(&self) -> bool {
+    pub const fn supports_parallel_tool_calls(&self) -> bool {
         false
     }
 }
@@ -236,7 +236,7 @@ pub enum MessageContent {
 }
 
 impl MessageContent {
-    pub fn empty() -> Self {
+    pub const fn empty() -> Self {
         Self::Plain(String::new())
     }
 
@@ -726,7 +726,7 @@ impl std::fmt::Display for ApiErrorCode {
 }
 
 impl ApiErrorCode {
-    pub fn from_status(status: u16) -> Self {
+    pub const fn from_status(status: u16) -> Self {
         match status {
             400 => ApiErrorCode::InvalidRequestError,
             401 => ApiErrorCode::AuthenticationError,
  
  
  
    
    @@ -290,7 +290,7 @@ impl SelectedEntry {
         }
     }
 
-    fn is_invalidated(&self) -> bool {
+    const fn is_invalidated(&self) -> bool {
         matches!(self, Self::Invalidated(_))
     }
 }
@@ -302,7 +302,7 @@ struct FsChildren {
 }
 
 impl FsChildren {
-    fn may_be_fold_part(&self) -> bool {
+    const fn may_be_fold_part(&self) -> bool {
         self.dirs == 0 || (self.dirs == 1 && self.files == 0)
     }
 }
@@ -344,7 +344,7 @@ impl Excerpt {
         }
     }
 
-    fn should_fetch_outlines(&self) -> bool {
+    const fn should_fetch_outlines(&self) -> bool {
         match &self.outlines {
             ExcerptOutlines::Outlines(_) => false,
             ExcerptOutlines::Invalidated(_) => true,
@@ -577,7 +577,7 @@ enum OutlineEntry {
 }
 
 impl OutlineEntry {
-    fn ids(&self) -> (BufferId, ExcerptId) {
+    const fn ids(&self) -> (BufferId, ExcerptId) {
         match self {
             OutlineEntry::Excerpt(excerpt) => (excerpt.buffer_id, excerpt.id),
             OutlineEntry::Outline(outline) => (outline.buffer_id, outline.excerpt_id),
@@ -1416,7 +1416,7 @@ impl OutlinePanel {
         cx.notify();
     }
 
-    fn is_unfoldable(&self, entry: &PanelEntry) -> bool {
+    const fn is_unfoldable(&self, entry: &PanelEntry) -> bool {
         matches!(entry, PanelEntry::FoldedDirs(..))
     }
 
@@ -4444,7 +4444,7 @@ impl OutlinePanel {
         cx.notify();
     }
 
-    fn selected_entry(&self) -> Option<&PanelEntry> {
+    const fn selected_entry(&self) -> Option<&PanelEntry> {
         match &self.selected_entry {
             SelectedEntry::Invalidated(entry) => entry.as_ref(),
             SelectedEntry::Valid(entry, _) => Some(entry),
  
  
  
    
    @@ -403,12 +403,12 @@ pub fn remote_servers_dir() -> &'static PathBuf {
 }
 
 /// Returns the relative path to a `.zed` folder within a project.
-pub fn local_settings_folder_name() -> &'static str {
+pub const fn local_settings_folder_name() -> &'static str {
     ".zed"
 }
 
 /// Returns the relative path to a `.vscode` folder within a project.
-pub fn local_vscode_folder_name() -> &'static str {
+pub const fn local_vscode_folder_name() -> &'static str {
     ".vscode"
 }
 
@@ -433,11 +433,11 @@ pub fn local_vscode_tasks_file_relative_path() -> &'static RelPath {
     *CACHED
 }
 
-pub fn debug_task_file_name() -> &'static str {
+pub const fn debug_task_file_name() -> &'static str {
     "debug.json"
 }
 
-pub fn task_file_name() -> &'static str {
+pub const fn task_file_name() -> &'static str {
     "tasks.json"
 }
 
  
  
  
    
    @@ -332,22 +332,22 @@ impl<D: PickerDelegate> Picker<D> {
         self
     }
 
-    pub fn widest_item(mut self, ix: Option<usize>) -> Self {
+    pub const fn widest_item(mut self, ix: Option<usize>) -> Self {
         self.widest_item = ix;
         self
     }
 
-    pub fn max_height(mut self, max_height: Option<gpui::Length>) -> Self {
+    pub const fn max_height(mut self, max_height: Option<gpui::Length>) -> Self {
         self.max_height = max_height;
         self
     }
 
-    pub fn show_scrollbar(mut self, show_scrollbar: bool) -> Self {
+    pub const fn show_scrollbar(mut self, show_scrollbar: bool) -> Self {
         self.show_scrollbar = show_scrollbar;
         self
     }
 
-    pub fn modal(mut self, modal: bool) -> Self {
+    pub const fn modal(mut self, modal: bool) -> Self {
         self.is_modal = modal;
         self
     }
  
  
  
    
    @@ -57,7 +57,7 @@ where
         self
     }
 
-    pub fn offset(mut self, offset: Point<Pixels>) -> Self {
+    pub const fn offset(mut self, offset: Point<Pixels>) -> Self {
         self.offset = Some(offset);
         self
     }
  
  
  
    
    @@ -506,7 +506,7 @@ impl Prettier {
         }
     }
 
-    pub fn server(&self) -> Option<&Arc<LanguageServer>> {
+    pub const fn server(&self) -> Option<&Arc<LanguageServer>> {
         match self {
             Self::Real(local) => Some(&local.server),
             #[cfg(any(test, feature = "test-support"))]
@@ -514,7 +514,7 @@ impl Prettier {
         }
     }
 
-    pub fn is_default(&self) -> bool {
+    pub const fn is_default(&self) -> bool {
         match self {
             Self::Real(local) => local.default,
             #[cfg(any(test, feature = "test-support"))]
  
  
  
    
    @@ -782,21 +782,21 @@ impl BufferStore {
         }
     }
 
-    fn as_local_mut(&mut self) -> Option<&mut LocalBufferStore> {
+    const fn as_local_mut(&mut self) -> Option<&mut LocalBufferStore> {
         match &mut self.state {
             BufferStoreState::Local(state) => Some(state),
             _ => None,
         }
     }
 
-    fn as_remote_mut(&mut self) -> Option<&mut RemoteBufferStore> {
+    const fn as_remote_mut(&mut self) -> Option<&mut RemoteBufferStore> {
         match &mut self.state {
             BufferStoreState::Remote(state) => Some(state),
             _ => None,
         }
     }
 
-    fn as_remote(&self) -> Option<&RemoteBufferStore> {
+    const fn as_remote(&self) -> Option<&RemoteBufferStore> {
         match &self.state {
             BufferStoreState::Remote(state) => Some(state),
             _ => None,
  
  
  
    
    @@ -102,7 +102,7 @@ pub enum ContextServerConfiguration {
 }
 
 impl ContextServerConfiguration {
-    pub fn command(&self) -> &ContextServerCommand {
+    pub const fn command(&self) -> &ContextServerCommand {
         match self {
             ContextServerConfiguration::Custom { command } => command,
             ContextServerConfiguration::Extension { command, .. } => command,
  
  
  
    
    @@ -15,7 +15,7 @@ impl<E: 'static> Default for DebouncedDelay<E> {
 }
 
 impl<E: 'static> DebouncedDelay<E> {
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         Self {
             task: None,
             cancel_channel: None,
  
  
  
    
    @@ -47,7 +47,7 @@ mod breakpoints_in_file {
                 session_state: Default::default(),
             }
         }
-        pub(super) fn position(&self) -> &text::Anchor {
+        pub(super) const fn position(&self) -> &text::Anchor {
             &self.bp.position
         }
     }
@@ -638,7 +638,7 @@ impl BreakpointStore {
             })
     }
 
-    pub fn active_position(&self) -> Option<&ActiveStackFrame> {
+    pub const fn active_position(&self) -> Option<&ActiveStackFrame> {
         self.active_stack_frame.as_ref()
     }
 
@@ -894,17 +894,17 @@ pub enum BreakpointState {
 
 impl BreakpointState {
     #[inline]
-    pub fn is_enabled(&self) -> bool {
+    pub const fn is_enabled(&self) -> bool {
         matches!(self, BreakpointState::Enabled)
     }
 
     #[inline]
-    pub fn is_disabled(&self) -> bool {
+    pub const fn is_disabled(&self) -> bool {
         matches!(self, BreakpointState::Disabled)
     }
 
     #[inline]
-    pub fn to_int(self) -> i32 {
+    pub const fn to_int(self) -> i32 {
         match self {
             BreakpointState::Enabled => 0,
             BreakpointState::Disabled => 1,
@@ -922,7 +922,7 @@ pub struct Breakpoint {
 }
 
 impl Breakpoint {
-    pub fn new_standard() -> Self {
+    pub const fn new_standard() -> Self {
         Self {
             state: BreakpointState::Enabled,
             hit_condition: None,
@@ -995,12 +995,12 @@ impl Breakpoint {
     }
 
     #[inline]
-    pub fn is_enabled(&self) -> bool {
+    pub const fn is_enabled(&self) -> bool {
         self.state.is_enabled()
     }
 
     #[inline]
-    pub fn is_disabled(&self) -> bool {
+    pub const fn is_disabled(&self) -> bool {
         self.state.is_disabled()
     }
 }
  
  
  
    
    @@ -437,7 +437,7 @@ impl DapStore {
         }
     }
 
-    fn as_local(&self) -> Option<&LocalDapStore> {
+    const fn as_local(&self) -> Option<&LocalDapStore> {
         match &self.mode {
             DapStoreMode::Local(local_dap_store) => Some(local_dap_store),
             _ => None,
@@ -560,11 +560,11 @@ impl DapStore {
             .map(|client| client.read(cx).capabilities.clone())
     }
 
-    pub fn breakpoint_store(&self) -> &Entity<BreakpointStore> {
+    pub const fn breakpoint_store(&self) -> &Entity<BreakpointStore> {
         &self.breakpoint_store
     }
 
-    pub fn worktree_store(&self) -> &Entity<WorktreeStore> {
+    pub const fn worktree_store(&self) -> &Entity<WorktreeStore> {
         &self.worktree_store
     }
 
@@ -929,7 +929,7 @@ impl DapStore {
         self.adapter_options.get(name).cloned()
     }
 
-    pub fn all_adapter_options(&self) -> &BTreeMap<DebugAdapterName, Arc<PersistedAdapterOptions>> {
+    pub const fn all_adapter_options(&self) -> &BTreeMap<DebugAdapterName, Arc<PersistedAdapterOptions>> {
         &self.adapter_options
     }
 }
  
  
  
    
    @@ -209,7 +209,7 @@ impl MemoryPageBuilder {
         (self.base_address, contents)
     }
     /// Drives the fetching of memory, in an iterator-esque style.
-    pub(super) fn next_request(&self) -> Option<UnknownMemory> {
+    pub(super) const fn next_request(&self) -> Option<UnknownMemory> {
         if self.left_to_read == 0 {
             None
         } else {
  
  
  
    
    @@ -107,7 +107,7 @@ pub enum ThreadStatus {
 }
 
 impl ThreadStatus {
-    pub fn label(&self) -> &'static str {
+    pub const fn label(&self) -> &'static str {
         match self {
             ThreadStatus::Running => "Running",
             ThreadStatus::Stopped => "Stopped",
@@ -232,7 +232,7 @@ impl RunningMode {
         })
     }
 
-    pub(crate) fn worktree(&self) -> &WeakEntity<Worktree> {
+    pub(crate) const fn worktree(&self) -> &WeakEntity<Worktree> {
         &self.worktree
     }
 
@@ -595,14 +595,14 @@ impl SessionState {
     }
 
     /// Did this debug session stop at least once?
-    pub(crate) fn has_ever_stopped(&self) -> bool {
+    pub(crate) const fn has_ever_stopped(&self) -> bool {
         match self {
             SessionState::Booting(_) => false,
             SessionState::Running(running_mode) => running_mode.has_ever_stopped,
         }
     }
 
-    fn stopped(&mut self) {
+    const fn stopped(&mut self) {
         if let SessionState::Running(running) = self {
             running.has_ever_stopped = true;
         }
@@ -894,7 +894,7 @@ impl Session {
         })
     }
 
-    pub fn task_context(&self) -> &TaskContext {
+    pub const fn task_context(&self) -> &TaskContext {
         &self.task_context
     }
 
@@ -999,7 +999,7 @@ impl Session {
         })
     }
 
-    pub fn session_id(&self) -> SessionId {
+    pub const fn session_id(&self) -> SessionId {
         self.id
     }
 
@@ -1021,7 +1021,7 @@ impl Session {
             .map(|session| session.read(cx).id)
     }
 
-    pub fn parent_session(&self) -> Option<&Entity<Self>> {
+    pub const fn parent_session(&self) -> Option<&Entity<Self>> {
         self.parent_session.as_ref()
     }
 
@@ -1056,11 +1056,11 @@ impl Session {
         })
     }
 
-    pub fn capabilities(&self) -> &Capabilities {
+    pub const fn capabilities(&self) -> &Capabilities {
         &self.capabilities
     }
 
-    pub fn binary(&self) -> Option<&DebugAdapterBinary> {
+    pub const fn binary(&self) -> Option<&DebugAdapterBinary> {
         match &self.mode {
             SessionState::Booting(_) => None,
             SessionState::Running(running_mode) => Some(&running_mode.binary),
@@ -1075,7 +1075,7 @@ impl Session {
         self.label.clone()
     }
 
-    pub fn is_terminated(&self) -> bool {
+    pub const fn is_terminated(&self) -> bool {
         self.is_session_terminated
     }
 
@@ -1106,25 +1106,25 @@ impl Session {
         tx
     }
 
-    pub fn is_started(&self) -> bool {
+    pub const fn is_started(&self) -> bool {
         match &self.mode {
             SessionState::Booting(_) => false,
             SessionState::Running(running) => running.is_started,
         }
     }
 
-    pub fn is_building(&self) -> bool {
+    pub const fn is_building(&self) -> bool {
         matches!(self.mode, SessionState::Booting(_))
     }
 
-    pub fn as_running_mut(&mut self) -> Option<&mut RunningMode> {
+    pub const fn as_running_mut(&mut self) -> Option<&mut RunningMode> {
         match &mut self.mode {
             SessionState::Running(local_mode) => Some(local_mode),
             SessionState::Booting(_) => None,
         }
     }
 
-    pub fn as_running(&self) -> Option<&RunningMode> {
+    pub const fn as_running(&self) -> Option<&RunningMode> {
         match &self.mode {
             SessionState::Running(local_mode) => Some(local_mode),
             SessionState::Booting(_) => None,
@@ -1917,7 +1917,7 @@ impl Session {
         );
     }
 
-    pub fn ignore_breakpoints(&self) -> bool {
+    pub const fn ignore_breakpoints(&self) -> bool {
         self.ignore_breakpoints
     }
 
@@ -2023,7 +2023,7 @@ impl Session {
         self.send_data_breakpoints(cx);
     }
 
-    pub fn breakpoints_enabled(&self) -> bool {
+    pub const fn breakpoints_enabled(&self) -> bool {
         self.ignore_breakpoints
     }
 
@@ -2236,7 +2236,7 @@ impl Session {
         }
     }
 
-    pub fn has_ever_stopped(&self) -> bool {
+    pub const fn has_ever_stopped(&self) -> bool {
         self.mode.has_ever_stopped()
     }
     pub fn step_over(
@@ -2503,7 +2503,7 @@ impl Session {
             .collect()
     }
 
-    pub fn watchers(&self) -> &HashMap<SharedString, Watcher> {
+    pub const fn watchers(&self) -> &HashMap<SharedString, Watcher> {
         &self.watchers
     }
 
@@ -2750,7 +2750,7 @@ impl Session {
         self.thread_states.thread_state(thread_id)
     }
 
-    pub fn quirks(&self) -> SessionQuirks {
+    pub const fn quirks(&self) -> SessionQuirks {
         self.quirks
     }
 
  
  
  
    
    @@ -438,7 +438,7 @@ impl GitStore {
         client.add_entity_request_handler(Self::handle_git_clone);
     }
 
-    pub fn is_local(&self) -> bool {
+    pub const fn is_local(&self) -> bool {
         matches!(self.state, GitStoreState::Local { .. })
     }
     pub fn set_active_repo_for_path(&mut self, project_path: &ProjectPath, cx: &mut Context<Self>) {
@@ -1364,7 +1364,7 @@ impl GitStore {
         }
     }
 
-    pub fn repositories(&self) -> &HashMap<RepositoryId, Entity<Repository>> {
+    pub const fn repositories(&self) -> &HashMap<RepositoryId, Entity<Repository>> {
         &self.repositories
     }
 
@@ -2765,11 +2765,11 @@ fn make_remote_delegate(
 }
 
 impl RepositoryId {
-    pub fn to_proto(self) -> u64 {
+    pub const fn to_proto(self) -> u64 {
         self.0
     }
 
-    pub fn from_proto(id: u64) -> Self {
+    pub const fn from_proto(id: u64) -> Self {
         RepositoryId(id)
     }
 }
@@ -5272,7 +5272,7 @@ fn status_to_proto(status: FileStatus) -> proto::GitFileStatus {
     }
 }
 
-fn unmerged_status_to_proto(code: UnmergedStatusCode) -> i32 {
+const fn unmerged_status_to_proto(code: UnmergedStatusCode) -> i32 {
     match code {
         UnmergedStatusCode::Added => proto::GitStatus::Added as _,
         UnmergedStatusCode::Deleted => proto::GitStatus::Deleted as _,
@@ -5280,7 +5280,7 @@ fn unmerged_status_to_proto(code: UnmergedStatusCode) -> i32 {
     }
 }
 
-fn tracked_status_to_proto(code: StatusCode) -> i32 {
+const fn tracked_status_to_proto(code: StatusCode) -> i32 {
     match code {
         StatusCode::Added => proto::GitStatus::Added as _,
         StatusCode::Deleted => proto::GitStatus::Deleted as _,
  
  
  
    
    @@ -128,7 +128,7 @@ impl<'a> GitTraversal<'a> {
         found
     }
 
-    pub fn start_offset(&self) -> usize {
+    pub const fn start_offset(&self) -> usize {
         self.traversal.start_offset()
     }
 
@@ -229,7 +229,7 @@ pub struct GitEntry {
 }
 
 impl GitEntry {
-    pub fn to_ref(&self) -> GitEntryRef<'_> {
+    pub const fn to_ref(&self) -> GitEntryRef<'_> {
         GitEntryRef {
             entry: &self.entry,
             git_summary: self.git_summary,
  
  
  
    
    @@ -144,7 +144,7 @@ pub enum LspFormatTarget {
 pub type OpenLspBufferHandle = Entity<Entity<Buffer>>;
 
 impl FormatTrigger {
-    fn from_proto(value: i32) -> FormatTrigger {
+    const fn from_proto(value: i32) -> FormatTrigger {
         match value {
             0 => FormatTrigger::Save,
             1 => FormatTrigger::Manual,
@@ -3477,7 +3477,7 @@ pub(crate) enum LspStoreMode {
 }
 
 impl LspStoreMode {
-    fn is_local(&self) -> bool {
+    const fn is_local(&self) -> bool {
         matches!(self, LspStoreMode::Local(_))
     }
 }
@@ -3649,21 +3649,21 @@ impl LspStore {
         );
     }
 
-    pub fn as_remote(&self) -> Option<&RemoteLspStore> {
+    pub const fn as_remote(&self) -> Option<&RemoteLspStore> {
         match &self.mode {
             LspStoreMode::Remote(remote_lsp_store) => Some(remote_lsp_store),
             _ => None,
         }
     }
 
-    pub fn as_local(&self) -> Option<&LocalLspStore> {
+    pub const fn as_local(&self) -> Option<&LocalLspStore> {
         match &self.mode {
             LspStoreMode::Local(local_lsp_store) => Some(local_lsp_store),
             _ => None,
         }
     }
 
-    pub fn as_local_mut(&mut self) -> Option<&mut LocalLspStore> {
+    pub const fn as_local_mut(&mut self) -> Option<&mut LocalLspStore> {
         match &mut self.mode {
             LspStoreMode::Local(local_lsp_store) => Some(local_lsp_store),
             _ => None,
@@ -4262,7 +4262,7 @@ impl LspStore {
         self.buffer_store.clone()
     }
 
-    pub fn set_active_entry(&mut self, active_entry: Option<ProjectEntryId>) {
+    pub const fn set_active_entry(&mut self, active_entry: Option<ProjectEntryId>) {
         self.active_entry = active_entry;
     }
 
@@ -12444,7 +12444,7 @@ impl DiagnosticSummary {
         this
     }
 
-    pub fn is_empty(&self) -> bool {
+    pub const fn is_empty(&self) -> bool {
         self.error_count == 0 && self.warning_count == 0
     }
 
  
  
  
    
    @@ -172,7 +172,7 @@ impl std::fmt::Debug for LanguageServerKind {
 }
 
 impl LanguageServerKind {
-    pub fn project(&self) -> Option<&WeakEntity<Project>> {
+    pub const fn project(&self) -> Option<&WeakEntity<Project>> {
         match self {
             Self::Local { project } => Some(project),
             Self::Remote { project } => Some(project),
@@ -204,7 +204,7 @@ pub enum LogKind {
 }
 
 impl LogKind {
-    pub fn from_server_log_type(log_type: &LanguageServerLogType) -> Self {
+    pub const fn from_server_log_type(log_type: &LanguageServerLogType) -> Self {
         match log_type {
             LanguageServerLogType::Log(_) => Self::Logs,
             LanguageServerLogType::Trace { .. } => Self::Trace,
  
  
  
    
    @@ -49,7 +49,7 @@ pub struct ExpandedMacro {
 }
 
 impl ExpandedMacro {
-    pub fn is_empty(&self) -> bool {
+    pub const fn is_empty(&self) -> bool {
         self.name.is_empty() && self.expansion.is_empty()
     }
 }
@@ -180,7 +180,7 @@ pub struct DocsUrls {
 }
 
 impl DocsUrls {
-    pub fn is_empty(&self) -> bool {
+    pub const fn is_empty(&self) -> bool {
         self.web.is_none() && self.local.is_none()
     }
 }
  
  
  
    
    @@ -206,7 +206,7 @@ pub(crate) struct ManifestQueryDelegate {
 }
 
 impl ManifestQueryDelegate {
-    pub fn new(worktree: Snapshot) -> Self {
+    pub const fn new(worktree: Snapshot) -> Self {
         Self { worktree }
     }
 }
  
  
  
    
    @@ -455,7 +455,7 @@ impl ServerTreeRebase {
         )
     }
 
-    pub(crate) fn server_tree(&mut self) -> &mut LanguageServerTree {
+    pub(crate) const fn server_tree(&mut self) -> &mut LanguageServerTree {
         &mut self.new_tree
     }
 }
  
  
  
    
    @@ -812,7 +812,7 @@ impl Default for DefaultPrettier {
 }
 
 impl DefaultPrettier {
-    pub fn instance(&self) -> Option<&PrettierInstance> {
+    pub const fn instance(&self) -> Option<&PrettierInstance> {
         if let PrettierInstallation::Installed(instance) = &self.prettier {
             Some(instance)
         } else {
  
  
  
    
    @@ -490,7 +490,7 @@ pub enum CompletionSource {
 }
 
 impl CompletionSource {
-    pub fn server_id(&self) -> Option<LanguageServerId> {
+    pub const fn server_id(&self) -> Option<LanguageServerId> {
         if let CompletionSource::Lsp { server_id, .. } = self {
             Some(*server_id)
         } else {
@@ -597,7 +597,7 @@ pub struct CompletionDisplayOptions {
 }
 
 impl CompletionDisplayOptions {
-    pub fn merge(&mut self, other: &CompletionDisplayOptions) {
+    pub const fn merge(&mut self, other: &CompletionDisplayOptions) {
         self.dynamic_width = self.dynamic_width && other.dynamic_width;
     }
 }
@@ -1704,7 +1704,7 @@ impl Project {
         Ok(project)
     }
 
-    fn new_search_history() -> SearchHistory {
+    const fn new_search_history() -> SearchHistory {
         SearchHistory::new(
             Some(MAX_PROJECT_SEARCH_HISTORY_SIZE),
             search_history::QueryInsertionBehavior::AlwaysInsert,
@@ -1856,7 +1856,7 @@ impl Project {
         self.buffer_store.read(cx).get(remote_id)
     }
 
-    pub fn languages(&self) -> &Arc<LanguageRegistry> {
+    pub const fn languages(&self) -> &Arc<LanguageRegistry> {
         &self.languages
     }
 
@@ -1872,7 +1872,7 @@ impl Project {
         self.user_store.clone()
     }
 
-    pub fn node_runtime(&self) -> Option<&NodeRuntime> {
+    pub const fn node_runtime(&self) -> Option<&NodeRuntime> {
         self.node.as_ref()
     }
 
@@ -1880,7 +1880,7 @@ impl Project {
         self.buffer_store.read(cx).buffers().collect()
     }
 
-    pub fn environment(&self) -> &Entity<ProjectEnvironment> {
+    pub const fn environment(&self) -> &Entity<ProjectEnvironment> {
         &self.environment
     }
 
@@ -1939,7 +1939,7 @@ impl Project {
         &self.fs
     }
 
-    pub fn remote_id(&self) -> Option<u64> {
+    pub const fn remote_id(&self) -> Option<u64> {
         match self.client_state {
             ProjectClientState::Local => None,
             ProjectClientState::Shared { remote_id, .. }
@@ -1947,7 +1947,7 @@ impl Project {
         }
     }
 
-    pub fn supports_terminal(&self, _cx: &App) -> bool {
+    pub const fn supports_terminal(&self, _cx: &App) -> bool {
         if self.is_local() {
             return true;
         }
@@ -1970,7 +1970,7 @@ impl Project {
             .map(|remote| remote.read(cx).connection_options())
     }
 
-    pub fn replica_id(&self) -> ReplicaId {
+    pub const fn replica_id(&self) -> ReplicaId {
         match self.client_state {
             ProjectClientState::Remote { replica_id, .. } => replica_id,
             _ => {
@@ -1983,15 +1983,15 @@ impl Project {
         }
     }
 
-    pub fn task_store(&self) -> &Entity<TaskStore> {
+    pub const fn task_store(&self) -> &Entity<TaskStore> {
         &self.task_store
     }
 
-    pub fn snippets(&self) -> &Entity<SnippetProvider> {
+    pub const fn snippets(&self) -> &Entity<SnippetProvider> {
         &self.snippets
     }
 
-    pub fn search_history(&self, kind: SearchInputKind) -> &SearchHistory {
+    pub const fn search_history(&self, kind: SearchInputKind) -> &SearchHistory {
         match kind {
             SearchInputKind::Query => &self.search_history,
             SearchInputKind::Include => &self.search_included_history,
@@ -1999,7 +1999,7 @@ impl Project {
         }
     }
 
-    pub fn search_history_mut(&mut self, kind: SearchInputKind) -> &mut SearchHistory {
+    pub const fn search_history_mut(&mut self, kind: SearchInputKind) -> &mut SearchHistory {
         match kind {
             SearchInputKind::Query => &mut self.search_history,
             SearchInputKind::Include => &mut self.search_included_history,
@@ -2007,7 +2007,7 @@ impl Project {
         }
     }
 
-    pub fn collaborators(&self) -> &HashMap<proto::PeerId, Collaborator> {
+    pub const fn collaborators(&self) -> &HashMap<proto::PeerId, Collaborator> {
         &self.collaborators
     }
 
@@ -2511,7 +2511,7 @@ impl Project {
             .unwrap_or(false)
     }
 
-    pub fn capability(&self) -> Capability {
+    pub const fn capability(&self) -> Capability {
         match &self.client_state {
             ProjectClientState::Remote { capability, .. } => *capability,
             ProjectClientState::Shared { .. } | ProjectClientState::Local => Capability::ReadWrite,
@@ -2522,7 +2522,7 @@ impl Project {
         self.is_disconnected(cx) || self.capability() == Capability::ReadOnly
     }
 
-    pub fn is_local(&self) -> bool {
+    pub const fn is_local(&self) -> bool {
         match &self.client_state {
             ProjectClientState::Local | ProjectClientState::Shared { .. } => {
                 self.remote_client.is_none()
@@ -2531,7 +2531,7 @@ impl Project {
         }
     }
 
-    pub fn is_via_remote_server(&self) -> bool {
+    pub const fn is_via_remote_server(&self) -> bool {
         match &self.client_state {
             ProjectClientState::Local | ProjectClientState::Shared { .. } => {
                 self.remote_client.is_some()
@@ -2540,7 +2540,7 @@ impl Project {
         }
     }
 
-    pub fn is_via_collab(&self) -> bool {
+    pub const fn is_via_collab(&self) -> bool {
         match &self.client_state {
             ProjectClientState::Local | ProjectClientState::Shared { .. } => false,
             ProjectClientState::Remote { .. } => true,
@@ -4177,7 +4177,7 @@ impl Project {
         self.worktree_store.read(cx).find_worktree(abs_path, cx)
     }
 
-    pub fn is_shared(&self) -> bool {
+    pub const fn is_shared(&self) -> bool {
         match &self.client_state {
             ProjectClientState::Shared { .. } => true,
             ProjectClientState::Local => false,
@@ -4429,7 +4429,7 @@ impl Project {
             .diagnostic_summaries(include_ignored, cx)
     }
 
-    pub fn active_entry(&self) -> Option<ProjectEntryId> {
+    pub const fn active_entry(&self) -> Option<ProjectEntryId> {
         self.active_entry
     }
 
@@ -5213,15 +5213,15 @@ impl Project {
             .git_init(path, fallback_branch_name, cx)
     }
 
-    pub fn buffer_store(&self) -> &Entity<BufferStore> {
+    pub const fn buffer_store(&self) -> &Entity<BufferStore> {
         &self.buffer_store
     }
 
-    pub fn git_store(&self) -> &Entity<GitStore> {
+    pub const fn git_store(&self) -> &Entity<GitStore> {
         &self.git_store
     }
 
-    pub fn agent_server_store(&self) -> &Entity<AgentServerStore> {
+    pub const fn agent_server_store(&self) -> &Entity<AgentServerStore> {
         &self.agent_server_store
     }
 
@@ -5496,18 +5496,18 @@ impl ResolvedPath {
         }
     }
 
-    pub fn project_path(&self) -> Option<&ProjectPath> {
+    pub const fn project_path(&self) -> Option<&ProjectPath> {
         match self {
             Self::ProjectPath { project_path, .. } => Some(project_path),
             _ => None,
         }
     }
 
-    pub fn is_file(&self) -> bool {
+    pub const fn is_file(&self) -> bool {
         !self.is_dir()
     }
 
-    pub fn is_dir(&self) -> bool {
+    pub const fn is_dir(&self) -> bool {
         match self {
             Self::ProjectPath { is_dir, .. } => *is_dir,
             Self::AbsPath { is_dir, .. } => *is_dir,
@@ -5594,7 +5594,7 @@ impl Completion {
     }
 }
 
-fn proto_to_prompt(level: proto::language_server_prompt_request::Level) -> gpui::PromptLevel {
+const fn proto_to_prompt(level: proto::language_server_prompt_request::Level) -> gpui::PromptLevel {
     match level {
         proto::language_server_prompt_request::Level::Info(_) => gpui::PromptLevel::Info,
         proto::language_server_prompt_request::Level::Warning(_) => gpui::PromptLevel::Warning,
  
  
  
    
    @@ -170,14 +170,14 @@ impl ContextServerSettings {
         }
     }
 
-    pub fn enabled(&self) -> bool {
+    pub const fn enabled(&self) -> bool {
         match self {
             ContextServerSettings::Custom { enabled, .. } => *enabled,
             ContextServerSettings::Extension { enabled, .. } => *enabled,
         }
     }
 
-    pub fn set_enabled(&mut self, enabled: bool) {
+    pub const fn set_enabled(&mut self, enabled: bool) {
         match self {
             ContextServerSettings::Custom { enabled: e, .. } => *e = enabled,
             ContextServerSettings::Extension { enabled: e, .. } => *e = enabled,
@@ -196,7 +196,7 @@ pub enum DiagnosticSeverity {
 }
 
 impl DiagnosticSeverity {
-    pub fn into_lsp(self) -> Option<lsp::DiagnosticSeverity> {
+    pub const fn into_lsp(self) -> Option<lsp::DiagnosticSeverity> {
         match self {
             DiagnosticSeverity::Off => None,
             DiagnosticSeverity::Error => Some(lsp::DiagnosticSeverity::ERROR),
@@ -247,11 +247,11 @@ impl From<lsp::DiagnosticSeverity> for GoToDiagnosticSeverity {
 }
 
 impl GoToDiagnosticSeverity {
-    pub fn min() -> Self {
+    pub const fn min() -> Self {
         Self::Hint
     }
 
-    pub fn max() -> Self {
+    pub const fn max() -> Self {
         Self::Error
     }
 }
@@ -356,7 +356,7 @@ pub struct BlameSettings {
 }
 
 impl GitSettings {
-    pub fn inline_blame_delay(&self) -> Option<Duration> {
+    pub const fn inline_blame_delay(&self) -> Option<Duration> {
         if self.inline_blame.delay_ms.as_millis() > 0 {
             Some(self.inline_blame.delay_ms)
         } else {
@@ -1134,7 +1134,7 @@ impl SettingsObserver {
     }
 }
 
-pub fn local_settings_kind_from_proto(kind: proto::LocalSettingsKind) -> LocalSettingsKind {
+pub const fn local_settings_kind_from_proto(kind: proto::LocalSettingsKind) -> LocalSettingsKind {
     match kind {
         proto::LocalSettingsKind::Settings => LocalSettingsKind::Settings,
         proto::LocalSettingsKind::Tasks => LocalSettingsKind::Tasks,
@@ -1143,7 +1143,7 @@ pub fn local_settings_kind_from_proto(kind: proto::LocalSettingsKind) -> LocalSe
     }
 }
 
-pub fn local_settings_kind_to_proto(kind: LocalSettingsKind) -> proto::LocalSettingsKind {
+pub const fn local_settings_kind_to_proto(kind: LocalSettingsKind) -> proto::LocalSettingsKind {
     match kind {
         LocalSettingsKind::Settings => proto::LocalSettingsKind::Settings,
         LocalSettingsKind::Tasks => proto::LocalSettingsKind::Tasks,
  
  
  
    
    @@ -44,13 +44,13 @@ impl SearchInputs {
     pub fn as_str(&self) -> &str {
         self.query.as_ref()
     }
-    pub fn files_to_include(&self) -> &PathMatcher {
+    pub const fn files_to_include(&self) -> &PathMatcher {
         &self.files_to_include
     }
-    pub fn files_to_exclude(&self) -> &PathMatcher {
+    pub const fn files_to_exclude(&self) -> &PathMatcher {
         &self.files_to_exclude
     }
-    pub fn buffers(&self) -> &Option<Vec<Entity<Buffer>>> {
+    pub const fn buffers(&self) -> &Option<Vec<Entity<Buffer>>> {
         &self.buffers
     }
 }
@@ -505,21 +505,21 @@ impl SearchQuery {
         self.as_inner().as_str()
     }
 
-    pub fn whole_word(&self) -> bool {
+    pub const fn whole_word(&self) -> bool {
         match self {
             Self::Text { whole_word, .. } => *whole_word,
             Self::Regex { whole_word, .. } => *whole_word,
         }
     }
 
-    pub fn case_sensitive(&self) -> bool {
+    pub const fn case_sensitive(&self) -> bool {
         match self {
             Self::Text { case_sensitive, .. } => *case_sensitive,
             Self::Regex { case_sensitive, .. } => *case_sensitive,
         }
     }
 
-    pub fn include_ignored(&self) -> bool {
+    pub const fn include_ignored(&self) -> bool {
         match self {
             Self::Text {
                 include_ignored, ..
@@ -530,23 +530,23 @@ impl SearchQuery {
         }
     }
 
-    pub fn is_regex(&self) -> bool {
+    pub const fn is_regex(&self) -> bool {
         matches!(self, Self::Regex { .. })
     }
 
-    pub fn files_to_include(&self) -> &PathMatcher {
+    pub const fn files_to_include(&self) -> &PathMatcher {
         self.as_inner().files_to_include()
     }
 
-    pub fn files_to_exclude(&self) -> &PathMatcher {
+    pub const fn files_to_exclude(&self) -> &PathMatcher {
         self.as_inner().files_to_exclude()
     }
 
-    pub fn buffers(&self) -> Option<&Vec<Entity<Buffer>>> {
+    pub const fn buffers(&self) -> Option<&Vec<Entity<Buffer>>> {
         self.as_inner().buffers.as_ref()
     }
 
-    pub fn is_opened_only(&self) -> bool {
+    pub const fn is_opened_only(&self) -> bool {
         self.as_inner().buffers.is_some()
     }
 
@@ -555,7 +555,7 @@ impl SearchQuery {
             && self.files_to_include().sources().is_empty())
     }
 
-    pub fn match_full_paths(&self) -> bool {
+    pub const fn match_full_paths(&self) -> bool {
         self.as_inner().match_full_paths
     }
 
@@ -575,7 +575,7 @@ impl SearchQuery {
             }
         }
     }
-    pub fn as_inner(&self) -> &SearchInputs {
+    pub const fn as_inner(&self) -> &SearchInputs {
         match self {
             Self::Regex { inner, .. } | Self::Text { inner, .. } => inner,
         }
@@ -585,7 +585,7 @@ impl SearchQuery {
     /// all matches.
     /// Returns `None` for text searches, as only regex searches support this
     /// option.
-    pub fn one_match_per_line(&self) -> Option<bool> {
+    pub const fn one_match_per_line(&self) -> Option<bool> {
         match self {
             Self::Regex {
                 one_match_per_line, ..
  
  
  
    
    @@ -23,7 +23,7 @@ pub struct SearchHistoryCursor {
 
 impl SearchHistoryCursor {
     /// Resets the selection to `None`.
-    pub fn reset(&mut self) {
+    pub const fn reset(&mut self) {
         self.selection = None;
     }
 }
@@ -36,7 +36,7 @@ pub struct SearchHistory {
 }
 
 impl SearchHistory {
-    pub fn new(max_history_len: Option<usize>, insertion_behavior: QueryInsertionBehavior) -> Self {
+    pub const fn new(max_history_len: Option<usize>, insertion_behavior: QueryInsertionBehavior) -> Self {
         SearchHistory {
             max_history_len,
             insertion_behavior,
  
  
  
    
    @@ -825,7 +825,7 @@ fn task_lru_comparator(
         })
 }
 
-fn task_source_kind_preference(kind: &TaskSourceKind) -> u32 {
+const fn task_source_kind_preference(kind: &TaskSourceKind) -> u32 {
     match kind {
         TaskSourceKind::Lsp { .. } => 0,
         TaskSourceKind::Language { .. } => 1,
@@ -967,7 +967,7 @@ pub struct BasicContextProvider {
 }
 
 impl BasicContextProvider {
-    pub fn new(worktree_store: Entity<WorktreeStore>) -> Self {
+    pub const fn new(worktree_store: Entity<WorktreeStore>) -> Self {
         Self { worktree_store }
     }
 }
@@ -1075,7 +1075,7 @@ pub struct ContextProviderWithTasks {
 }
 
 impl ContextProviderWithTasks {
-    pub fn new(definitions: TaskTemplates) -> Self {
+    pub const fn new(definitions: TaskTemplates) -> Self {
         Self {
             templates: definitions,
         }
  
  
  
    
    @@ -230,7 +230,7 @@ impl TaskStore {
         }
     }
 
-    pub fn task_inventory(&self) -> Option<&Entity<Inventory>> {
+    pub const fn task_inventory(&self) -> Option<&Entity<Inventory>> {
         match self {
             TaskStore::Functional(state) => Some(&state.task_inventory),
             TaskStore::Noop => None,
  
  
  
    
    @@ -518,7 +518,7 @@ impl Project {
         })
     }
 
-    pub fn local_terminal_handles(&self) -> &Vec<WeakEntity<terminal::Terminal>> {
+    pub const fn local_terminal_handles(&self) -> &Vec<WeakEntity<terminal::Terminal>> {
         &self.terminals.local_handles
     }
 }
  
  
  
    
    @@ -383,7 +383,7 @@ impl ToolchainStore {
             ToolchainStoreInner::Remote(remote) => Arc::new(RemoteStore(remote.downgrade())),
         }
     }
-    pub fn as_local_store(&self) -> Option<&Entity<LocalToolchainStore>> {
+    pub const fn as_local_store(&self) -> Option<&Entity<LocalToolchainStore>> {
         match &self.mode {
             ToolchainStoreInner::Local(local) => Some(local),
             ToolchainStoreInner::Remote(_) => None,
  
  
  
    
    @@ -183,7 +183,7 @@ impl WorktreeStore {
         Some(worktree.read(cx).absolutize(&project_path.path))
     }
 
-    pub fn path_style(&self) -> PathStyle {
+    pub const fn path_style(&self) -> PathStyle {
         match &self.state {
             WorktreeStoreState::Local { .. } => PathStyle::local(),
             WorktreeStoreState::Remote { path_style, .. } => *path_style,
@@ -686,7 +686,7 @@ impl WorktreeStore {
         self.send_project_updates(cx);
     }
 
-    pub fn set_worktrees_reordered(&mut self, worktrees_reordered: bool) {
+    pub const fn set_worktrees_reordered(&mut self, worktrees_reordered: bool) {
         self.worktrees_reordered = worktrees_reordered;
     }
 
  
  
  
    
    @@ -180,7 +180,7 @@ struct EditState {
 }
 
 impl EditState {
-    fn is_new_entry(&self) -> bool {
+    const fn is_new_entry(&self) -> bool {
         self.leaf_entry_id.is_none()
     }
 }
@@ -332,7 +332,7 @@ struct FoldedAncestors {
 }
 
 impl FoldedAncestors {
-    fn max_ancestor_depth(&self) -> usize {
+    const fn max_ancestor_depth(&self) -> usize {
         self.ancestors.len()
     }
 
@@ -344,7 +344,7 @@ impl FoldedAncestors {
         self.ancestors.get(self.current_ancestor_depth).copied()
     }
 
-    fn active_index(&self) -> usize {
+    const fn active_index(&self) -> usize {
         self.max_ancestor_depth()
             .saturating_sub(1)
             .saturating_sub(self.current_ancestor_depth)
@@ -3612,7 +3612,7 @@ impl ProjectPanel {
         }
     }
 
-    fn is_copy_modifier_set(modifiers: &Modifiers) -> bool {
+    const fn is_copy_modifier_set(modifiers: &Modifiers) -> bool {
         cfg!(target_os = "macos") && modifiers.alt
             || cfg!(not(target_os = "macos")) && modifiers.control
     }
@@ -5303,7 +5303,7 @@ impl StickyCandidate for StickyProjectPanelCandidate {
     }
 }
 
-fn item_width_estimate(depth: usize, item_text_chars: usize, is_symlink: bool) -> usize {
+const fn item_width_estimate(depth: usize, item_text_chars: usize, is_symlink: bool) -> usize {
     const ICON_SIZE_FACTOR: usize = 2;
     let mut item_width = depth * ICON_SIZE_FACTOR + item_text_chars;
     if is_symlink {
@@ -6036,11 +6036,11 @@ impl Focusable for ProjectPanel {
 }
 
 impl ClipboardEntry {
-    fn is_cut(&self) -> bool {
+    const fn is_cut(&self) -> bool {
         matches!(self, Self::Cut { .. })
     }
 
-    fn items(&self) -> &BTreeSet<SelectedEntry> {
+    const fn items(&self) -> &BTreeSet<SelectedEntry> {
         match self {
             ClipboardEntry::Copied(entries) | ClipboardEntry::Cut(entries) => entries,
         }
  
  
  
    
    @@ -4,7 +4,7 @@ pub(crate) struct ReversibleIterable<It> {
 }
 
 impl<T> ReversibleIterable<T> {
-    pub(crate) fn new(it: T, reverse: bool) -> Self {
+    pub(crate) const fn new(it: T, reverse: bool) -> Self {
         Self { it, reverse }
     }
 }
  
  
  
    
    @@ -63,7 +63,7 @@ impl PromptId {
         UserPromptId::new().into()
     }
 
-    pub fn is_built_in(&self) -> bool {
+    pub const fn is_built_in(&self) -> bool {
         !matches!(self, PromptId::User { .. })
     }
 }
  
  
  
    
    @@ -832,7 +832,7 @@ pub fn split_repository_update(
 }
 
 impl LspQuery {
-    pub fn query_name_and_write_permissions(&self) -> (&str, bool) {
+    pub const fn query_name_and_write_permissions(&self) -> (&str, bool) {
         match self.request {
             Some(lsp_query::Request::GetHover(_)) => ("GetHover", false),
             Some(lsp_query::Request::GetCodeActions(_)) => ("GetCodeActions", true),
  
  
  
    
    @@ -127,13 +127,13 @@ impl<T: EnvelopedMessage> AnyTypedEnvelope for TypedEnvelope<T> {
 }
 
 impl PeerId {
-    pub fn from_u64(peer_id: u64) -> Self {
+    pub const fn from_u64(peer_id: u64) -> Self {
         let owner_id = (peer_id >> 32) as u32;
         let id = peer_id as u32;
         Self { owner_id, id }
     }
 
-    pub fn as_u64(self) -> u64 {
+    pub const fn as_u64(self) -> u64 {
         ((self.owner_id as u64) << 32) | (self.id as u64)
     }
 }
@@ -200,7 +200,7 @@ impl<T> TypedEnvelope<T> {
 }
 
 impl<T: RequestMessage> TypedEnvelope<T> {
-    pub fn receipt(&self) -> Receipt<T> {
+    pub const fn receipt(&self) -> Receipt<T> {
         Receipt {
             sender_id: self.sender_id,
             message_id: self.message_id,
  
  
  
    
    @@ -418,7 +418,7 @@ enum RemoteEntry {
 }
 
 impl RemoteEntry {
-    fn is_from_zed(&self) -> bool {
+    const fn is_from_zed(&self) -> bool {
         matches!(self, Self::Project { .. })
     }
 
@@ -538,7 +538,7 @@ enum ViewServerOptionsState {
 }
 
 impl ViewServerOptionsState {
-    fn entries(&self) -> &[NavigableEntry] {
+    const fn entries(&self) -> &[NavigableEntry] {
         match self {
             Self::Ssh { entries, .. } => entries,
             Self::Wsl { entries, .. } => entries,
  
  
  
    
    @@ -44,7 +44,7 @@ impl Global for GlobalAppCommitSha {}
 
 impl AppCommitSha {
     /// Creates a new [`AppCommitSha`].
-    pub fn new(sha: String) -> Self {
+    pub const fn new(sha: String) -> Self {
         AppCommitSha(sha)
     }
 
@@ -139,12 +139,12 @@ impl ReleaseChannel {
     }
 
     /// Returns whether we want to poll for updates for this [`ReleaseChannel`]
-    pub fn poll_for_updates(&self) -> bool {
+    pub const fn poll_for_updates(&self) -> bool {
         !matches!(self, ReleaseChannel::Dev)
     }
 
     /// Returns the display name for this [`ReleaseChannel`].
-    pub fn display_name(&self) -> &'static str {
+    pub const fn display_name(&self) -> &'static str {
         match self {
             ReleaseChannel::Dev => "Zed Dev",
             ReleaseChannel::Nightly => "Zed Nightly",
@@ -154,7 +154,7 @@ impl ReleaseChannel {
     }
 
     /// Returns the programmatic name for this [`ReleaseChannel`].
-    pub fn dev_name(&self) -> &'static str {
+    pub const fn dev_name(&self) -> &'static str {
         match self {
             ReleaseChannel::Dev => "dev",
             ReleaseChannel::Nightly => "nightly",
@@ -166,7 +166,7 @@ impl ReleaseChannel {
     /// Returns the application ID that's used by Wayland as application ID
     /// and WM_CLASS on X11.
     /// This also has to match the bundle identifier for Zed on macOS.
-    pub fn app_id(&self) -> &'static str {
+    pub const fn app_id(&self) -> &'static str {
         match self {
             ReleaseChannel::Dev => "dev.zed.Zed-Dev",
             ReleaseChannel::Nightly => "dev.zed.Zed-Nightly",
@@ -176,7 +176,7 @@ impl ReleaseChannel {
     }
 
     /// Returns the query parameter for this [`ReleaseChannel`].
-    pub fn release_query_param(&self) -> Option<&'static str> {
+    pub const fn release_query_param(&self) -> Option<&'static str> {
         match self {
             Self::Dev => None,
             Self::Nightly => Some("nightly=1"),
  
  
  
    
    @@ -37,7 +37,7 @@ impl<'a> LogRecord<'a> {
     }
 }
 
-fn serialize_level(level: Level) -> usize {
+const fn serialize_level(level: Level) -> usize {
     match level {
         Level::Error => 1,
         Level::Warn => 2,
@@ -47,7 +47,7 @@ fn serialize_level(level: Level) -> usize {
     }
 }
 
-fn deserialize_level(level: usize) -> Option<Level> {
+const fn deserialize_level(level: usize) -> Option<Level> {
     match level {
         1 => Some(Level::Error),
         2 => Some(Level::Warn),
  
  
  
    
    @@ -7,7 +7,7 @@ pub enum ProxyLaunchError {
 }
 
 impl ProxyLaunchError {
-    pub fn to_exit_code(&self) -> i32 {
+    pub const fn to_exit_code(&self) -> i32 {
         match self {
             // We're using 90 as the exit code, because 0-78 are often taken
             // by shells and other conventions and >128 also has certain meanings
@@ -16,7 +16,7 @@ impl ProxyLaunchError {
         }
     }
 
-    pub fn from_exit_code(exit_code: i32) -> Option<Self> {
+    pub const fn from_exit_code(exit_code: i32) -> Option<Self> {
         match exit_code {
             90 => Some(Self::ServerNotRunning),
             _ => None,
  
  
  
    
    @@ -147,7 +147,7 @@ impl State {
         }
     }
 
-    fn can_reconnect(&self) -> bool {
+    const fn can_reconnect(&self) -> bool {
         match self {
             Self::Connected { .. }
             | Self::HeartbeatMissed { .. }
@@ -159,19 +159,19 @@ impl State {
         }
     }
 
-    fn is_reconnect_failed(&self) -> bool {
+    const fn is_reconnect_failed(&self) -> bool {
         matches!(self, Self::ReconnectFailed { .. })
     }
 
-    fn is_reconnect_exhausted(&self) -> bool {
+    const fn is_reconnect_exhausted(&self) -> bool {
         matches!(self, Self::ReconnectExhausted { .. })
     }
 
-    fn is_server_not_running(&self) -> bool {
+    const fn is_server_not_running(&self) -> bool {
         matches!(self, Self::ServerNotRunning)
     }
 
-    fn is_reconnecting(&self) -> bool {
+    const fn is_reconnecting(&self) -> bool {
         matches!(self, Self::Reconnecting { .. })
     }
 
@@ -880,7 +880,7 @@ impl RemoteClient {
         self.connection_state() == ConnectionState::Disconnected
     }
 
-    pub fn path_style(&self) -> PathStyle {
+    pub const fn path_style(&self) -> PathStyle {
         self.path_style
     }
 
  
  
  
    
    @@ -789,7 +789,7 @@ impl HeadlessProject {
     }
 }
 
-fn prompt_to_proto(
+const fn prompt_to_proto(
     prompt: &project::LanguageServerPromptRequest,
 ) -> proto::language_server_prompt_request::Level {
     match prompt.level {
  
  
  
    
    @@ -12,7 +12,7 @@ pub struct KernelListItem {
 }
 
 impl KernelListItem {
-    pub fn new(kernel_specification: KernelSpecification) -> Self {
+    pub const fn new(kernel_specification: KernelSpecification) -> Self {
         Self {
             kernel_specification,
             status_color: Color::Disabled,
@@ -21,7 +21,7 @@ impl KernelListItem {
         }
     }
 
-    pub fn status_color(mut self, color: Color) -> Self {
+    pub const fn status_color(mut self, color: Color) -> Self {
         self.status_color = color;
         self
     }
  
  
  
    
    @@ -178,7 +178,7 @@ pub enum KernelStatus {
 }
 
 impl KernelStatus {
-    pub fn is_connected(&self) -> bool {
+    pub const fn is_connected(&self) -> bool {
         matches!(self, KernelStatus::Idle | KernelStatus::Busy)
     }
 }
@@ -240,7 +240,7 @@ impl Kernel {
         }
     }
 
-    pub fn is_shutting_down(&self) -> bool {
+    pub const fn is_shutting_down(&self) -> bool {
         match self {
             Kernel::Restarting | Kernel::ShuttingDown => true,
             Kernel::RunningKernel(_)
  
  
  
    
    @@ -36,7 +36,7 @@ pub enum CellControlType {
 }
 
 impl CellControlType {
-    fn icon_name(&self) -> IconName {
+    const fn icon_name(&self) -> IconName {
         match self {
             CellControlType::RunCell => IconName::PlayFilled,
             CellControlType::RerunCell => IconName::ArrowCircle,
@@ -444,7 +444,7 @@ impl CodeCell {
     pub fn is_dirty(&self, cx: &App) -> bool {
         self.editor.read(cx).buffer().read(cx).is_dirty(cx)
     }
-    pub fn has_outputs(&self) -> bool {
+    pub const fn has_outputs(&self) -> bool {
         !self.outputs.is_empty()
     }
 
@@ -452,7 +452,7 @@ impl CodeCell {
         self.outputs.clear();
     }
 
-    fn output_control(&self) -> Option<CellControlType> {
+    const fn output_control(&self) -> Option<CellControlType> {
         if self.has_outputs() {
             Some(CellControlType::ClearCell)
         } else {
  
  
  
    
    @@ -189,7 +189,7 @@ impl NotebookEditor {
         self.cell_map.len()
     }
 
-    fn selected_index(&self) -> usize {
+    const fn selected_index(&self) -> usize {
         self.selected_cell_index
     }
 
  
  
  
    
    @@ -58,7 +58,7 @@ use user_error::ErrorView;
 use workspace::Workspace;
 
 /// When deciding what to render from a collection of mediatypes, we need to rank them in order of importance
-fn rank_mime_type(mimetype: &MimeType) -> usize {
+const fn rank_mime_type(mimetype: &MimeType) -> usize {
     match mimetype {
         MimeType::DataTable(_) => 6,
         MimeType::Png(_) => 4,
  
  
  
    
    @@ -67,7 +67,7 @@ impl ReplStore {
         &self.fs
     }
 
-    pub fn is_enabled(&self) -> bool {
+    pub const fn is_enabled(&self) -> bool {
         self.enabled
     }
 
  
  
  
    
    @@ -79,7 +79,7 @@ impl Chunk {
     }
 
     #[inline(always)]
-    pub fn chars(&self) -> u128 {
+    pub const fn chars(&self) -> u128 {
         self.chars
     }
 }
@@ -107,17 +107,17 @@ impl Into<Chunk> for ChunkSlice<'_> {
 
 impl<'a> ChunkSlice<'a> {
     #[inline(always)]
-    pub fn is_empty(&self) -> bool {
+    pub const fn is_empty(&self) -> bool {
         self.text.is_empty()
     }
 
     #[inline(always)]
-    pub fn is_char_boundary(self, offset: usize) -> bool {
+    pub const fn is_char_boundary(self, offset: usize) -> bool {
         self.text.is_char_boundary(offset)
     }
 
     #[inline(always)]
-    pub fn split_at(self, mid: usize) -> (ChunkSlice<'a>, ChunkSlice<'a>) {
+    pub const fn split_at(self, mid: usize) -> (ChunkSlice<'a>, ChunkSlice<'a>) {
         if mid == MAX_BASE {
             let left = self;
             let right = ChunkSlice {
@@ -206,19 +206,19 @@ impl<'a> ChunkSlice<'a> {
 
     /// Get length in bytes
     #[inline(always)]
-    pub fn len(&self) -> usize {
+    pub const fn len(&self) -> usize {
         self.text.len()
     }
 
     /// Get length in UTF-16 code units
     #[inline(always)]
-    pub fn len_utf16(&self) -> OffsetUtf16 {
+    pub const fn len_utf16(&self) -> OffsetUtf16 {
         OffsetUtf16(self.chars_utf16.count_ones() as usize)
     }
 
     /// Get point representing number of lines and length of last line
     #[inline(always)]
-    pub fn lines(&self) -> Point {
+    pub const fn lines(&self) -> Point {
         let row = self.newlines.count_ones();
         let column = self.newlines.leading_zeros() - (u128::BITS - self.text.len() as u32);
         Point::new(row, column)
@@ -226,7 +226,7 @@ impl<'a> ChunkSlice<'a> {
 
     /// Get number of chars in first line
     #[inline(always)]
-    pub fn first_line_chars(&self) -> u32 {
+    pub const fn first_line_chars(&self) -> u32 {
         if self.newlines == 0 {
             self.chars.count_ones()
         } else {
@@ -237,7 +237,7 @@ impl<'a> ChunkSlice<'a> {
 
     /// Get number of chars in last line
     #[inline(always)]
-    pub fn last_line_chars(&self) -> u32 {
+    pub const fn last_line_chars(&self) -> u32 {
         if self.newlines == 0 {
             self.chars.count_ones()
         } else {
@@ -248,7 +248,7 @@ impl<'a> ChunkSlice<'a> {
 
     /// Get number of UTF-16 code units in last line
     #[inline(always)]
-    pub fn last_line_len_utf16(&self) -> u32 {
+    pub const fn last_line_len_utf16(&self) -> u32 {
         if self.newlines == 0 {
             self.chars_utf16.count_ones()
         } else {
@@ -294,7 +294,7 @@ impl<'a> ChunkSlice<'a> {
     }
 
     #[inline(always)]
-    pub fn offset_to_point(&self, offset: usize) -> Point {
+    pub const fn offset_to_point(&self, offset: usize) -> Point {
         let mask = if offset == MAX_BASE {
             u128::MAX
         } else {
@@ -331,7 +331,7 @@ impl<'a> ChunkSlice<'a> {
     }
 
     #[inline(always)]
-    pub fn offset_to_offset_utf16(&self, offset: usize) -> OffsetUtf16 {
+    pub const fn offset_to_offset_utf16(&self, offset: usize) -> OffsetUtf16 {
         let mask = if offset == MAX_BASE {
             u128::MAX
         } else {
@@ -359,7 +359,7 @@ impl<'a> ChunkSlice<'a> {
     }
 
     #[inline(always)]
-    pub fn offset_to_point_utf16(&self, offset: usize) -> PointUtf16 {
+    pub const fn offset_to_point_utf16(&self, offset: usize) -> PointUtf16 {
         let mask = if offset == MAX_BASE {
             u128::MAX
         } else {
@@ -536,7 +536,7 @@ impl<'a> ChunkSlice<'a> {
     }
 
     #[inline(always)]
-    pub fn tabs(&self) -> Tabs {
+    pub const fn tabs(&self) -> Tabs {
         Tabs {
             tabs: self.tabs,
             chars: self.chars,
@@ -581,7 +581,7 @@ impl Iterator for Tabs {
 
 /// Finds the n-th bit that is set to 1.
 #[inline(always)]
-fn nth_set_bit(v: u128, n: usize) -> usize {
+const fn nth_set_bit(v: u128, n: usize) -> usize {
     let low = v as u64;
     let high = (v >> 64) as u64;
 
@@ -594,7 +594,7 @@ fn nth_set_bit(v: u128, n: usize) -> usize {
 }
 
 #[inline(always)]
-fn nth_set_bit_u64(v: u64, mut n: u64) -> u64 {
+const fn nth_set_bit_u64(v: u64, mut n: u64) -> u64 {
     let v = v.reverse_bits();
     let mut s: u64 = 64;
 
  
  
  
    
    @@ -16,11 +16,11 @@ impl Point {
         column: u32::MAX,
     };
 
-    pub fn new(row: u32, column: u32) -> Self {
+    pub const fn new(row: u32, column: u32) -> Self {
         Point { row, column }
     }
 
-    pub fn row_range(range: Range<u32>) -> Range<Self> {
+    pub const fn row_range(range: Range<u32>) -> Range<Self> {
         Point {
             row: range.start,
             column: 0,
@@ -30,7 +30,7 @@ impl Point {
         }
     }
 
-    pub fn zero() -> Self {
+    pub const fn zero() -> Self {
         Point::new(0, 0)
     }
 
@@ -43,7 +43,7 @@ impl Point {
         point
     }
 
-    pub fn is_zero(&self) -> bool {
+    pub const fn is_zero(&self) -> bool {
         self.row == 0 && self.column == 0
     }
 
  
  
  
    
    @@ -15,15 +15,15 @@ impl PointUtf16 {
         column: u32::MAX,
     };
 
-    pub fn new(row: u32, column: u32) -> Self {
+    pub const fn new(row: u32, column: u32) -> Self {
         PointUtf16 { row, column }
     }
 
-    pub fn zero() -> Self {
+    pub const fn zero() -> Self {
         PointUtf16::new(0, 0)
     }
 
-    pub fn is_zero(&self) -> bool {
+    pub const fn is_zero(&self) -> bool {
         self.row == 0 && self.column == 0
     }
 
  
  
  
    
    @@ -648,7 +648,7 @@ impl<'a> Cursor<'a> {
         self.slice(self.rope.chunks.extent(()))
     }
 
-    pub fn offset(&self) -> usize {
+    pub const fn offset(&self) -> usize {
         self.offset
     }
 }
@@ -694,7 +694,7 @@ impl<'a> Chunks<'a> {
         }
     }
 
-    fn offset_is_valid(&self) -> bool {
+    const fn offset_is_valid(&self) -> bool {
         if self.reversed {
             if self.offset <= self.range.start || self.offset > self.range.end {
                 return false;
@@ -706,7 +706,7 @@ impl<'a> Chunks<'a> {
         true
     }
 
-    pub fn offset(&self) -> usize {
+    pub const fn offset(&self) -> usize {
         self.offset
     }
 
@@ -914,7 +914,7 @@ impl<'a> Chunks<'a> {
         })
     }
 
-    pub fn lines(self) -> Lines<'a> {
+    pub const fn lines(self) -> Lines<'a> {
         let reversed = self.reversed;
         Lines {
             chunks: self,
@@ -1147,7 +1147,7 @@ impl<'a> Lines<'a> {
         self.done = false;
     }
 
-    pub fn offset(&self) -> usize {
+    pub const fn offset(&self) -> usize {
         self.chunks.offset()
     }
 }
@@ -1204,14 +1204,14 @@ pub struct TextSummary {
 }
 
 impl TextSummary {
-    pub fn lines_utf16(&self) -> PointUtf16 {
+    pub const fn lines_utf16(&self) -> PointUtf16 {
         PointUtf16 {
             row: self.lines.row,
             column: self.last_line_len_utf16,
         }
     }
 
-    pub fn newline() -> Self {
+    pub const fn newline() -> Self {
         Self {
             len: 1,
             chars: 1,
  
  
  
    
    @@ -27,7 +27,7 @@ pub enum Message {
 }
 
 impl<S> MessageStream<S> {
-    pub fn new(stream: S) -> Self {
+    pub const fn new(stream: S) -> Self {
         Self {
             stream,
             encoding_buffer: Vec::new(),
  
  
  
    
    @@ -65,7 +65,7 @@ impl Notification {
         serde_json::from_value(value).ok()
     }
 
-    pub fn all_variant_names() -> &'static [&'static str] {
+    pub const fn all_variant_names() -> &'static [&'static str] {
         Self::VARIANTS
     }
 }
  
  
  
    
    @@ -126,7 +126,7 @@ enum TaskState<T> {
 
 impl<T> Task<T> {
     /// Creates a new task that will resolve with the value
-    pub fn ready(val: T) -> Self {
+    pub const fn ready(val: T) -> Self {
         Task(TaskState::Ready(Some(val)))
     }
 
  
  
  
    
    @@ -38,7 +38,7 @@ pub trait Scheduler: Send + Sync {
 pub struct SessionId(u16);
 
 impl SessionId {
-    pub fn new(id: u16) -> Self {
+    pub const fn new(id: u16) -> Self {
         SessionId(id)
     }
 }
@@ -46,7 +46,7 @@ impl SessionId {
 pub struct Timer(oneshot::Receiver<()>);
 
 impl Timer {
-    pub fn new(rx: oneshot::Receiver<()>) -> Self {
+    pub const fn new(rx: oneshot::Receiver<()>) -> Self {
         Timer(rx)
     }
 }
  
  
  
    
    @@ -74,7 +74,7 @@ actions!(
 );
 
 impl Deploy {
-    pub fn find() -> Self {
+    pub const fn find() -> Self {
         Self {
             focus: true,
             replace_enabled: false,
@@ -82,7 +82,7 @@ impl Deploy {
         }
     }
 
-    pub fn replace() -> Self {
+    pub const fn replace() -> Self {
         Self {
             focus: true,
             replace_enabled: true,
@@ -127,7 +127,7 @@ pub struct BufferSearchBar {
 }
 
 impl BufferSearchBar {
-    pub fn query_editor_focused(&self) -> bool {
+    pub const fn query_editor_focused(&self) -> bool {
         self.query_editor_focused
     }
 }
@@ -683,7 +683,7 @@ impl BufferSearchBar {
         }
     }
 
-    pub fn is_dismissed(&self) -> bool {
+    pub const fn is_dismissed(&self) -> bool {
         self.dismissed
     }
 
@@ -915,7 +915,7 @@ impl BufferSearchBar {
         cx.notify();
     }
 
-    pub fn has_search_option(&mut self, search_option: SearchOptions) -> bool {
+    pub const fn has_search_option(&mut self, search_option: SearchOptions) -> bool {
         self.search_options.contains(search_option)
     }
 
@@ -1169,7 +1169,7 @@ impl BufferSearchBar {
         }
     }
 
-    pub fn has_active_match(&self) -> bool {
+    pub const fn has_active_match(&self) -> bool {
         self.active_match_index.is_some()
     }
 
@@ -1303,7 +1303,7 @@ impl BufferSearchBar {
         done_rx
     }
 
-    fn reverse_direction_if_backwards(&self, direction: Direction) -> Direction {
+    const fn reverse_direction_if_backwards(&self, direction: Direction) -> Direction {
         if self.search_options.contains(SearchOptions::BACKWARDS) {
             direction.opposite()
         } else {
  
  
  
    
    @@ -269,14 +269,14 @@ impl ProjectSearch {
             search_excluded_history_cursor: self.search_excluded_history_cursor.clone(),
         })
     }
-    fn cursor(&self, kind: SearchInputKind) -> &SearchHistoryCursor {
+    const fn cursor(&self, kind: SearchInputKind) -> &SearchHistoryCursor {
         match kind {
             SearchInputKind::Query => &self.search_history_cursor,
             SearchInputKind::Include => &self.search_included_history_cursor,
             SearchInputKind::Exclude => &self.search_excluded_history_cursor,
         }
     }
-    fn cursor_mut(&mut self, kind: SearchInputKind) -> &mut SearchHistoryCursor {
+    const fn cursor_mut(&mut self, kind: SearchInputKind) -> &mut SearchHistoryCursor {
         match kind {
             SearchInputKind::Query => &mut self.search_history_cursor,
             SearchInputKind::Include => &mut self.search_included_history_cursor,
@@ -654,7 +654,7 @@ impl ProjectSearchView {
         });
     }
 
-    fn current_settings(&self) -> ProjectSearchSettings {
+    const fn current_settings(&self) -> ProjectSearchSettings {
         ProjectSearchSettings {
             search_options: self.search_options,
             filters_enabled: self.filters_enabled,
@@ -672,7 +672,7 @@ impl ProjectSearchView {
         self.adjust_query_regex_language(cx);
     }
 
-    fn toggle_opened_only(&mut self, _window: &mut Window, _cx: &mut Context<Self>) {
+    const fn toggle_opened_only(&mut self, _window: &mut Window, _cx: &mut Context<Self>) {
         self.included_opened_only = !self.included_opened_only;
     }
 
@@ -1440,7 +1440,7 @@ impl ProjectSearchView {
         }
     }
 
-    pub fn has_matches(&self) -> bool {
+    pub const fn has_matches(&self) -> bool {
         self.active_match_index.is_some()
     }
 
@@ -1605,7 +1605,7 @@ impl Default for ProjectSearchBar {
 }
 
 impl ProjectSearchBar {
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         Self {
             active_project_search: None,
             subscription: None,
  
  
  
    
    @@ -91,11 +91,11 @@ pub(crate) enum SearchSource<'a, 'b> {
 }
 
 impl SearchOption {
-    pub fn as_options(&self) -> SearchOptions {
+    pub const fn as_options(&self) -> SearchOptions {
         SearchOptions::from_bits(1 << *self as u8).unwrap()
     }
 
-    pub fn label(&self) -> &'static str {
+    pub const fn label(&self) -> &'static str {
         match self {
             SearchOption::WholeWord => "Match Whole Words",
             SearchOption::CaseSensitive => "Match Case Sensitivity",
@@ -165,7 +165,7 @@ impl SearchOption {
 }
 
 impl SearchOptions {
-    pub fn none() -> SearchOptions {
+    pub const fn none() -> SearchOptions {
         SearchOptions::NONE
     }
 
  
  
  
    
    @@ -8,7 +8,7 @@ pub const SEARCH_ICON: IconName = IconName::MagnifyingGlass;
 pub struct SearchButton;
 
 impl SearchButton {
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         Self {}
     }
 }
  
  
  
    
    @@ -30,19 +30,19 @@ impl SemanticVersion {
 
     /// Returns the major version number.
     #[inline(always)]
-    pub fn major(&self) -> usize {
+    pub const fn major(&self) -> usize {
         self.major
     }
 
     /// Returns the minor version number.
     #[inline(always)]
-    pub fn minor(&self) -> usize {
+    pub const fn minor(&self) -> usize {
         self.minor
     }
 
     /// Returns the patch version number.
     #[inline(always)]
-    pub fn patch(&self) -> usize {
+    pub const fn patch(&self) -> usize {
         self.patch
     }
 }
  
  
  
    
    @@ -87,7 +87,7 @@ impl BaseKeymap {
         ("Cursor", Self::Cursor),
     ];
 
-    pub fn asset_path(&self) -> Option<&'static str> {
+    pub const fn asset_path(&self) -> Option<&'static str> {
         #[cfg(target_os = "macos")]
         match self {
             BaseKeymap::JetBrains => Some("keymaps/macos/jetbrains.json"),
  
  
  
    
    @@ -944,7 +944,7 @@ impl KeybindUpdateOperation<'_> {
 }
 
 impl<'a> KeybindUpdateOperation<'a> {
-    pub fn add(source: KeybindUpdateTarget<'a>) -> Self {
+    pub const fn add(source: KeybindUpdateTarget<'a>) -> Self {
         Self::Add { source, from: None }
     }
 }
@@ -1014,7 +1014,7 @@ impl KeybindSource {
     const VIM: KeyBindingMetaIndex = KeyBindingMetaIndex(KeybindSource::Vim as u32);
     const USER: KeyBindingMetaIndex = KeyBindingMetaIndex(KeybindSource::User as u32);
 
-    pub fn name(&self) -> &'static str {
+    pub const fn name(&self) -> &'static str {
         match self {
             KeybindSource::User => "User",
             KeybindSource::Default => "Default",
@@ -1024,7 +1024,7 @@ impl KeybindSource {
         }
     }
 
-    pub fn meta(&self) -> KeyBindingMetaIndex {
+    pub const fn meta(&self) -> KeyBindingMetaIndex {
         match self {
             KeybindSource::User => Self::USER,
             KeybindSource::Default => Self::DEFAULT,
@@ -1034,7 +1034,7 @@ impl KeybindSource {
         }
     }
 
-    pub fn from_meta(index: KeyBindingMetaIndex) -> Self {
+    pub const fn from_meta(index: KeyBindingMetaIndex) -> Self {
         match index {
             Self::USER => KeybindSource::User,
             Self::BASE => KeybindSource::Base,
  
  
  
    
    @@ -47,19 +47,19 @@ impl From<WorktreeId> for usize {
 }
 
 impl WorktreeId {
-    pub fn from_usize(handle_id: usize) -> Self {
+    pub const fn from_usize(handle_id: usize) -> Self {
         Self(handle_id)
     }
 
-    pub fn from_proto(id: u64) -> Self {
+    pub const fn from_proto(id: u64) -> Self {
         Self(id as usize)
     }
 
-    pub fn to_proto(self) -> u64 {
+    pub const fn to_proto(self) -> u64 {
         self.0 as u64
     }
 
-    pub fn to_usize(self) -> usize {
+    pub const fn to_usize(self) -> usize {
         self.0
     }
 }
  
  
  
    
    @@ -164,7 +164,7 @@ pub struct SettingsContent {
 }
 
 impl SettingsContent {
-    pub fn languages_mut(&mut self) -> &mut HashMap<SharedString, LanguageSettingsContent> {
+    pub const fn languages_mut(&mut self) -> &mut HashMap<SharedString, LanguageSettingsContent> {
         &mut self.project.all_languages.languages.0
     }
 }
  
  
  
    
    @@ -112,7 +112,7 @@ pub struct AgentSettingsContent {
 }
 
 impl AgentSettingsContent {
-    pub fn set_dock(&mut self, dock: DockPosition) {
+    pub const fn set_dock(&mut self, dock: DockPosition) {
         self.dock = Some(dock);
     }
 
@@ -147,19 +147,19 @@ impl AgentSettingsContent {
         });
     }
 
-    pub fn set_always_allow_tool_actions(&mut self, allow: bool) {
+    pub const fn set_always_allow_tool_actions(&mut self, allow: bool) {
         self.always_allow_tool_actions = Some(allow);
     }
 
-    pub fn set_play_sound_when_agent_done(&mut self, allow: bool) {
+    pub const fn set_play_sound_when_agent_done(&mut self, allow: bool) {
         self.play_sound_when_agent_done = Some(allow);
     }
 
-    pub fn set_single_file_review(&mut self, allow: bool) {
+    pub const fn set_single_file_review(&mut self, allow: bool) {
         self.single_file_review = Some(allow);
     }
 
-    pub fn set_use_modifier_to_send(&mut self, always_use: bool) {
+    pub const fn set_use_modifier_to_send(&mut self, always_use: bool) {
         self.use_modifier_to_send = Some(always_use);
     }
 
  
  
  
    
    @@ -82,7 +82,7 @@ pub enum EditPredictionProvider {
 }
 
 impl EditPredictionProvider {
-    pub fn is_zed(&self) -> bool {
+    pub const fn is_zed(&self) -> bool {
         match self {
             EditPredictionProvider::Zed => true,
             EditPredictionProvider::None
@@ -504,7 +504,7 @@ impl InlayHintKind {
     }
 
     /// Returns the name of this [`InlayHintKind`].
-    pub fn name(&self) -> &'static str {
+    pub const fn name(&self) -> &'static str {
         match self {
             InlayHintKind::Type => "type",
             InlayHintKind::Parameter => "parameter",
  
  
  
    
    @@ -123,7 +123,7 @@ pub enum KeepAlive {
 
 impl KeepAlive {
     /// Keep model alive until a new model is loaded or until Ollama shuts down
-    pub fn indefinite() -> Self {
+    pub const fn indefinite() -> Self {
         Self::Seconds(-1)
     }
 }
@@ -398,7 +398,7 @@ impl Default for DataCollection {
     }
 }
 
-fn default_true() -> bool {
+const fn default_true() -> bool {
     true
 }
 
  
  
  
    
    @@ -195,7 +195,7 @@ pub enum ContextServerSettingsContent {
     },
 }
 impl ContextServerSettingsContent {
-    pub fn set_enabled(&mut self, enabled: bool) {
+    pub const fn set_enabled(&mut self, enabled: bool) {
         match self {
             ContextServerSettingsContent::Custom {
                 enabled: custom_enabled,
  
  
  
    
    @@ -238,7 +238,7 @@ pub enum UiDensity {
 impl UiDensity {
     /// The spacing ratio of a given density.
     /// TODO: Standardize usage throughout the app or remove
-    pub fn spacing_ratio(self) -> f32 {
+    pub const fn spacing_ratio(self) -> f32 {
         match self {
             UiDensity::Compact => 0.75,
             UiDensity::Default => 1.0,
@@ -879,7 +879,7 @@ pub struct HighlightStyleContent {
 }
 
 impl HighlightStyleContent {
-    pub fn is_empty(&self) -> bool {
+    pub const fn is_empty(&self) -> bool {
         self.color.is_none()
             && self.background_color.is_none()
             && self.font_style.is_none()
  
  
  
    
    @@ -311,7 +311,7 @@ pub enum CloseWindowWhenNoItems {
 }
 
 impl CloseWindowWhenNoItems {
-    pub fn should_close(&self) -> bool {
+    pub const fn should_close(&self) -> bool {
         match self {
             CloseWindowWhenNoItems::PlatformDefault => cfg!(target_os = "macos"),
             CloseWindowWhenNoItems::CloseWindow => true,
@@ -394,7 +394,7 @@ pub enum AutosaveSetting {
 }
 
 impl AutosaveSetting {
-    pub fn should_save_on_close(&self) -> bool {
+    pub const fn should_save_on_close(&self) -> bool {
         matches!(
             &self,
             AutosaveSetting::OnFocusChange
@@ -481,7 +481,7 @@ pub enum OnLastWindowClosed {
 }
 
 impl OnLastWindowClosed {
-    pub fn is_quit_app(&self) -> bool {
+    pub const fn is_quit_app(&self) -> bool {
         match self {
             OnLastWindowClosed::PlatformDefault => false,
             OnLastWindowClosed::QuitApp => true,
  
  
  
    
    @@ -318,7 +318,7 @@ impl SettingsStore {
     ///
     /// For user-facing functionality use the typed setting interface.
     /// (e.g. ProjectSettings::get_global(cx))
-    pub fn raw_user_settings(&self) -> Option<&UserSettingsContent> {
+    pub const fn raw_user_settings(&self) -> Option<&UserSettingsContent> {
         self.user_settings.as_ref()
     }
 
  
  
  
    
    @@ -28,7 +28,7 @@ impl SettingsEditor {
         self
     }
 
-    pub fn with_placeholder(mut self, placeholder: &'static str) -> Self {
+    pub const fn with_placeholder(mut self, placeholder: &'static str) -> Self {
         self.placeholder = Some(placeholder);
         self
     }
@@ -38,7 +38,7 @@ impl SettingsEditor {
         self
     }
 
-    pub(crate) fn tab_index(mut self, arg: isize) -> Self {
+    pub(crate) const fn tab_index(mut self, arg: isize) -> Self {
         self.tab_index = Some(arg);
         self
     }
  
  
  
    
    @@ -893,7 +893,7 @@ impl std::ops::BitOr for FileMask {
 }
 
 impl FileMask {
-    fn contains(&self, other: FileMask) -> bool {
+    const fn contains(&self, other: FileMask) -> bool {
         self.0 & other.0 != 0
     }
 }
@@ -951,11 +951,11 @@ enum SettingsUiFile {
 }
 
 impl SettingsUiFile {
-    fn is_server(&self) -> bool {
+    const fn is_server(&self) -> bool {
         matches!(self, SettingsUiFile::Server(_))
     }
 
-    fn worktree_id(&self) -> Option<WorktreeId> {
+    const fn worktree_id(&self) -> Option<WorktreeId> {
         match self {
             SettingsUiFile::User => None,
             SettingsUiFile::Project((worktree_id, _)) => Some(*worktree_id),
@@ -980,7 +980,7 @@ impl SettingsUiFile {
         }
     }
 
-    fn mask(&self) -> FileMask {
+    const fn mask(&self) -> FileMask {
         match self {
             SettingsUiFile::User => USER,
             SettingsUiFile::Project(_) => LOCAL,
@@ -2478,7 +2478,7 @@ impl SettingsWindow {
         self.navbar_entries[index].page_index
     }
 
-    fn is_navbar_entry_selected(&self, ix: usize) -> bool {
+    const fn is_navbar_entry_selected(&self, ix: usize) -> bool {
         ix == self.navbar_entry
     }
 
  
  
  
    
    @@ -60,7 +60,7 @@ impl Connection {
         Self::open(&in_memory_path, false).expect("Could not create fallback in memory db")
     }
 
-    pub fn persistent(&self) -> bool {
+    pub const fn persistent(&self) -> bool {
         self.persistent
     }
 
  
  
  
    
    @@ -49,14 +49,14 @@ impl<M: Migrator> ThreadSafeConnectionBuilder<M> {
     /// Sets the query to run every time a connection is opened. This must
     /// be infallible (EG only use pragma statements) and not cause writes.
     /// to the db or it will panic.
-    pub fn with_connection_initialize_query(mut self, initialize_query: &'static str) -> Self {
+    pub const fn with_connection_initialize_query(mut self, initialize_query: &'static str) -> Self {
         self.connection.connection_initialize_query = Some(initialize_query);
         self
     }
 
     /// Queues an initialization query for the database file. This must be infallible
     /// but may cause changes to the database file such as with `PRAGMA journal_mode`
-    pub fn with_db_initialization_query(mut self, initialize_query: &'static str) -> Self {
+    pub const fn with_db_initialization_query(mut self, initialize_query: &'static str) -> Self {
         self.db_initialize_query = Some(initialize_query);
         self
     }
  
  
  
    
    @@ -14,7 +14,7 @@ pub struct UnboundedSyncSender<T: Send> {
 }
 
 impl<T: Send> UnboundedSyncSender<T> {
-    pub fn new(sender: Sender<T>) -> Self {
+    pub const fn new(sender: Sender<T>) -> Self {
         Self {
             cloneable_sender: Mutex::new(sender),
             local_senders: ThreadLocal::new(),
  
  
  
    
    @@ -117,7 +117,7 @@ pub struct StoryWrapper {
 }
 
 impl StoryWrapper {
-    pub(crate) fn new(story: AnyView) -> Self {
+    pub(crate) const fn new(story: AnyView) -> Self {
         Self { story }
     }
 }
  
  
  
    
    @@ -15,7 +15,7 @@ struct Matrix {
 }
 
 impl Matrix {
-    fn new() -> Self {
+    const fn new() -> Self {
         Self {
             cells: Vec::new(),
             rows: 0,
@@ -492,7 +492,7 @@ impl LineDiff {
     }
 }
 
-fn is_line_start(point: Point) -> bool {
+const fn is_line_start(point: Point) -> bool {
     point.column == 0
 }
 
  
  
  
    
    @@ -11,7 +11,7 @@ struct StackEntry<'a, T: Item, D> {
 
 impl<'a, T: Item, D> StackEntry<'a, T, D> {
     #[inline]
-    fn index(&self) -> usize {
+    const fn index(&self) -> usize {
         self.index as usize
     }
 }
@@ -78,7 +78,7 @@ where
         self.position = D::zero(self.cx);
     }
 
-    pub fn start(&self) -> &D {
+    pub const fn start(&self) -> &D {
         &self.position
     }
 
@@ -655,7 +655,7 @@ where
         }
     }
 
-    pub fn start(&self) -> &D {
+    pub const fn start(&self) -> &D {
         self.cursor.start()
     }
 
@@ -799,7 +799,7 @@ where
 struct End<D>(PhantomData<D>);
 
 impl<D> End<D> {
-    fn new() -> Self {
+    const fn new() -> Self {
         Self(PhantomData)
     }
 }
  
  
  
    
    @@ -176,7 +176,7 @@ pub enum Bias {
 }
 
 impl Bias {
-    pub fn invert(self) -> Self {
+    pub const fn invert(self) -> Self {
         match self {
             Self::Left => Self::Right,
             Self::Right => Self::Left,
@@ -855,18 +855,18 @@ where
 }
 
 impl<T: Item> Node<T> {
-    fn is_leaf(&self) -> bool {
+    const fn is_leaf(&self) -> bool {
         matches!(self, Node::Leaf { .. })
     }
 
-    fn height(&self) -> u8 {
+    const fn height(&self) -> u8 {
         match self {
             Node::Internal { height, .. } => *height,
             Node::Leaf { .. } => 0,
         }
     }
 
-    fn summary(&self) -> &T::Summary {
+    const fn summary(&self) -> &T::Summary {
         match self {
             Node::Internal { summary, .. } => summary,
             Node::Leaf { summary, .. } => summary,
@@ -896,7 +896,7 @@ impl<T: Item> Node<T> {
         }
     }
 
-    fn is_underflowing(&self) -> bool {
+    const fn is_underflowing(&self) -> bool {
         match self {
             Node::Internal { child_trees, .. } => child_trees.len() < TREE_BASE,
             Node::Leaf { items, .. } => items.len() < TREE_BASE,
  
  
  
    
    @@ -113,7 +113,7 @@ impl Supermaven {
         *self = Self::Starting;
     }
 
-    pub fn is_enabled(&self) -> bool {
+    pub const fn is_enabled(&self) -> bool {
         matches!(self, Self::Spawned { .. })
     }
 
  
  
  
    
    @@ -25,7 +25,7 @@ pub struct SupermavenCompletionProvider {
 }
 
 impl SupermavenCompletionProvider {
-    pub fn new(supermaven: Entity<Supermaven>) -> Self {
+    pub const fn new(supermaven: Entity<Supermaven>) -> Self {
         Self {
             supermaven,
             buffer_id: None,
  
  
  
    
    @@ -143,7 +143,7 @@ impl Display for SystemSpecs {
     }
 }
 
-fn try_determine_available_gpus() -> Option<String> {
+const fn try_determine_available_gpus() -> Option<String> {
     #[cfg(any(target_os = "linux", target_os = "freebsd"))]
     {
         #[allow(
  
  
  
    
    @@ -34,7 +34,7 @@ impl ShellBuilder {
             redirect_stdin: false,
         }
     }
-    pub fn non_interactive(mut self) -> Self {
+    pub const fn non_interactive(mut self) -> Self {
         self.interactive = false;
         self
     }
@@ -68,7 +68,7 @@ impl ShellBuilder {
         }
     }
 
-    pub fn redirect_stdin_to_dev_null(mut self) -> Self {
+    pub const fn redirect_stdin_to_dev_null(mut self) -> Self {
         self.redirect_stdin = true;
         self
     }
  
  
  
    
    @@ -113,7 +113,7 @@ impl<T: PartialEq + 'static + Sync> TrackedFile<T> {
 
 impl StaticSource {
     /// Initializes the static source, reacting on tasks config changes.
-    pub fn new(tasks: TrackedFile<TaskTemplates>) -> Self {
+    pub const fn new(tasks: TrackedFile<TaskTemplates>) -> Self {
         Self { tasks }
     }
     /// Returns current list of tasks
  
  
  
    
    @@ -130,17 +130,17 @@ pub struct ResolvedTask {
 
 impl ResolvedTask {
     /// A task template before the resolution.
-    pub fn original_task(&self) -> &TaskTemplate {
+    pub const fn original_task(&self) -> &TaskTemplate {
         &self.original_task
     }
 
     /// Variables that were substituted during the task template resolution.
-    pub fn substituted_variables(&self) -> &HashSet<VariableName> {
+    pub const fn substituted_variables(&self) -> &HashSet<VariableName> {
         &self.substituted_variables
     }
 
     /// A human-readable label to display in the UI.
-    pub fn display_label(&self) -> &str {
+    pub const fn display_label(&self) -> &str {
         self.resolved.label.as_str()
     }
 }
@@ -404,7 +404,7 @@ struct EnvVariableReplacer {
 }
 
 impl EnvVariableReplacer {
-    fn new(variables: HashMap<VsCodeEnvVariable, ZedEnvVariable>) -> Self {
+    const fn new(variables: HashMap<VsCodeEnvVariable, ZedEnvVariable>) -> Self {
         Self { variables }
     }
 
  
  
  
    
    @@ -15,7 +15,7 @@ enum AlacModifiers {
 }
 
 impl AlacModifiers {
-    fn new(ks: &Keystroke) -> Self {
+    const fn new(ks: &Keystroke) -> Self {
         match (
             ks.modifiers.alt,
             ks.modifiers.control,
@@ -31,7 +31,7 @@ impl AlacModifiers {
         }
     }
 
-    fn any(&self) -> bool {
+    const fn any(&self) -> bool {
         match &self {
             AlacModifiers::None => false,
             AlacModifiers::Alt => true,
@@ -246,7 +246,7 @@ pub fn to_esc_str(
 ///    8     | Shift + Alt + Control
 /// ---------+---------------------------
 /// from: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-PC-Style-Function-Keys
-fn modifier_code(keystroke: &Keystroke) -> u32 {
+const fn modifier_code(keystroke: &Keystroke) -> u32 {
     let mut modifier_code = 0;
     if keystroke.modifiers.shift {
         modifier_code |= 1;
  
  
  
    
    @@ -16,7 +16,7 @@ enum MouseFormat {
 }
 
 impl MouseFormat {
-    fn from_mode(mode: TermMode) -> Self {
+    const fn from_mode(mode: TermMode) -> Self {
         if mode.contains(TermMode::SGR_MOUSE) {
             MouseFormat::Sgr
         } else if mode.contains(TermMode::UTF8_MOUSE) {
@@ -42,7 +42,7 @@ enum AlacMouseButton {
 }
 
 impl AlacMouseButton {
-    fn from_move_button(e: Option<MouseButton>) -> Self {
+    const fn from_move_button(e: Option<MouseButton>) -> Self {
         match e {
             Some(gpui::MouseButton::Left) => AlacMouseButton::LeftMove,
             Some(gpui::MouseButton::Middle) => AlacMouseButton::MiddleMove,
@@ -52,7 +52,7 @@ impl AlacMouseButton {
         }
     }
 
-    fn from_button(e: MouseButton) -> Self {
+    const fn from_button(e: MouseButton) -> Self {
         match e {
             gpui::MouseButton::Left => AlacMouseButton::LeftButton,
             gpui::MouseButton::Right => AlacMouseButton::MiddleButton,
@@ -74,7 +74,7 @@ impl AlacMouseButton {
         }
     }
 
-    fn is_other(&self) -> bool {
+    const fn is_other(&self) -> bool {
         matches!(self, AlacMouseButton::Other)
     }
 }
  
  
  
    
    @@ -32,7 +32,7 @@ impl ProcessIdGetter {
         Some(Pid::from_u32(pid as u32))
     }
 
-    pub fn fallback_pid(&self) -> u32 {
+    pub const fn fallback_pid(&self) -> u32 {
         self.fallback_pid
     }
 }
@@ -104,7 +104,7 @@ impl PtyProcessInfo {
         }
     }
 
-    pub fn pid_getter(&self) -> &ProcessIdGetter {
+    pub const fn pid_getter(&self) -> &ProcessIdGetter {
         &self.pid_getter
     }
 
  
  
  
    
    @@ -194,7 +194,7 @@ pub struct TerminalBounds {
 }
 
 impl TerminalBounds {
-    pub fn new(line_height: Pixels, cell_width: Pixels, bounds: Bounds<Pixels>) -> Self {
+    pub const fn new(line_height: Pixels, cell_width: Pixels, bounds: Bounds<Pixels>) -> Self {
         TerminalBounds {
             cell_width,
             line_height,
@@ -210,19 +210,19 @@ impl TerminalBounds {
         (self.bounds.size.width / self.cell_width).floor() as usize
     }
 
-    pub fn height(&self) -> Pixels {
+    pub const fn height(&self) -> Pixels {
         self.bounds.size.height
     }
 
-    pub fn width(&self) -> Pixels {
+    pub const fn width(&self) -> Pixels {
         self.bounds.size.width
     }
 
-    pub fn cell_width(&self) -> Pixels {
+    pub const fn cell_width(&self) -> Pixels {
         self.cell_width
     }
 
-    pub fn line_height(&self) -> Pixels {
+    pub const fn line_height(&self) -> Pixels {
         self.line_height
     }
 }
@@ -875,7 +875,7 @@ impl TaskStatus {
         }
     }
 
-    fn register_task_exit(&mut self, error_code: i32) {
+    const fn register_task_exit(&mut self, error_code: i32) {
         *self = TaskStatus::Completed {
             success: error_code == 0,
         };
@@ -1221,13 +1221,13 @@ impl Terminal {
         cx.notify()
     }
 
-    fn next_link_id(&mut self) -> usize {
+    const fn next_link_id(&mut self) -> usize {
         let res = self.next_link_id;
         self.next_link_id = self.next_link_id.wrapping_add(1);
         res
     }
 
-    pub fn last_content(&self) -> &TerminalContent {
+    pub const fn last_content(&self) -> &TerminalContent {
         &self.last_content
     }
 
@@ -1372,11 +1372,11 @@ impl Terminal {
             .push_back(InternalEvent::Scroll(AlacScroll::Bottom));
     }
 
-    pub fn scrolled_to_top(&self) -> bool {
+    pub const fn scrolled_to_top(&self) -> bool {
         self.last_content.scrolled_to_top
     }
 
-    pub fn scrolled_to_bottom(&self) -> bool {
+    pub const fn scrolled_to_bottom(&self) -> bool {
         self.last_content.scrolled_to_bottom
     }
 
@@ -1679,7 +1679,7 @@ impl Terminal {
         }
     }
 
-    pub fn mouse_mode(&self, shift: bool) -> bool {
+    pub const fn mouse_mode(&self, shift: bool) -> bool {
         self.last_content.mode.intersects(TermMode::MOUSE_MODE) && !shift
     }
 
@@ -2057,14 +2057,14 @@ impl Terminal {
         }
     }
 
-    pub fn pid_getter(&self) -> Option<&ProcessIdGetter> {
+    pub const fn pid_getter(&self) -> Option<&ProcessIdGetter> {
         match &self.terminal_type {
             TerminalType::Pty { info, .. } => Some(info.pid_getter()),
             TerminalType::DisplayOnly => None,
         }
     }
 
-    pub fn task(&self) -> Option<&TaskState> {
+    pub const fn task(&self) -> Option<&TaskState> {
         self.task.as_ref()
     }
 
@@ -2149,7 +2149,7 @@ impl Terminal {
         }
     }
 
-    pub fn vi_mode_enabled(&self) -> bool {
+    pub const fn vi_mode_enabled(&self) -> bool {
         self.vi_mode_enabled
     }
 
  
  
  
    
    @@ -61,18 +61,18 @@ struct DisplayCursor {
 }
 
 impl DisplayCursor {
-    fn from(cursor_point: AlacPoint, display_offset: usize) -> Self {
+    const fn from(cursor_point: AlacPoint, display_offset: usize) -> Self {
         Self {
             line: cursor_point.line.0 + display_offset as i32,
             col: cursor_point.column.0,
         }
     }
 
-    pub fn line(&self) -> i32 {
+    pub const fn line(&self) -> i32 {
         self.line
     }
 
-    pub fn col(&self) -> usize {
+    pub const fn col(&self) -> usize {
         self.col
     }
 }
@@ -163,7 +163,7 @@ pub struct LayoutRect {
 }
 
 impl LayoutRect {
-    fn new(point: AlacPoint<i32, i32>, num_of_cells: usize, color: Hsla) -> LayoutRect {
+    const fn new(point: AlacPoint<i32, i32>, num_of_cells: usize, color: Hsla) -> LayoutRect {
         LayoutRect {
             point,
             num_of_cells,
@@ -200,7 +200,7 @@ struct BackgroundRegion {
 }
 
 impl BackgroundRegion {
-    fn new(line: i32, col: i32, color: Hsla) -> Self {
+    const fn new(line: i32, col: i32, color: Hsla) -> Self {
         BackgroundRegion {
             start_line: line,
             start_col: col,
@@ -527,7 +527,7 @@ impl TerminalElement {
     /// Regular icons (git, folders, etc.) are excluded as they need to remain readable.
     ///
     /// Fixes https://github.com/zed-industries/zed/issues/34234
-    fn is_decorative_character(ch: char) -> bool {
+    const fn is_decorative_character(ch: char) -> bool {
         matches!(
             ch as u32,
             // Unicode Box Drawing and Block Elements
  
  
  
    
    @@ -1015,7 +1015,7 @@ impl TerminalPanel {
         self.active_pane.read(cx).items_len() == 0 && self.pending_terminals_to_add == 0
     }
 
-    pub fn assistant_enabled(&self) -> bool {
+    pub const fn assistant_enabled(&self) -> bool {
         self.assistant_enabled
     }
 
  
  
  
    
    @@ -37,21 +37,21 @@ enum OpenTarget {
 }
 
 impl OpenTarget {
-    fn is_file(&self) -> bool {
+    const fn is_file(&self) -> bool {
         match self {
             OpenTarget::Worktree(_, entry, ..) => entry.is_file(),
             OpenTarget::File(_, metadata) => !metadata.is_dir,
         }
     }
 
-    fn is_dir(&self) -> bool {
+    const fn is_dir(&self) -> bool {
         match self {
             OpenTarget::Worktree(_, entry, ..) => entry.is_dir(),
             OpenTarget::File(_, metadata) => metadata.is_dir,
         }
     }
 
-    fn path(&self) -> &PathWithPosition {
+    const fn path(&self) -> &PathWithPosition {
         match self {
             OpenTarget::Worktree(path, ..) => path,
             OpenTarget::File(path, _) => path,
  
  
  
    
    @@ -174,7 +174,7 @@ impl ContentMode {
         }
     }
 
-    pub fn is_scrollable(&self) -> bool {
+    pub const fn is_scrollable(&self) -> bool {
         matches!(self, ContentMode::Scrollable)
     }
 }
@@ -356,11 +356,11 @@ impl TerminalView {
         self.terminal.read(cx).last_content().terminal_bounds
     }
 
-    pub fn entity(&self) -> &Entity<Terminal> {
+    pub const fn entity(&self) -> &Entity<Terminal> {
         &self.terminal
     }
 
-    pub fn has_bell(&self) -> bool {
+    pub const fn has_bell(&self) -> bool {
         self.has_bell
     }
 
@@ -660,7 +660,7 @@ impl TerminalView {
         .detach();
     }
 
-    pub fn terminal(&self) -> &Entity<Terminal> {
+    pub const fn terminal(&self) -> &Entity<Terminal> {
         &self.terminal
     }
 
@@ -681,7 +681,7 @@ impl TerminalView {
         cx.notify();
     }
 
-    fn next_blink_epoch(&mut self) -> usize {
+    const fn next_blink_epoch(&mut self) -> usize {
         self.blink_epoch += 1;
         self.blink_epoch
     }
  
  
  
    
    @@ -21,7 +21,7 @@ pub struct OperationSummary {
 }
 
 impl OperationKey {
-    pub fn new(timestamp: clock::Lamport) -> Self {
+    pub const fn new(timestamp: clock::Lamport) -> Self {
         Self(timestamp)
     }
 }
  
  
  
    
    @@ -180,7 +180,7 @@ where
         self.0.clear();
     }
 
-    pub fn is_empty(&self) -> bool {
+    pub const fn is_empty(&self) -> bool {
         self.0.is_empty()
     }
 
  
  
  
    
    @@ -117,7 +117,7 @@ impl<T: Copy + Ord> Selection<T> {
         self.goal = new_goal;
     }
 
-    pub fn swap_head_tail(&mut self) {
+    pub const fn swap_head_tail(&mut self) {
         if self.reversed {
             self.reversed = false;
         } else {
@@ -127,7 +127,7 @@ impl<T: Copy + Ord> Selection<T> {
 }
 
 impl<T: Copy> Selection<T> {
-    pub fn range(&self) -> Range<T> {
+    pub const fn range(&self) -> Range<T> {
         self.start..self.end
     }
 }
@@ -144,7 +144,7 @@ impl Selection<usize> {
         }
     }
 
-    pub fn equals(&self, offset_range: &Range<usize>) -> bool {
+    pub const fn equals(&self, offset_range: &Range<usize>) -> bool {
         self.start == offset_range.start && self.end == offset_range.end
     }
 }
  
  
  
    
    @@ -84,7 +84,7 @@ impl BufferId {
 
     /// Increments this buffer id, returning the old value.
     /// So that's a post-increment operator in disguise.
-    pub fn next(&mut self) -> Self {
+    pub const fn next(&mut self) -> Self {
         let old = *self;
         self.0 = self.0.saturating_add(1);
         old
@@ -137,7 +137,7 @@ impl Transaction {
 }
 
 impl HistoryEntry {
-    pub fn transaction_id(&self) -> TransactionId {
+    pub const fn transaction_id(&self) -> TransactionId {
         self.transaction.id
     }
 }
@@ -175,7 +175,7 @@ impl PartialOrd for InsertionSlice {
 }
 
 impl InsertionSlice {
-    fn from_fragment(edit_id: clock::Lamport, fragment: &Fragment) -> Self {
+    const fn from_fragment(edit_id: clock::Lamport, fragment: &Fragment) -> Self {
         Self {
             edit_id,
             insertion_id: fragment.timestamp,
@@ -639,7 +639,7 @@ impl LineIndent {
     }
 
     /// Constructs a new `LineIndent` which only contains spaces.
-    pub fn spaces(spaces: u32) -> Self {
+    pub const fn spaces(spaces: u32) -> Self {
         Self {
             tabs: 0,
             spaces,
@@ -648,7 +648,7 @@ impl LineIndent {
     }
 
     /// Constructs a new `LineIndent` which only contains tabs.
-    pub fn tabs(tabs: u32) -> Self {
+    pub const fn tabs(tabs: u32) -> Self {
         Self {
             tabs,
             spaces: 0,
@@ -657,22 +657,22 @@ impl LineIndent {
     }
 
     /// Indicates whether the line is empty.
-    pub fn is_line_empty(&self) -> bool {
+    pub const fn is_line_empty(&self) -> bool {
         self.tabs == 0 && self.spaces == 0 && self.line_blank
     }
 
     /// Indicates whether the line is blank (contains only whitespace).
-    pub fn is_line_blank(&self) -> bool {
+    pub const fn is_line_blank(&self) -> bool {
         self.line_blank
     }
 
     /// Returns the number of indentation characters (tabs or spaces).
-    pub fn raw_len(&self) -> u32 {
+    pub const fn raw_len(&self) -> u32 {
         self.tabs + self.spaces
     }
 
     /// Returns the number of indentation characters (tabs or spaces), taking tab size into account.
-    pub fn len(&self, tab_size: u32) -> u32 {
+    pub const fn len(&self, tab_size: u32) -> u32 {
         self.tabs * tab_size + self.spaces
     }
 }
@@ -795,7 +795,7 @@ impl Buffer {
         }
     }
 
-    pub fn replica_id(&self) -> ReplicaId {
+    pub const fn replica_id(&self) -> ReplicaId {
         self.lamport_clock.replica_id
     }
 
@@ -807,7 +807,7 @@ impl Buffer {
         self.deferred_ops.len()
     }
 
-    pub fn transaction_group_interval(&self) -> Duration {
+    pub const fn transaction_group_interval(&self) -> Duration {
         self.history.group_interval
     }
 
@@ -1000,7 +1000,7 @@ impl Buffer {
         edit_op
     }
 
-    pub fn set_line_ending(&mut self, line_ending: LineEnding) {
+    pub const fn set_line_ending(&mut self, line_ending: LineEnding) {
         self.snapshot.line_ending = line_ending;
     }
 
@@ -1419,11 +1419,11 @@ impl Buffer {
         self.history.group_until(transaction_id);
     }
 
-    pub fn base_text(&self) -> &Rope {
+    pub const fn base_text(&self) -> &Rope {
         &self.history.base_text
     }
 
-    pub fn operations(&self) -> &TreeMap<clock::Lamport, Operation> {
+    pub const fn operations(&self) -> &TreeMap<clock::Lamport, Operation> {
         &self.history.operations
     }
 
@@ -1901,7 +1901,7 @@ impl Deref for Buffer {
 }
 
 impl BufferSnapshot {
-    pub fn as_rope(&self) -> &Rope {
+    pub const fn as_rope(&self) -> &Rope {
         &self.visible_text
     }
 
@@ -1948,11 +1948,11 @@ impl BufferSnapshot {
         rope
     }
 
-    pub fn remote_id(&self) -> BufferId {
+    pub const fn remote_id(&self) -> BufferId {
         self.remote_id
     }
 
-    pub fn replica_id(&self) -> ReplicaId {
+    pub const fn replica_id(&self) -> ReplicaId {
         self.replica_id
     }
 
@@ -2026,7 +2026,7 @@ impl BufferSnapshot {
         self.visible_text.to_string()
     }
 
-    pub fn line_ending(&self) -> LineEnding {
+    pub const fn line_ending(&self) -> LineEnding {
         self.line_ending
     }
 
@@ -2086,7 +2086,7 @@ impl BufferSnapshot {
         self.visible_text.point_to_point_utf16(point)
     }
 
-    pub fn version(&self) -> &clock::Global {
+    pub const fn version(&self) -> &clock::Global {
         &self.version
     }
 
@@ -3046,21 +3046,21 @@ impl Operation {
         operation_queue::Operation::lamport_timestamp(self).replica_id
     }
 
-    pub fn timestamp(&self) -> clock::Lamport {
+    pub const fn timestamp(&self) -> clock::Lamport {
         match self {
             Operation::Edit(edit) => edit.timestamp,
             Operation::Undo(undo) => undo.timestamp,
         }
     }
 
-    pub fn as_edit(&self) -> Option<&EditOperation> {
+    pub const fn as_edit(&self) -> Option<&EditOperation> {
         match self {
             Operation::Edit(edit) => Some(edit),
             _ => None,
         }
     }
 
-    pub fn is_edit(&self) -> bool {
+    pub const fn is_edit(&self) -> bool {
         matches!(self, Operation::Edit { .. })
     }
 }
@@ -3256,7 +3256,7 @@ impl Default for LineEnding {
 }
 
 impl LineEnding {
-    pub fn as_str(&self) -> &'static str {
+    pub const fn as_str(&self) -> &'static str {
         match self {
             LineEnding::Unix => "\n",
             LineEnding::Windows => "\r\n",
  
  
  
    
    @@ -262,23 +262,23 @@ impl ColorScaleSet {
         }
     }
 
-    pub fn name(&self) -> &SharedString {
+    pub const fn name(&self) -> &SharedString {
         &self.name
     }
 
-    pub fn light(&self) -> &ColorScale {
+    pub const fn light(&self) -> &ColorScale {
         &self.light
     }
 
-    pub fn light_alpha(&self) -> &ColorScale {
+    pub const fn light_alpha(&self) -> &ColorScale {
         &self.light_alpha
     }
 
-    pub fn dark(&self) -> &ColorScale {
+    pub const fn dark(&self) -> &ColorScale {
         &self.dark
     }
 
-    pub fn dark_alpha(&self) -> &ColorScale {
+    pub const fn dark_alpha(&self) -> &ColorScale {
         &self.dark_alpha
     }
 
  
  
  
    
    @@ -20,7 +20,7 @@ fn ensure_non_opaque(color: Hsla) -> Hsla {
     }
 }
 
-fn ensure_opaque(color: Hsla) -> Hsla {
+const fn ensure_opaque(color: Hsla) -> Hsla {
     Hsla { a: 1.0, ..color }
 }
 
  
  
  
    
    @@ -53,7 +53,7 @@ pub enum UiDensity {
 impl UiDensity {
     /// The spacing ratio of a given density.
     /// TODO: Standardize usage throughout the app or remove
-    pub fn spacing_ratio(self) -> f32 {
+    pub const fn spacing_ratio(self) -> f32 {
         match self {
             UiDensity::Compact => 0.75,
             UiDensity::Default => 1.0,
@@ -142,7 +142,7 @@ pub(crate) const DEFAULT_LIGHT_THEME: &'static str = "One Light";
 pub(crate) const DEFAULT_DARK_THEME: &'static str = "One Dark";
 
 /// Returns the name of the default theme for the given [`Appearance`].
-pub fn default_theme(appearance: Appearance) -> &'static str {
+pub const fn default_theme(appearance: Appearance) -> &'static str {
     match appearance {
         Appearance::Light => DEFAULT_LIGHT_THEME,
         Appearance::Dark => DEFAULT_DARK_THEME,
@@ -244,7 +244,7 @@ impl ThemeSelection {
     }
 
     /// Returns the [ThemeMode] for the [ThemeSelection].
-    pub fn mode(&self) -> Option<ThemeMode> {
+    pub const fn mode(&self) -> Option<ThemeMode> {
         match self {
             ThemeSelection::Static(_) => None,
             ThemeSelection::Dynamic { mode, .. } => Some(*mode),
@@ -296,7 +296,7 @@ impl IconThemeSelection {
     }
 
     /// Returns the [`ThemeMode`] for the [`IconThemeSelection`].
-    pub fn mode(&self) -> Option<ThemeMode> {
+    pub const fn mode(&self) -> Option<ThemeMode> {
         match self {
             IconThemeSelection::Static(_) => None,
             IconThemeSelection::Dynamic { mode, .. } => Some(*mode),
@@ -437,7 +437,7 @@ impl From<settings::BufferLineHeight> for BufferLineHeight {
 
 impl BufferLineHeight {
     /// Returns the value of the line height.
-    pub fn value(&self) -> f32 {
+    pub const fn value(&self) -> f32 {
         match self {
             BufferLineHeight::Comfortable => 1.618,
             BufferLineHeight::Standard => 1.3,
@@ -487,7 +487,7 @@ impl ThemeSettings {
     ///
     /// The real buffer font size is stored in-memory, to support temporary font size changes.
     /// Use [`Self::buffer_font_size`] to get the real font size.
-    pub fn buffer_font_size_settings(&self) -> Pixels {
+    pub const fn buffer_font_size_settings(&self) -> Pixels {
         self.buffer_font_size
     }
 
@@ -495,7 +495,7 @@ impl ThemeSettings {
     ///
     /// The real UI font size is stored in-memory, to support temporary font size changes.
     /// Use [`Self::ui_font_size`] to get the real font size.
-    pub fn ui_font_size_settings(&self) -> Pixels {
+    pub const fn ui_font_size_settings(&self) -> Pixels {
         self.ui_font_size
     }
 
@@ -503,7 +503,7 @@ impl ThemeSettings {
     ///
     /// The real agent font size is stored in-memory, to support temporary font size changes.
     /// Use [`Self::agent_ui_font_size`] to get the real font size.
-    pub fn agent_ui_font_size_settings(&self) -> Option<Pixels> {
+    pub const fn agent_ui_font_size_settings(&self) -> Option<Pixels> {
         self.agent_ui_font_size
     }
 
@@ -511,13 +511,13 @@ impl ThemeSettings {
     ///
     /// The real agent buffer font size is stored in-memory, to support temporary font size changes.
     /// Use [`Self::agent_buffer_font_size`] to get the real font size.
-    pub fn agent_buffer_font_size_settings(&self) -> Option<Pixels> {
+    pub const fn agent_buffer_font_size_settings(&self) -> Option<Pixels> {
         self.agent_buffer_font_size
     }
 
     // TODO: Rename: `line_height` -> `buffer_line_height`
     /// Returns the buffer's line height.
-    pub fn line_height(&self) -> f32 {
+    pub const fn line_height(&self) -> f32 {
         f32::max(self.buffer_line_height.value(), MIN_LINE_HEIGHT)
     }
 
@@ -670,7 +670,7 @@ pub fn clamp_font_size(size: Pixels) -> Pixels {
     size.clamp(MIN_FONT_SIZE, MAX_FONT_SIZE)
 }
 
-fn clamp_font_weight(weight: f32) -> FontWeight {
+const fn clamp_font_weight(weight: f32) -> FontWeight {
     FontWeight(weight.clamp(100., 950.))
 }
 
  
  
  
    
    @@ -404,7 +404,7 @@ pub enum ThemeColorField {
 }
 
 impl ThemeColors {
-    pub fn color(&self, field: ThemeColorField) -> Hsla {
+    pub const fn color(&self, field: ThemeColorField) -> Hsla {
         match field {
             ThemeColorField::Border => self.border,
             ThemeColorField::BorderVariant => self.border_variant,
  
  
  
    
    @@ -181,7 +181,7 @@ impl StatusColors {
         }
     }
 
-    pub fn diagnostic(&self) -> DiagnosticColors {
+    pub const fn diagnostic(&self) -> DiagnosticColors {
         DiagnosticColors {
             error: self.error,
             warning: self.warning,
  
  
  
    
    @@ -67,7 +67,7 @@ pub enum Appearance {
 
 impl Appearance {
     /// Returns whether the appearance is light.
-    pub fn is_light(&self) -> bool {
+    pub const fn is_light(&self) -> bool {
         match self {
             Self::Light => true,
             Self::Dark => false,
@@ -337,37 +337,37 @@ pub struct Theme {
 impl Theme {
     /// Returns the [`SystemColors`] for the theme.
     #[inline(always)]
-    pub fn system(&self) -> &SystemColors {
+    pub const fn system(&self) -> &SystemColors {
         &self.styles.system
     }
 
     /// Returns the [`AccentColors`] for the theme.
     #[inline(always)]
-    pub fn accents(&self) -> &AccentColors {
+    pub const fn accents(&self) -> &AccentColors {
         &self.styles.accents
     }
 
     /// Returns the [`PlayerColors`] for the theme.
     #[inline(always)]
-    pub fn players(&self) -> &PlayerColors {
+    pub const fn players(&self) -> &PlayerColors {
         &self.styles.player
     }
 
     /// Returns the [`ThemeColors`] for the theme.
     #[inline(always)]
-    pub fn colors(&self) -> &ThemeColors {
+    pub const fn colors(&self) -> &ThemeColors {
         &self.styles.colors
     }
 
     /// Returns the [`SyntaxTheme`] for the theme.
     #[inline(always)]
-    pub fn syntax(&self) -> &Arc<SyntaxTheme> {
+    pub const fn syntax(&self) -> &Arc<SyntaxTheme> {
         &self.styles.syntax
     }
 
     /// Returns the [`StatusColors`] for the theme.
     #[inline(always)]
-    pub fn status(&self) -> &StatusColors {
+    pub const fn status(&self) -> &StatusColors {
         &self.styles.status
     }
 
@@ -379,13 +379,13 @@ impl Theme {
 
     /// Returns the [`Appearance`] for the theme.
     #[inline(always)]
-    pub fn appearance(&self) -> Appearance {
+    pub const fn appearance(&self) -> Appearance {
         self.appearance
     }
 
     /// Returns the [`WindowBackgroundAppearance`] for the theme.
     #[inline(always)]
-    pub fn window_background_appearance(&self) -> WindowBackgroundAppearance {
+    pub const fn window_background_appearance(&self) -> WindowBackgroundAppearance {
         self.styles.window_background_appearance
     }
 
  
  
  
    
    @@ -33,7 +33,7 @@ pub struct VsCodeThemeConverter {
 }
 
 impl VsCodeThemeConverter {
-    pub fn new(
+    pub const fn new(
         theme: VsCodeTheme,
         theme_metadata: ThemeMetadata,
         syntax_overrides: IndexMap<String, Vec<String>>,
  
  
  
    
    @@ -173,7 +173,7 @@ impl ZedSyntaxToken {
         Some(matches)
     }
 
-    pub fn fallbacks(&self) -> &[Self] {
+    pub const fn fallbacks(&self) -> &[Self] {
         match self {
             ZedSyntaxToken::CommentDoc => &[ZedSyntaxToken::Comment],
             ZedSyntaxToken::Number => &[ZedSyntaxToken::Constant],
  
  
  
    
    @@ -57,7 +57,7 @@ impl WindowControlType {
     ///
     /// Will take a [PlatformStyle] in the future to return a different
     /// icon name based on the platform.
-    pub fn icon(&self) -> IconName {
+    pub const fn icon(&self) -> IconName {
         match self {
             WindowControlType::Minimize => IconName::GenericMinimize,
             WindowControlType::Restore => IconName::GenericRestore,
  
  
  
    
    @@ -8,12 +8,12 @@ pub struct WindowsWindowControls {
 }
 
 impl WindowsWindowControls {
-    pub fn new(button_height: Pixels) -> Self {
+    pub const fn new(button_height: Pixels) -> Self {
         Self { button_height }
     }
 
     #[cfg(not(target_os = "windows"))]
-    fn get_font() -> &'static str {
+    const fn get_font() -> &'static str {
         "Segoe Fluent Icons"
     }
 
  
  
  
    
    @@ -184,7 +184,7 @@ pub struct AvatarAvailabilityIndicator {
 
 impl AvatarAvailabilityIndicator {
     /// Creates a new indicator
-    pub fn new(availability: CollaboratorAvailability) -> Self {
+    pub const fn new(availability: CollaboratorAvailability) -> Self {
         Self {
             availability,
             avatar_size: None,
  
  
  
    
    @@ -24,7 +24,7 @@ impl Badge {
         }
     }
 
-    pub fn icon(mut self, icon: IconName) -> Self {
+    pub const fn icon(mut self, icon: IconName) -> Self {
         self.icon = icon;
         self
     }
  
  
  
    
    @@ -29,7 +29,7 @@ pub struct Banner {
 
 impl Banner {
     /// Creates a new `Banner` component with default styling.
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         Self {
             severity: Severity::Info,
             children: Vec::new(),
@@ -38,7 +38,7 @@ impl Banner {
     }
 
     /// Sets the severity of the banner.
-    pub fn severity(mut self, severity: Severity) -> Self {
+    pub const fn severity(mut self, severity: Severity) -> Self {
         self.severity = severity;
         self
     }
  
  
  
    
    @@ -195,13 +195,13 @@ impl Button {
     ///
     /// This method allows you to specify where the keybinding should be displayed
     /// in relation to the button's label.
-    pub fn key_binding_position(mut self, position: KeybindingPosition) -> Self {
+    pub const fn key_binding_position(mut self, position: KeybindingPosition) -> Self {
         self.key_binding_position = position;
         self
     }
 
     /// Sets the alpha property of the color of label.
-    pub fn alpha(mut self, alpha: f32) -> Self {
+    pub const fn alpha(mut self, alpha: f32) -> Self {
         self.alpha = Some(alpha);
         self
     }
@@ -210,7 +210,7 @@ impl Button {
     ///
     /// Buttons with static labels should _never_ be truncated, ensure
     /// this is only used when the label is dynamic and may overflow.
-    pub fn truncate(mut self, truncate: bool) -> Self {
+    pub const fn truncate(mut self, truncate: bool) -> Self {
         self.truncate = truncate;
         self
     }
  
  
  
    
    @@ -64,7 +64,7 @@ impl ButtonIcon {
         self
     }
 
-    pub fn indicator_border_color(mut self, color: Option<Hsla>) -> Self {
+    pub const fn indicator_border_color(mut self, color: Option<Hsla>) -> Self {
         self.indicator_border_color = color;
         self
     }
  
  
  
    
    @@ -512,7 +512,7 @@ impl ButtonLike {
         self
     }
 
-    pub fn height(mut self, height: DefiniteLength) -> Self {
+    pub const fn height(mut self, height: DefiniteLength) -> Self {
         self.height = Some(height);
         self
     }
  
  
  
    
    @@ -45,22 +45,22 @@ impl IconButton {
         this
     }
 
-    pub fn shape(mut self, shape: IconButtonShape) -> Self {
+    pub const fn shape(mut self, shape: IconButtonShape) -> Self {
         self.shape = shape;
         self
     }
 
-    pub fn icon_size(mut self, icon_size: IconSize) -> Self {
+    pub const fn icon_size(mut self, icon_size: IconSize) -> Self {
         self.icon_size = icon_size;
         self
     }
 
-    pub fn icon_color(mut self, icon_color: Color) -> Self {
+    pub const fn icon_color(mut self, icon_color: Color) -> Self {
         self.icon_color = icon_color;
         self
     }
 
-    pub fn alpha(mut self, alpha: f32) -> Self {
+    pub const fn alpha(mut self, alpha: f32) -> Self {
         self.alpha = Some(alpha);
         self
     }
@@ -89,7 +89,7 @@ impl IconButton {
         self
     }
 
-    pub fn indicator_border_color(mut self, color: Option<Hsla>) -> Self {
+    pub const fn indicator_border_color(mut self, color: Option<Hsla>) -> Self {
         self.indicator_border_color = color;
 
         self
  
  
  
    
    @@ -29,7 +29,7 @@ pub struct SplitButton {
 }
 
 impl SplitButton {
-    pub fn new(left: ButtonLike, right: AnyElement) -> Self {
+    pub const fn new(left: ButtonLike, right: AnyElement) -> Self {
         Self {
             left,
             right,
@@ -37,7 +37,7 @@ impl SplitButton {
         }
     }
 
-    pub fn style(mut self, style: SplitButtonStyle) -> Self {
+    pub const fn style(mut self, style: SplitButtonStyle) -> Self {
         self.style = style;
         self
     }
  
  
  
    
    @@ -33,7 +33,7 @@ impl ToggleButtonPosition {
         ..Self::HORIZONTAL_MIDDLE
     };
 
-    pub(crate) fn to_rounding(self) -> ButtonLikeRounding {
+    pub(crate) const fn to_rounding(self) -> ButtonLikeRounding {
         ButtonLikeRounding {
             top_left: self.topmost && self.leftmost,
             top_right: self.topmost && self.rightmost,
@@ -66,20 +66,20 @@ impl ToggleButton {
         self
     }
 
-    pub fn position_in_group(mut self, position: ToggleButtonPosition) -> Self {
+    pub const fn position_in_group(mut self, position: ToggleButtonPosition) -> Self {
         self.position_in_group = Some(position);
         self
     }
 
-    pub fn first(self) -> Self {
+    pub const fn first(self) -> Self {
         self.position_in_group(ToggleButtonPosition::HORIZONTAL_FIRST)
     }
 
-    pub fn middle(self) -> Self {
+    pub const fn middle(self) -> Self {
         self.position_in_group(ToggleButtonPosition::HORIZONTAL_MIDDLE)
     }
 
-    pub fn last(self) -> Self {
+    pub const fn last(self) -> Self {
         self.position_in_group(ToggleButtonPosition::HORIZONTAL_LAST)
     }
 }
@@ -363,7 +363,7 @@ impl ToggleButtonSimple {
         }
     }
 
-    pub fn selected(mut self, selected: bool) -> Self {
+    pub const fn selected(mut self, selected: bool) -> Self {
         self.selected = selected;
         self
     }
@@ -411,7 +411,7 @@ impl ToggleButtonWithIcon {
         }
     }
 
-    pub fn selected(mut self, selected: bool) -> Self {
+    pub const fn selected(mut self, selected: bool) -> Self {
         self.selected = selected;
         self
     }
@@ -496,17 +496,17 @@ impl<T: ButtonBuilder, const COLS: usize> ToggleButtonGroup<T, COLS, 2> {
 }
 
 impl<T: ButtonBuilder, const COLS: usize, const ROWS: usize> ToggleButtonGroup<T, COLS, ROWS> {
-    pub fn style(mut self, style: ToggleButtonGroupStyle) -> Self {
+    pub const fn style(mut self, style: ToggleButtonGroupStyle) -> Self {
         self.style = style;
         self
     }
 
-    pub fn size(mut self, size: ToggleButtonGroupSize) -> Self {
+    pub const fn size(mut self, size: ToggleButtonGroupSize) -> Self {
         self.size = size;
         self
     }
 
-    pub fn selected_index(mut self, index: usize) -> Self {
+    pub const fn selected_index(mut self, index: usize) -> Self {
         self.selected_index = index;
         self
     }
@@ -514,7 +514,7 @@ impl<T: ButtonBuilder, const COLS: usize, const ROWS: usize> ToggleButtonGroup<T
     /// Sets the tab index for the toggle button group.
     /// The tab index is set to the initial value provided, then the
     /// value is incremented by the number of buttons in the group.
-    pub fn tab_index(mut self, tab_index: &mut isize) -> Self {
+    pub const fn tab_index(mut self, tab_index: &mut isize) -> Self {
         self.tab_index = Some(*tab_index);
         *tab_index += (COLS * ROWS) as isize;
         self
  
  
  
    
    @@ -38,7 +38,7 @@ pub struct Callout {
 
 impl Callout {
     /// Creates a new `Callout` component with default styling.
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         Self {
             severity: Severity::Info,
             icon: None,
@@ -52,13 +52,13 @@ impl Callout {
     }
 
     /// Sets the severity of the callout.
-    pub fn severity(mut self, severity: Severity) -> Self {
+    pub const fn severity(mut self, severity: Severity) -> Self {
         self.severity = severity;
         self
     }
 
     /// Sets the icon to display in the callout.
-    pub fn icon(mut self, icon: IconName) -> Self {
+    pub const fn icon(mut self, icon: IconName) -> Self {
         self.icon = Some(icon);
         self
     }
@@ -90,13 +90,13 @@ impl Callout {
     }
 
     /// Sets a custom line height for the callout content.
-    pub fn line_height(mut self, line_height: Pixels) -> Self {
+    pub const fn line_height(mut self, line_height: Pixels) -> Self {
         self.line_height = Some(line_height);
         self
     }
 
     /// Sets the border position in the callout.
-    pub fn border_position(mut self, border_position: BorderPosition) -> Self {
+    pub const fn border_position(mut self, border_position: BorderPosition) -> Self {
         self.border_position = border_position;
         self
     }
  
  
  
    
    @@ -30,19 +30,19 @@ impl Chip {
     }
 
     /// Sets the color of the label.
-    pub fn label_color(mut self, color: Color) -> Self {
+    pub const fn label_color(mut self, color: Color) -> Self {
         self.label_color = color;
         self
     }
 
     /// Sets the size of the label.
-    pub fn label_size(mut self, size: LabelSize) -> Self {
+    pub const fn label_size(mut self, size: LabelSize) -> Self {
         self.label_size = size;
         self
     }
 
     /// Sets a custom background color for the callout content.
-    pub fn bg_color(mut self, color: Hsla) -> Self {
+    pub const fn bg_color(mut self, color: Hsla) -> Self {
         self.bg_color = Some(color);
         self
     }
  
  
  
    
    @@ -43,13 +43,13 @@ impl ContentGroup {
     }
 
     /// Removes the border from the [`ContentGroup`].
-    pub fn borderless(mut self) -> Self {
+    pub const fn borderless(mut self) -> Self {
         self.border = false;
         self
     }
 
     /// Removes the background fill from the [`ContentGroup`].
-    pub fn unfilled(mut self) -> Self {
+    pub const fn unfilled(mut self) -> Self {
         self.fill = false;
         self
     }
  
  
  
    
    @@ -80,32 +80,32 @@ impl ContextMenuEntry {
         }
     }
 
-    pub fn toggleable(mut self, toggle_position: IconPosition, toggled: bool) -> Self {
+    pub const fn toggleable(mut self, toggle_position: IconPosition, toggled: bool) -> Self {
         self.toggle = Some((toggle_position, toggled));
         self
     }
 
-    pub fn icon(mut self, icon: IconName) -> Self {
+    pub const fn icon(mut self, icon: IconName) -> Self {
         self.icon = Some(icon);
         self
     }
 
-    pub fn icon_position(mut self, position: IconPosition) -> Self {
+    pub const fn icon_position(mut self, position: IconPosition) -> Self {
         self.icon_position = position;
         self
     }
 
-    pub fn icon_size(mut self, icon_size: IconSize) -> Self {
+    pub const fn icon_size(mut self, icon_size: IconSize) -> Self {
         self.icon_size = icon_size;
         self
     }
 
-    pub fn icon_color(mut self, icon_color: Color) -> Self {
+    pub const fn icon_color(mut self, icon_color: Color) -> Self {
         self.icon_color = Some(icon_color);
         self
     }
 
-    pub fn toggle(mut self, toggle_position: IconPosition, toggled: bool) -> Self {
+    pub const fn toggle(mut self, toggle_position: IconPosition, toggled: bool) -> Self {
         self.toggle = Some((toggle_position, toggled));
         self
     }
@@ -120,7 +120,7 @@ impl ContextMenuEntry {
         self
     }
 
-    pub fn disabled(mut self, disabled: bool) -> Self {
+    pub const fn disabled(mut self, disabled: bool) -> Self {
         self.disabled = disabled;
         self
     }
@@ -584,7 +584,7 @@ impl ContextMenu {
         self
     }
 
-    pub fn keep_open_on_confirm(mut self, keep_open: bool) -> Self {
+    pub const fn keep_open_on_confirm(mut self, keep_open: bool) -> Self {
         self.keep_open_on_confirm = keep_open;
         self
     }
@@ -602,7 +602,7 @@ impl ContextMenu {
         handler(None, window, cx);
     }
 
-    pub fn fixed_width(mut self, width: DefiniteLength) -> Self {
+    pub const fn fixed_width(mut self, width: DefiniteLength) -> Self {
         self.fixed_width = Some(width);
         self
     }
@@ -658,7 +658,7 @@ impl ContextMenu {
         cx.notify();
     }
 
-    pub fn clear_selected(&mut self) {
+    pub const fn clear_selected(&mut self) {
         self.selected_index = None;
     }
 
  
  
  
    
    @@ -33,21 +33,21 @@ enum TableContents<const COLS: usize> {
 }
 
 impl<const COLS: usize> TableContents<COLS> {
-    fn rows_mut(&mut self) -> Option<&mut Vec<[AnyElement; COLS]>> {
+    const fn rows_mut(&mut self) -> Option<&mut Vec<[AnyElement; COLS]>> {
         match self {
             TableContents::Vec(rows) => Some(rows),
             TableContents::UniformList(_) => None,
         }
     }
 
-    fn len(&self) -> usize {
+    const fn len(&self) -> usize {
         match self {
             TableContents::Vec(rows) => rows.len(),
             TableContents::UniformList(data) => data.row_count,
         }
     }
 
-    fn is_empty(&self) -> bool {
+    const fn is_empty(&self) -> bool {
         self.len() == 0
     }
 }
@@ -186,7 +186,7 @@ impl TableResizeBehavior {
         *self != TableResizeBehavior::None
     }
 
-    pub fn min_size(&self) -> Option<f32> {
+    pub const fn min_size(&self) -> Option<f32> {
         match self {
             TableResizeBehavior::None => None,
             TableResizeBehavior::Resizable => Some(0.05),
@@ -523,7 +523,7 @@ impl<const COLS: usize> Table<COLS> {
     }
 
     /// Enables row striping.
-    pub fn striped(mut self) -> Self {
+    pub const fn striped(mut self) -> Self {
         self.striped = true;
         self
     }
  
  
  
    
    @@ -40,17 +40,17 @@ impl Disclosure {
         self
     }
 
-    pub fn opened_icon(mut self, icon: IconName) -> Self {
+    pub const fn opened_icon(mut self, icon: IconName) -> Self {
         self.opened_icon = icon;
         self
     }
 
-    pub fn closed_icon(mut self, icon: IconName) -> Self {
+    pub const fn closed_icon(mut self, icon: IconName) -> Self {
         self.closed_icon = icon;
         self
     }
 
-    pub fn disabled(mut self, disabled: bool) -> Self {
+    pub const fn disabled(mut self, disabled: bool) -> Self {
         self.disabled = disabled;
         self
     }
  
  
  
    
    @@ -105,12 +105,12 @@ impl Divider {
         }
     }
 
-    pub fn inset(mut self) -> Self {
+    pub const fn inset(mut self) -> Self {
         self.inset = true;
         self
     }
 
-    pub fn color(mut self, color: DividerColor) -> Self {
+    pub const fn color(mut self, color: DividerColor) -> Self {
         self.color = color;
         self
     }
  
  
  
    
    @@ -83,12 +83,12 @@ impl DropdownMenu {
         }
     }
 
-    pub fn style(mut self, style: DropdownStyle) -> Self {
+    pub const fn style(mut self, style: DropdownStyle) -> Self {
         self.style = style;
         self
     }
 
-    pub fn trigger_size(mut self, size: ButtonSize) -> Self {
+    pub const fn trigger_size(mut self, size: ButtonSize) -> Self {
         self.trigger_size = size;
         self
     }
@@ -101,12 +101,12 @@ impl DropdownMenu {
         self
     }
 
-    pub fn trigger_icon(mut self, icon: IconName) -> Self {
+    pub const fn trigger_icon(mut self, icon: IconName) -> Self {
         self.trigger_icon = Some(icon);
         self
     }
 
-    pub fn full_width(mut self, full_width: bool) -> Self {
+    pub const fn full_width(mut self, full_width: bool) -> Self {
         self.full_width = full_width;
         self
     }
@@ -117,23 +117,23 @@ impl DropdownMenu {
     }
 
     /// Defines which corner of the handle to attach the menu's anchor to.
-    pub fn attach(mut self, attach: Corner) -> Self {
+    pub const fn attach(mut self, attach: Corner) -> Self {
         self.attach = Some(attach);
         self
     }
 
     /// Offsets the position of the menu by that many pixels.
-    pub fn offset(mut self, offset: Point<Pixels>) -> Self {
+    pub const fn offset(mut self, offset: Point<Pixels>) -> Self {
         self.offset = Some(offset);
         self
     }
 
-    pub fn tab_index(mut self, arg: isize) -> Self {
+    pub const fn tab_index(mut self, arg: isize) -> Self {
         self.tab_index = Some(arg);
         self
     }
 
-    pub fn no_chevron(mut self) -> Self {
+    pub const fn no_chevron(mut self) -> Self {
         self.chevron = false;
         self
     }
  
  
  
    
    @@ -164,7 +164,7 @@ impl Icon {
         }
     }
 
-    pub fn color(mut self, color: Color) -> Self {
+    pub const fn color(mut self, color: Color) -> Self {
         self.color = color;
         self
     }
@@ -177,7 +177,7 @@ impl Icon {
     /// Sets a custom size for the icon, in [`Rems`].
     ///
     /// Not to be exposed outside of the `ui` crate.
-    pub(crate) fn custom_size(mut self, size: Rems) -> Self {
+    pub(crate) const fn custom_size(mut self, size: Rems) -> Self {
         self.size = size;
         self
     }
@@ -217,7 +217,7 @@ pub struct IconWithIndicator {
 }
 
 impl IconWithIndicator {
-    pub fn new(icon: Icon, indicator: Option<Indicator>) -> Self {
+    pub const fn new(icon: Icon, indicator: Option<Indicator>) -> Self {
         Self {
             icon,
             indicator,
@@ -230,14 +230,14 @@ impl IconWithIndicator {
         self
     }
 
-    pub fn indicator_color(mut self, color: Color) -> Self {
+    pub const fn indicator_color(mut self, color: Color) -> Self {
         if let Some(indicator) = self.indicator.as_mut() {
             indicator.color = color;
         }
         self
     }
 
-    pub fn indicator_border_color(mut self, color: Option<Hsla>) -> Self {
+    pub const fn indicator_border_color(mut self, color: Option<Hsla>) -> Self {
         self.indicator_border_color = color;
         self
     }
  
  
  
    
    @@ -9,7 +9,7 @@ pub struct DecoratedIcon {
 }
 
 impl DecoratedIcon {
-    pub fn new(icon: Icon, decoration: Option<IconDecoration>) -> Self {
+    pub const fn new(icon: Icon, decoration: Option<IconDecoration>) -> Self {
         Self { icon, decoration }
     }
 }
  
  
  
    
    @@ -36,7 +36,7 @@ pub enum IconDecorationKind {
 }
 
 impl IconDecorationKind {
-    fn fg(&self) -> KnockoutIconName {
+    const fn fg(&self) -> KnockoutIconName {
         match self {
             Self::X => KnockoutIconName::XFg,
             Self::Dot => KnockoutIconName::DotFg,
@@ -44,7 +44,7 @@ impl IconDecorationKind {
         }
     }
 
-    fn bg(&self) -> KnockoutIconName {
+    const fn bg(&self) -> KnockoutIconName {
         match self {
             Self::X => KnockoutIconName::XBg,
             Self::Dot => KnockoutIconName::DotBg,
@@ -84,13 +84,13 @@ impl IconDecoration {
     }
 
     /// Sets the kind of decoration.
-    pub fn kind(mut self, kind: IconDecorationKind) -> Self {
+    pub const fn kind(mut self, kind: IconDecorationKind) -> Self {
         self.kind = kind;
         self
     }
 
     /// Sets the color of the decoration.
-    pub fn color(mut self, color: Hsla) -> Self {
+    pub const fn color(mut self, color: Hsla) -> Self {
         self.color = color;
         self
     }
@@ -99,19 +99,19 @@ impl IconDecoration {
     ///
     /// Match this to the background of the element the icon will be rendered
     /// on.
-    pub fn knockout_color(mut self, color: Hsla) -> Self {
+    pub const fn knockout_color(mut self, color: Hsla) -> Self {
         self.knockout_color = color;
         self
     }
 
     /// Sets the color of the decoration that is used on hover.
-    pub fn knockout_hover_color(mut self, color: Hsla) -> Self {
+    pub const fn knockout_hover_color(mut self, color: Hsla) -> Self {
         self.knockout_hover_color = color;
         self
     }
 
     /// Sets the position of the decoration.
-    pub fn position(mut self, position: Point<Pixels>) -> Self {
+    pub const fn position(mut self, position: Point<Pixels>) -> Self {
         self.position = position;
         self
     }
  
  
  
    
    @@ -64,7 +64,7 @@ impl Vector {
     }
 
     /// Sets the vector color.
-    pub fn color(mut self, color: Color) -> Self {
+    pub const fn color(mut self, color: Color) -> Self {
         self.color = color;
         self
     }
  
  
  
    
    @@ -17,7 +17,7 @@ pub struct Indicator {
 }
 
 impl Indicator {
-    pub fn dot() -> Self {
+    pub const fn dot() -> Self {
         Self {
             kind: IndicatorKind::Dot,
             border_color: None,
@@ -25,7 +25,7 @@ impl Indicator {
         }
     }
 
-    pub fn bar() -> Self {
+    pub const fn bar() -> Self {
         Self {
             kind: IndicatorKind::Bar,
             border_color: None,
@@ -43,12 +43,12 @@ impl Indicator {
         }
     }
 
-    pub fn color(mut self, color: Color) -> Self {
+    pub const fn color(mut self, color: Color) -> Self {
         self.color = color;
         self
     }
 
-    pub fn border_color(mut self, color: Color) -> Self {
+    pub const fn border_color(mut self, color: Color) -> Self {
         self.border_color = Some(color);
         self
     }
  
  
  
    
    @@ -74,7 +74,7 @@ impl KeyBinding {
     }
 
     /// Sets the [`PlatformStyle`] for this [`KeyBinding`].
-    pub fn platform_style(mut self, platform_style: PlatformStyle) -> Self {
+    pub const fn platform_style(mut self, platform_style: PlatformStyle) -> Self {
         self.platform_style = platform_style;
         self
     }
@@ -87,12 +87,12 @@ impl KeyBinding {
 
     /// Sets whether this keybinding is currently disabled.
     /// Disabled keybinds will be rendered in a dimmed state.
-    pub fn disabled(mut self, disabled: bool) -> Self {
+    pub const fn disabled(mut self, disabled: bool) -> Self {
         self.disabled = disabled;
         self
     }
 
-    pub fn vim_mode(mut self, enabled: bool) -> Self {
+    pub const fn vim_mode(mut self, enabled: bool) -> Self {
         self.vim_mode = enabled;
         self
     }
@@ -370,7 +370,7 @@ impl RenderOnce for KeyIcon {
 }
 
 impl KeyIcon {
-    pub fn new(icon: IconName, color: Option<Color>) -> Self {
+    pub const fn new(icon: IconName, color: Option<Color>) -> Self {
         Self {
             icon,
             color,
  
  
  
    
    @@ -53,7 +53,7 @@ impl KeybindingHint {
     /// );
     /// # }
     /// ```
-    pub fn new(keybinding: KeyBinding, background_color: Hsla) -> Self {
+    pub const fn new(keybinding: KeyBinding, background_color: Hsla) -> Self {
         Self {
             prefix: None,
             suffix: None,
  
  
  
    
    @@ -44,14 +44,14 @@ impl SpinnerVariant {
         }
     }
 
-    fn duration(&self) -> Duration {
+    const fn duration(&self) -> Duration {
         match self {
             SpinnerVariant::Dots => Duration::from_millis(1000),
             SpinnerVariant::DotsVariant => Duration::from_millis(1000),
         }
     }
 
-    fn animation_id(&self) -> &'static str {
+    const fn animation_id(&self) -> &'static str {
         match self {
             SpinnerVariant::Dots => "spinner_label_dots",
             SpinnerVariant::DotsVariant => "spinner_label_dots_variant",
  
  
  
    
    @@ -65,7 +65,7 @@ impl ListHeader {
         self
     }
 
-    pub fn inset(mut self, inset: bool) -> Self {
+    pub const fn inset(mut self, inset: bool) -> Self {
         self.inset = inset;
         self
     }
  
  
  
    
    @@ -81,17 +81,17 @@ impl ListItem {
         self
     }
 
-    pub fn spacing(mut self, spacing: ListItemSpacing) -> Self {
+    pub const fn spacing(mut self, spacing: ListItemSpacing) -> Self {
         self.spacing = spacing;
         self
     }
 
-    pub fn selectable(mut self, has_hover: bool) -> Self {
+    pub const fn selectable(mut self, has_hover: bool) -> Self {
         self.selectable = has_hover;
         self
     }
 
-    pub fn always_show_disclosure_icon(mut self, show: bool) -> Self {
+    pub const fn always_show_disclosure_icon(mut self, show: bool) -> Self {
         self.always_show_disclosure_icon = show;
         self
     }
@@ -122,17 +122,17 @@ impl ListItem {
         self
     }
 
-    pub fn inset(mut self, inset: bool) -> Self {
+    pub const fn inset(mut self, inset: bool) -> Self {
         self.inset = inset;
         self
     }
 
-    pub fn indent_level(mut self, indent_level: usize) -> Self {
+    pub const fn indent_level(mut self, indent_level: usize) -> Self {
         self.indent_level = indent_level;
         self
     }
 
-    pub fn indent_step_size(mut self, indent_step_size: Pixels) -> Self {
+    pub const fn indent_step_size(mut self, indent_step_size: Pixels) -> Self {
         self.indent_step_size = indent_step_size;
         self
     }
@@ -165,22 +165,22 @@ impl ListItem {
         self
     }
 
-    pub fn outlined(mut self) -> Self {
+    pub const fn outlined(mut self) -> Self {
         self.outlined = true;
         self
     }
 
-    pub fn rounded(mut self) -> Self {
+    pub const fn rounded(mut self) -> Self {
         self.rounded = true;
         self
     }
 
-    pub fn overflow_x(mut self) -> Self {
+    pub const fn overflow_x(mut self) -> Self {
         self.overflow_x = true;
         self
     }
 
-    pub fn focused(mut self, focused: bool) -> Self {
+    pub const fn focused(mut self, focused: bool) -> Self {
         self.focused = Some(focused);
         self
     }
  
  
  
    
    @@ -21,7 +21,7 @@ impl ListSubHeader {
         }
     }
 
-    pub fn left_icon(mut self, left_icon: Option<IconName>) -> Self {
+    pub const fn left_icon(mut self, left_icon: Option<IconName>) -> Self {
         self.start_slot = left_icon;
         self
     }
@@ -31,7 +31,7 @@ impl ListSubHeader {
         self
     }
 
-    pub fn inset(mut self, inset: bool) -> Self {
+    pub const fn inset(mut self, inset: bool) -> Self {
         self.inset = inset;
         self
     }
  
  
  
    
    @@ -46,12 +46,12 @@ impl Modal {
         self
     }
 
-    pub fn show_dismiss(mut self, show: bool) -> Self {
+    pub const fn show_dismiss(mut self, show: bool) -> Self {
         self.header.show_dismiss_button = show;
         self
     }
 
-    pub fn show_back(mut self, show: bool) -> Self {
+    pub const fn show_back(mut self, show: bool) -> Self {
         self.header.show_back_button = show;
         self
     }
@@ -137,12 +137,12 @@ impl ModalHeader {
         self
     }
 
-    pub fn show_dismiss_button(mut self, show: bool) -> Self {
+    pub const fn show_dismiss_button(mut self, show: bool) -> Self {
         self.show_dismiss_button = show;
         self
     }
 
-    pub fn show_back_button(mut self, show: bool) -> Self {
+    pub const fn show_back_button(mut self, show: bool) -> Self {
         self.show_back_button = show;
         self
     }
@@ -254,7 +254,7 @@ impl Default for ModalFooter {
 }
 
 impl ModalFooter {
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         Self {
             start_slot: None,
             end_slot: None,
@@ -324,7 +324,7 @@ impl Section {
         }
     }
 
-    pub fn contained(mut self, contained: bool) -> Self {
+    pub const fn contained(mut self, contained: bool) -> Self {
         self.contained = contained;
         self
     }
@@ -338,7 +338,7 @@ impl Section {
         self.meta = Some(meta.into());
         self
     }
-    pub fn padded(mut self, padded: bool) -> Self {
+    pub const fn padded(mut self, padded: bool) -> Self {
         self.padded = padded;
         self
     }
  
  
  
    
    @@ -35,7 +35,7 @@ impl NavigableEntry {
 }
 impl Navigable {
     /// Creates new empty [Navigable] wrapper.
-    pub fn new(child: AnyElement) -> Self {
+    pub const fn new(child: AnyElement) -> Self {
         Self {
             child,
             selectable_children: vec![],
  
  
  
    
    @@ -161,7 +161,7 @@ impl<M: ManagedView> PopoverMenu<M> {
         }
     }
 
-    pub fn full_width(mut self, full_width: bool) -> Self {
+    pub const fn full_width(mut self, full_width: bool) -> Self {
         self.full_width = full_width;
         self
     }
@@ -219,19 +219,19 @@ impl<M: ManagedView> PopoverMenu<M> {
 
     /// Defines which corner of the menu to anchor to the attachment point.
     /// By default, it uses the cursor position. Also see the `attach` method.
-    pub fn anchor(mut self, anchor: Corner) -> Self {
+    pub const fn anchor(mut self, anchor: Corner) -> Self {
         self.anchor = anchor;
         self
     }
 
     /// Defines which corner of the handle to attach the menu's anchor to.
-    pub fn attach(mut self, attach: Corner) -> Self {
+    pub const fn attach(mut self, attach: Corner) -> Self {
         self.attach = Some(attach);
         self
     }
 
     /// Offsets the position of the content by that many pixels.
-    pub fn offset(mut self, offset: Point<Pixels>) -> Self {
+    pub const fn offset(mut self, offset: Point<Pixels>) -> Self {
         self.offset = Some(offset);
         self
     }
  
  
  
    
    @@ -30,31 +30,31 @@ impl ProgressBar {
     }
 
     /// Sets the current value of the progress bar.
-    pub fn value(mut self, value: f32) -> Self {
+    pub const fn value(mut self, value: f32) -> Self {
         self.value = value;
         self
     }
 
     /// Sets the maximum value of the progress bar.
-    pub fn max_value(mut self, max_value: f32) -> Self {
+    pub const fn max_value(mut self, max_value: f32) -> Self {
         self.max_value = max_value;
         self
     }
 
     /// Sets the background color of the progress bar.
-    pub fn bg_color(mut self, color: Hsla) -> Self {
+    pub const fn bg_color(mut self, color: Hsla) -> Self {
         self.bg_color = color;
         self
     }
 
     /// Sets the foreground color of the progress bar.
-    pub fn fg_color(mut self, color: Hsla) -> Self {
+    pub const fn fg_color(mut self, color: Hsla) -> Self {
         self.fg_color = color;
         self
     }
 
     /// Sets the over limit color of the progress bar.
-    pub fn over_color(mut self, color: Hsla) -> Self {
+    pub const fn over_color(mut self, color: Hsla) -> Self {
         self.over_color = color;
         self
     }
  
  
  
    
    @@ -34,13 +34,13 @@ impl<M: ManagedView> RightClickMenu<M> {
 
     /// anchor defines which corner of the menu to anchor to the attachment point
     /// (by default the cursor position, but see attach)
-    pub fn anchor(mut self, anchor: Corner) -> Self {
+    pub const fn anchor(mut self, anchor: Corner) -> Self {
         self.anchor = Some(anchor);
         self
     }
 
     /// attach defines which corner of the handle to attach the menu's anchor to
-    pub fn attach(mut self, attach: Corner) -> Self {
+    pub const fn attach(mut self, attach: Corner) -> Self {
         self.attach = Some(attach);
         self
     }
  
  
  
    
    @@ -83,7 +83,7 @@ pub mod scrollbars {
     pub struct ScrollbarAutoHide(pub bool);
 
     impl ScrollbarAutoHide {
-        pub fn should_hide(&self) -> bool {
+        pub const fn should_hide(&self) -> bool {
             self.0
         }
     }
@@ -342,11 +342,11 @@ impl ReservedSpace {
         *self != ReservedSpace::None
     }
 
-    fn needs_scroll_track(&self) -> bool {
+    const fn needs_scroll_track(&self) -> bool {
         matches!(self, ReservedSpace::Track(_))
     }
 
-    fn track_color(&self) -> Option<Hsla> {
+    const fn track_color(&self) -> Option<Hsla> {
         match self {
             ReservedSpace::Track(color) => Some(*color),
             _ => None,
@@ -363,7 +363,7 @@ enum ScrollbarWidth {
 }
 
 impl ScrollbarWidth {
-    fn to_pixels(&self) -> Pixels {
+    const fn to_pixels(&self) -> Pixels {
         match self {
             ScrollbarWidth::Normal => px(8.),
             ScrollbarWidth::Small => px(6.),
@@ -425,13 +425,13 @@ impl<ScrollHandle: ScrollableHandle> Scrollbars<ScrollHandle> {
     }
 
     /// Notify the current context whenever this scrollbar gets a scroll event
-    pub fn notify_content(mut self) -> Self {
+    pub const fn notify_content(mut self) -> Self {
         self.tracked_entity = Some(None);
         self
     }
 
     /// Set a parent model which should be notified whenever this scrollbar gets a scroll event.
-    pub fn tracked_entity(mut self, entity_id: EntityId) -> Self {
+    pub const fn tracked_entity(mut self, entity_id: EntityId) -> Self {
         self.tracked_entity = Some(Some(entity_id));
         self
     }
@@ -469,12 +469,12 @@ impl<ScrollHandle: ScrollableHandle> Scrollbars<ScrollHandle> {
         self
     }
 
-    pub fn width_sm(mut self) -> Self {
+    pub const fn width_sm(mut self) -> Self {
         self.scrollbar_width = ScrollbarWidth::Small;
         self
     }
 
-    pub fn width_xs(mut self) -> Self {
+    pub const fn width_xs(mut self) -> Self {
         self.scrollbar_width = ScrollbarWidth::XSmall;
         self
     }
@@ -513,7 +513,7 @@ impl VisibilityState {
         }
     }
 
-    fn is_visible(&self) -> bool {
+    const fn is_visible(&self) -> bool {
         matches!(self, Self::Visible | Self::Animating { .. })
     }
 
@@ -522,7 +522,7 @@ impl VisibilityState {
         *self == VisibilityState::Disabled
     }
 
-    fn animation_progress(&self) -> Option<(f32, Duration, bool)> {
+    const fn animation_progress(&self) -> Option<(f32, Duration, bool)> {
         match self {
             Self::Animating { showing, delta } => Some((
                 *delta,
@@ -690,7 +690,7 @@ impl<T: ScrollableHandle> ScrollbarState<T> {
     }
 
     #[inline]
-    fn visible_axes(&self) -> Option<ScrollAxes> {
+    const fn visible_axes(&self) -> Option<ScrollAxes> {
         match (&self.visibility.x, &self.visibility.y) {
             (ReservedSpace::None, ReservedSpace::None) => None,
             (ReservedSpace::None, _) => Some(ScrollAxes::Vertical),
@@ -721,7 +721,7 @@ impl<T: ScrollableHandle> ScrollbarState<T> {
             .flatten()
     }
 
-    fn scroll_handle(&self) -> &T {
+    const fn scroll_handle(&self) -> &T {
         &self.scroll_handle
     }
 
@@ -731,7 +731,7 @@ impl<T: ScrollableHandle> ScrollbarState<T> {
         cx.notify();
     }
 
-    fn is_dragging(&self) -> bool {
+    const fn is_dragging(&self) -> bool {
         self.thumb_state.is_dragging()
     }
 
@@ -850,7 +850,7 @@ impl<T: ScrollableHandle> ScrollbarState<T> {
             })
     }
 
-    fn visible(&self) -> bool {
+    const fn visible(&self) -> bool {
         self.show_state.is_visible()
     }
 
@@ -889,7 +889,7 @@ enum ThumbState {
 }
 
 impl ThumbState {
-    fn is_dragging(&self) -> bool {
+    const fn is_dragging(&self) -> bool {
         matches!(*self, ThumbState::Dragging(..))
     }
 }
  
  
  
    
    @@ -56,12 +56,12 @@ impl Tab {
         }
     }
 
-    pub fn position(mut self, position: TabPosition) -> Self {
+    pub const fn position(mut self, position: TabPosition) -> Self {
         self.position = position;
         self
     }
 
-    pub fn close_side(mut self, close_side: TabCloseSide) -> Self {
+    pub const fn close_side(mut self, close_side: TabCloseSide) -> Self {
         self.close_side = close_side;
         self
     }
  
  
  
    
    @@ -29,7 +29,7 @@ impl TabBar {
         self
     }
 
-    pub fn start_children_mut(&mut self) -> &mut SmallVec<[AnyElement; 2]> {
+    pub const fn start_children_mut(&mut self) -> &mut SmallVec<[AnyElement; 2]> {
         &mut self.start_children
     }
 
@@ -57,7 +57,7 @@ impl TabBar {
         self
     }
 
-    pub fn end_children_mut(&mut self) -> &mut SmallVec<[AnyElement; 2]> {
+    pub const fn end_children_mut(&mut self) -> &mut SmallVec<[AnyElement; 2]> {
         &mut self.end_children
     }
 
  
  
  
    
    @@ -69,13 +69,13 @@ impl Checkbox {
     }
 
     /// Sets the disabled state of the [`Checkbox`].
-    pub fn disabled(mut self, disabled: bool) -> Self {
+    pub const fn disabled(mut self, disabled: bool) -> Self {
         self.disabled = disabled;
         self
     }
 
     /// Sets the disabled state of the [`Checkbox`].
-    pub fn placeholder(mut self, placeholder: bool) -> Self {
+    pub const fn placeholder(mut self, placeholder: bool) -> Self {
         self.placeholder = placeholder;
         self
     }
@@ -100,19 +100,19 @@ impl Checkbox {
     }
 
     /// Sets the `fill` setting of the checkbox, indicating whether it should be filled.
-    pub fn fill(mut self) -> Self {
+    pub const fn fill(mut self) -> Self {
         self.filled = true;
         self
     }
 
     /// Sets the style of the checkbox using the specified [`ToggleStyle`].
-    pub fn style(mut self, style: ToggleStyle) -> Self {
+    pub const fn style(mut self, style: ToggleStyle) -> Self {
         self.style = style;
         self
     }
 
     /// Match the style of the checkbox to the current elevation using [`ToggleStyle::ElevationBased`].
-    pub fn elevation(mut self, elevation: ElevationIndex) -> Self {
+    pub const fn elevation(mut self, elevation: ElevationIndex) -> Self {
         self.style = ToggleStyle::ElevationBased(elevation);
         self
     }
@@ -156,7 +156,7 @@ impl Checkbox {
     }
 
     /// container size
-    pub fn container_size() -> Pixels {
+    pub const fn container_size() -> Pixels {
         px(20.0)
     }
 }
@@ -286,24 +286,24 @@ impl CheckboxWithLabel {
     }
 
     /// Sets the style of the checkbox using the specified [`ToggleStyle`].
-    pub fn style(mut self, style: ToggleStyle) -> Self {
+    pub const fn style(mut self, style: ToggleStyle) -> Self {
         self.style = style;
         self
     }
 
     /// Match the style of the checkbox to the current elevation using [`ToggleStyle::ElevationBased`].
-    pub fn elevation(mut self, elevation: ElevationIndex) -> Self {
+    pub const fn elevation(mut self, elevation: ElevationIndex) -> Self {
         self.style = ToggleStyle::ElevationBased(elevation);
         self
     }
 
     /// Sets the `fill` setting of the checkbox, indicating whether it should be filled.
-    pub fn fill(mut self) -> Self {
+    pub const fn fill(mut self) -> Self {
         self.filled = true;
         self
     }
 
-    pub fn checkbox_position(mut self, position: IconPosition) -> Self {
+    pub const fn checkbox_position(mut self, position: IconPosition) -> Self {
         self.checkbox_position = position;
         self
     }
@@ -443,13 +443,13 @@ impl Switch {
     }
 
     /// Sets the color of the switch using the specified [`SwitchColor`].
-    pub fn color(mut self, color: SwitchColor) -> Self {
+    pub const fn color(mut self, color: SwitchColor) -> Self {
         self.color = color;
         self
     }
 
     /// Sets the disabled state of the [`Switch`].
-    pub fn disabled(mut self, disabled: bool) -> Self {
+    pub const fn disabled(mut self, disabled: bool) -> Self {
         self.disabled = disabled;
         self
     }
@@ -632,14 +632,14 @@ impl SwitchField {
         self
     }
 
-    pub fn disabled(mut self, disabled: bool) -> Self {
+    pub const fn disabled(mut self, disabled: bool) -> Self {
         self.disabled = disabled;
         self
     }
 
     /// Sets the color of the switch using the specified [`SwitchColor`].
     /// This changes the color scheme of the switch when it's in the "on" state.
-    pub fn color(mut self, color: SwitchColor) -> Self {
+    pub const fn color(mut self, color: SwitchColor) -> Self {
         self.color = color;
         self
     }
@@ -649,7 +649,7 @@ impl SwitchField {
         self
     }
 
-    pub fn tab_index(mut self, tab_index: isize) -> Self {
+    pub const fn tab_index(mut self, tab_index: isize) -> Self {
         self.tab_index = Some(tab_index);
         self
     }
  
  
  
    
    @@ -77,17 +77,17 @@ impl TreeViewItem {
         self
     }
 
-    pub fn tab_index(mut self, tab_index: isize) -> Self {
+    pub const fn tab_index(mut self, tab_index: isize) -> Self {
         self.tab_index = Some(tab_index);
         self
     }
 
-    pub fn expanded(mut self, toggle: bool) -> Self {
+    pub const fn expanded(mut self, toggle: bool) -> Self {
         self.expanded = toggle;
         self
     }
 
-    pub fn default_expanded(mut self, default_expanded: bool) -> Self {
+    pub const fn default_expanded(mut self, default_expanded: bool) -> Self {
         self.default_expanded = default_expanded;
         self
     }
@@ -100,12 +100,12 @@ impl TreeViewItem {
         self
     }
 
-    pub fn root_item(mut self, root_item: bool) -> Self {
+    pub const fn root_item(mut self, root_item: bool) -> Self {
         self.root_item = root_item;
         self
     }
 
-    pub fn focused(mut self, focused: bool) -> Self {
+    pub const fn focused(mut self, focused: bool) -> Self {
         self.focused = focused;
         self
     }
  
  
  
    
    @@ -12,7 +12,7 @@ pub enum AnimationDuration {
 }
 
 impl AnimationDuration {
-    pub fn duration(&self) -> Duration {
+    pub const fn duration(&self) -> Duration {
         Duration::from_millis(*self as u64)
     }
 }
  
  
  
    
    @@ -166,7 +166,7 @@ pub enum HeadlineSize {
 
 impl HeadlineSize {
     /// Returns the headline size in rems.
-    pub fn rems(self) -> Rems {
+    pub const fn rems(self) -> Rems {
         match self {
             Self::XSmall => rems(0.88),
             Self::Small => rems(1.0),
@@ -177,7 +177,7 @@ impl HeadlineSize {
     }
 
     /// Returns the line height for the headline size.
-    pub fn line_height(self) -> Rems {
+    pub const fn line_height(self) -> Rems {
         match self {
             Self::XSmall => rems(1.6),
             Self::Small => rems(1.6),
@@ -221,13 +221,13 @@ impl Headline {
     }
 
     /// Set the size of the headline.
-    pub fn size(mut self, size: HeadlineSize) -> Self {
+    pub const fn size(mut self, size: HeadlineSize) -> Self {
         self.size = size;
         self
     }
 
     /// Set the color of the headline.
-    pub fn color(mut self, color: Color) -> Self {
+    pub const fn color(mut self, color: Color) -> Self {
         self.color = color;
         self
     }
  
  
  
    
    @@ -23,7 +23,7 @@ impl ToggleState {
     /// Returns the inverse of the current selection status.
     ///
     /// Indeterminate states become selected if inverted.
-    pub fn inverse(&self) -> Self {
+    pub const fn inverse(&self) -> Self {
         match self {
             Self::Unselected | Self::Indeterminate => Self::Selected,
             Self::Selected => Self::Unselected,
@@ -31,7 +31,7 @@ impl ToggleState {
     }
 
     /// Creates a `ToggleState` from the given `any_checked` and `all_checked` flags.
-    pub fn from_any_and_all(any_checked: bool, all_checked: bool) -> Self {
+    pub const fn from_any_and_all(any_checked: bool, all_checked: bool) -> Self {
         match (any_checked, all_checked) {
             (true, true) => Self::Selected,
             (false, false) => Self::Unselected,
@@ -40,7 +40,7 @@ impl ToggleState {
     }
 
     /// Returns whether this toggle state is selected
-    pub fn selected(&self) -> bool {
+    pub const fn selected(&self) -> bool {
         match self {
             ToggleState::Indeterminate | ToggleState::Unselected => false,
             ToggleState::Selected => true,
  
  
  
    
    @@ -30,7 +30,7 @@ pub struct CornerSolver {
 }
 
 impl CornerSolver {
-    pub fn new(root_radius: Pixels, root_border: Pixels, root_padding: Pixels) -> Self {
+    pub const fn new(root_radius: Pixels, root_border: Pixels, root_padding: Pixels) -> Self {
         Self {
             root_radius,
             root_border,
  
  
  
    
    @@ -30,7 +30,7 @@ pub struct FormatDistance {
 }
 
 impl FormatDistance {
-    pub fn new(date: DateTimeType, base_date: DateTimeType) -> Self {
+    pub const fn new(date: DateTimeType, base_date: DateTimeType) -> Self {
         Self {
             date,
             base_date,
@@ -44,17 +44,17 @@ impl FormatDistance {
         Self::new(date, DateTimeType::Local(Local::now()))
     }
 
-    pub fn include_seconds(mut self, include_seconds: bool) -> Self {
+    pub const fn include_seconds(mut self, include_seconds: bool) -> Self {
         self.include_seconds = include_seconds;
         self
     }
 
-    pub fn add_suffix(mut self, add_suffix: bool) -> Self {
+    pub const fn add_suffix(mut self, add_suffix: bool) -> Self {
         self.add_suffix = add_suffix;
         self
     }
 
-    pub fn hide_prefix(mut self, hide_prefix: bool) -> Self {
+    pub const fn hide_prefix(mut self, hide_prefix: bool) -> Self {
         self.hide_prefix = hide_prefix;
         self
     }
@@ -82,7 +82,7 @@ impl std::fmt::Display for FormatDistance {
 ///
 /// * `date` - A [NaiveDateTime`] object representing the date of interest
 /// * `base_date` - A [NaiveDateTime`] object representing the base date against which the comparison is made
-fn distance_in_seconds(date: NaiveDateTime, base_date: NaiveDateTime) -> i64 {
+const fn distance_in_seconds(date: NaiveDateTime, base_date: NaiveDateTime) -> i64 {
     let duration = date.signed_duration_since(base_date);
     -duration.num_seconds()
 }
  
  
  
    
    @@ -297,27 +297,27 @@ impl<T: NumberFieldType> NumberField<T> {
         self
     }
 
-    pub fn small_step(mut self, step: T) -> Self {
+    pub const fn small_step(mut self, step: T) -> Self {
         self.small_step = step;
         self
     }
 
-    pub fn normal_step(mut self, step: T) -> Self {
+    pub const fn normal_step(mut self, step: T) -> Self {
         self.step = step;
         self
     }
 
-    pub fn large_step(mut self, step: T) -> Self {
+    pub const fn large_step(mut self, step: T) -> Self {
         self.large_step = step;
         self
     }
 
-    pub fn min(mut self, min: T) -> Self {
+    pub const fn min(mut self, min: T) -> Self {
         self.min_value = min;
         self
     }
 
-    pub fn max(mut self, max: T) -> Self {
+    pub const fn max(mut self, max: T) -> Self {
         self.max_value = max;
         self
     }
@@ -330,7 +330,7 @@ impl<T: NumberFieldType> NumberField<T> {
         self
     }
 
-    pub fn tab_index(mut self, tab_index: isize) -> Self {
+    pub const fn tab_index(mut self, tab_index: isize) -> Self {
         self.tab_index = Some(tab_index);
         self
     }
  
  
  
    
    @@ -77,7 +77,7 @@ impl SingleLineInput {
         }
     }
 
-    pub fn start_icon(mut self, icon: IconName) -> Self {
+    pub const fn start_icon(mut self, icon: IconName) -> Self {
         self.start_icon = Some(icon);
         self
     }
@@ -87,7 +87,7 @@ impl SingleLineInput {
         self
     }
 
-    pub fn label_size(mut self, size: LabelSize) -> Self {
+    pub const fn label_size(mut self, size: LabelSize) -> Self {
         self.label_size = size;
         self
     }
@@ -107,7 +107,7 @@ impl SingleLineInput {
         self.editor().read(cx).text(cx).trim().is_empty()
     }
 
-    pub fn editor(&self) -> &Entity<Editor> {
+    pub const fn editor(&self) -> &Entity<Editor> {
         &self.editor
     }
 
  
  
  
    
    @@ -258,7 +258,7 @@ impl SanitizedPath {
         self.0.starts_with(&prefix.0)
     }
 
-    pub fn as_path(&self) -> &Path {
+    pub const fn as_path(&self) -> &Path {
         &self.0
     }
 
@@ -341,7 +341,7 @@ impl PathStyle {
     }
 
     #[inline]
-    pub fn separator(&self) -> &'static str {
+    pub const fn separator(&self) -> &'static str {
         match self {
             PathStyle::Posix => "/",
             PathStyle::Windows => "\\",
@@ -391,7 +391,7 @@ pub struct RemotePathBuf {
 }
 
 impl RemotePathBuf {
-    pub fn new(string: String, style: PathStyle) -> Self {
+    pub const fn new(string: String, style: PathStyle) -> Self {
         Self { style, string }
     }
 
@@ -399,7 +399,7 @@ impl RemotePathBuf {
         Self::new(path.to_string(), style)
     }
 
-    pub fn path_style(&self) -> PathStyle {
+    pub const fn path_style(&self) -> PathStyle {
         self.style
     }
 
@@ -539,7 +539,7 @@ pub struct PathWithPosition {
 
 impl PathWithPosition {
     /// Returns a PathWithPosition from a path.
-    pub fn from_path(path: PathBuf) -> Self {
+    pub const fn from_path(path: PathBuf) -> Self {
         Self {
             path,
             row: None,
  
  
  
    
    @@ -32,7 +32,7 @@ pub struct RelPathBuf(String);
 
 impl RelPath {
     /// Creates an empty [`RelPath`].
-    pub fn empty() -> &'static Self {
+    pub const fn empty() -> &'static Self {
         Self::new_unchecked("")
     }
 
@@ -111,20 +111,20 @@ impl RelPath {
         }
     }
 
-    fn new_unchecked(s: &str) -> &Self {
+    const fn new_unchecked(s: &str) -> &Self {
         // Safety: `RelPath` is a transparent wrapper around `str`.
         unsafe { &*(s as *const str as *const Self) }
     }
 
-    pub fn is_empty(&self) -> bool {
+    pub const fn is_empty(&self) -> bool {
         self.0.is_empty()
     }
 
-    pub fn components(&self) -> RelPathComponents<'_> {
+    pub const fn components(&self) -> RelPathComponents<'_> {
         RelPathComponents(&self.0)
     }
 
-    pub fn ancestors(&self) -> RelPathAncestors<'_> {
+    pub const fn ancestors(&self) -> RelPathAncestors<'_> {
         RelPathAncestors(Some(&self.0))
     }
 
@@ -235,7 +235,7 @@ impl RelPath {
     /// Get the internal unix-style representation of the path.
     ///
     /// This should not be shown to the user.
-    pub fn as_unix_str(&self) -> &str {
+    pub const fn as_unix_str(&self) -> &str {
         &self.0
     }
 
@@ -289,7 +289,7 @@ impl fmt::Debug for RelPathBuf {
 }
 
 impl RelPathBuf {
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         Self(String::new())
     }
 
@@ -312,7 +312,7 @@ impl RelPathBuf {
         self.0.push_str(&path.0);
     }
 
-    pub fn as_rel_path(&self) -> &RelPath {
+    pub const fn as_rel_path(&self) -> &RelPath {
         RelPath::new_unchecked(self.0.as_str())
     }
 
@@ -381,7 +381,7 @@ pub struct RelPathAncestors<'a>(Option<&'a str>);
 const SEPARATOR: char = '/';
 
 impl<'a> RelPathComponents<'a> {
-    pub fn rest(&self) -> &'a RelPath {
+    pub const fn rest(&self) -> &'a RelPath {
         RelPath::new_unchecked(self.0)
     }
 }
  
  
  
    
    @@ -749,7 +749,7 @@ impl<F: FnOnce()> Drop for Deferred<F> {
 
 /// Run the given function when the returned value is dropped (unless it's cancelled).
 #[must_use]
-pub fn defer<F: FnOnce()>(f: F) -> Deferred<F> {
+pub const fn defer<F: FnOnce()>(f: F) -> Deferred<F> {
     Deferred(Some(f))
 }
 
  
  
  
    
    @@ -22,7 +22,7 @@ pub enum Model {
 }
 
 impl Model {
-    pub fn default_fast() -> Self {
+    pub const fn default_fast() -> Self {
         Self::VZeroOnePointFiveMedium
     }
 
@@ -49,14 +49,14 @@ impl Model {
         }
     }
 
-    pub fn max_token_count(&self) -> u64 {
+    pub const fn max_token_count(&self) -> u64 {
         match self {
             Self::VZeroOnePointFiveMedium => 128_000,
             Self::Custom { max_tokens, .. } => *max_tokens,
         }
     }
 
-    pub fn max_output_tokens(&self) -> Option<u64> {
+    pub const fn max_output_tokens(&self) -> Option<u64> {
         match self {
             Self::VZeroOnePointFiveMedium => Some(32_000),
             Self::Custom {
@@ -65,14 +65,14 @@ impl Model {
         }
     }
 
-    pub fn supports_parallel_tool_calls(&self) -> bool {
+    pub const fn supports_parallel_tool_calls(&self) -> bool {
         match self {
             Self::VZeroOnePointFiveMedium => true,
             Model::Custom { .. } => false,
         }
     }
 
-    pub fn supports_prompt_cache_key(&self) -> bool {
+    pub const fn supports_prompt_cache_key(&self) -> bool {
         false
     }
 }
  
  
  
    
    @@ -164,7 +164,7 @@ impl VimOption {
         }
     }
 
-    fn to_string(&self) -> &'static str {
+    const fn to_string(&self) -> &'static str {
         match self {
             VimOption::Wrap(true) => "wrap",
             VimOption::Wrap(false) => "nowrap",
@@ -792,7 +792,7 @@ impl VimCommand {
         self
     }
 
-    fn count(mut self) -> Self {
+    const fn count(mut self) -> Self {
         self.has_count = true;
         self
     }
@@ -1140,7 +1140,7 @@ impl CommandRange {
         }
     }
 
-    pub fn as_count(&self) -> Option<u32> {
+    pub const fn as_count(&self) -> Option<u32> {
         if let CommandRange {
             start: Position::Line { row, offset: 0 },
             end: None,
  
  
  
    
    @@ -715,11 +715,11 @@ fn try_find_preceding_boundary_data<T>(
     None
 }
 
-fn is_buffer_start(left: char) -> bool {
+const fn is_buffer_start(left: char) -> bool {
     left == '\0'
 }
 
-fn is_buffer_end(right: char) -> bool {
+const fn is_buffer_end(right: char) -> bool {
     right == '\0'
 }
 
  
  
  
    
    @@ -28,14 +28,14 @@ pub(crate) enum MotionKind {
 }
 
 impl MotionKind {
-    pub(crate) fn for_mode(mode: Mode) -> Self {
+    pub(crate) const fn for_mode(mode: Mode) -> Self {
         match mode {
             Mode::VisualLine => MotionKind::Linewise,
             _ => MotionKind::Exclusive,
         }
     }
 
-    pub(crate) fn linewise(&self) -> bool {
+    pub(crate) const fn linewise(&self) -> bool {
         matches!(self, MotionKind::Linewise)
     }
 }
@@ -809,11 +809,11 @@ impl Motion {
         }
     }
 
-    fn skip_exclusive_special_case(&self) -> bool {
+    const fn skip_exclusive_special_case(&self) -> bool {
         matches!(self, Motion::WrappingLeft | Motion::WrappingRight)
     }
 
-    pub(crate) fn push_to_jump_list(&self) -> bool {
+    pub(crate) const fn push_to_jump_list(&self) -> bool {
         use Motion::*;
         match self {
             CurrentLine
@@ -880,7 +880,7 @@ impl Motion {
         }
     }
 
-    pub fn infallible(&self) -> bool {
+    pub const fn infallible(&self) -> bool {
         use Motion::*;
         match self {
             StartOfDocument | EndOfDocument | CurrentLine => true,
@@ -2628,7 +2628,7 @@ fn find_backward(
 }
 
 /// Returns true if one char is equal to the other or its uppercase variant (if smartcase is true).
-pub fn is_character_match(target: char, other: char, smartcase: bool) -> bool {
+pub const fn is_character_match(target: char, other: char, smartcase: bool) -> bool {
     if smartcase {
         if target.is_uppercase() {
             target == other
@@ -3015,7 +3015,7 @@ fn section_motion(
     display_point
 }
 
-fn matches_indent_type(
+const fn matches_indent_type(
     target_indent: &text::LineIndent,
     current_indent: &text::LineIndent,
     indent_type: IndentType,
  
  
  
    
    @@ -259,7 +259,7 @@ fn get_line_range(map: &DisplaySnapshot, point: Point) -> Range<Point> {
     start..end
 }
 
-fn get_visible_line_range(line_range: &Range<Point>) -> Range<Point> {
+const fn get_visible_line_range(line_range: &Range<Point>) -> Range<Point> {
     let end_column = line_range.end.column.saturating_sub(1);
     line_range.start..Point::new(line_range.end.row, end_column)
 }
@@ -448,7 +448,7 @@ impl Vim {
 }
 
 impl Object {
-    pub fn is_multiline(self) -> bool {
+    pub const fn is_multiline(self) -> bool {
         match self {
             Object::Word { .. }
             | Object::Subword { .. }
@@ -476,7 +476,7 @@ impl Object {
         }
     }
 
-    pub fn always_expands_both_ways(self) -> bool {
+    pub const fn always_expands_both_ways(self) -> bool {
         match self {
             Object::Word { .. }
             | Object::Subword { .. }
@@ -1367,7 +1367,7 @@ fn sentence(
     Some(range)
 }
 
-fn is_possible_sentence_start(character: char) -> bool {
+const fn is_possible_sentence_start(character: char) -> bool {
     !character.is_whitespace() && character != '.'
 }
 
  
  
  
    
    @@ -66,7 +66,7 @@ impl Display for Mode {
 }
 
 impl Mode {
-    pub fn is_visual(&self) -> bool {
+    pub const fn is_visual(&self) -> bool {
         match self {
             Self::Visual | Self::VisualLine | Self::VisualBlock | Self::HelixSelect => true,
             Self::Normal | Self::Insert | Self::Replace | Self::HelixNormal => false,
@@ -994,7 +994,7 @@ pub struct SearchState {
 }
 
 impl Operator {
-    pub fn id(&self) -> &'static str {
+    pub const fn id(&self) -> &'static str {
         match self {
             Operator::Object { around: false } => "i",
             Operator::Object { around: true } => "a",
@@ -1063,7 +1063,7 @@ impl Operator {
         }
     }
 
-    pub fn is_waiting(&self, mode: Mode) -> bool {
+    pub const fn is_waiting(&self, mode: Mode) -> bool {
         match self {
             Operator::AddSurrounds { target } => target.is_some() || mode.is_visual(),
             Operator::FindForward { .. }
@@ -1106,7 +1106,7 @@ impl Operator {
         }
     }
 
-    pub fn starts_dot_recording(&self) -> bool {
+    pub const fn starts_dot_recording(&self) -> bool {
         match self {
             Operator::Change
             | Operator::Delete
  
  
  
    
    @@ -1296,7 +1296,7 @@ impl Vim {
         !(self.mode == Mode::Insert && self.last_mode == Mode::VisualBlock)
     }
 
-    pub fn clip_at_line_ends(&self) -> bool {
+    pub const fn clip_at_line_ends(&self) -> bool {
         match self.mode {
             Mode::Insert
             | Mode::Visual
  
  
  
    
    @@ -31,7 +31,7 @@ pub fn channel<T>(value: T) -> (Sender<T>, Receiver<T>) {
 struct WakerId(usize);
 
 impl WakerId {
-    fn post_inc(&mut self) -> Self {
+    const fn post_inc(&mut self) -> Self {
         let id = *self;
         self.0 = id.0.wrapping_add(1);
         *self
  
  
  
    
    @@ -236,7 +236,7 @@ impl Into<settings::DockPosition> for DockPosition {
 }
 
 impl DockPosition {
-    fn label(&self) -> &'static str {
+    const fn label(&self) -> &'static str {
         match self {
             Self::Left => "Left",
             Self::Bottom => "Bottom",
@@ -244,7 +244,7 @@ impl DockPosition {
         }
     }
 
-    pub fn axis(&self) -> Axis {
+    pub const fn axis(&self) -> Axis {
         match self {
             Self::Left | Self::Right => Axis::Horizontal,
             Self::Bottom => Axis::Vertical,
@@ -342,11 +342,11 @@ impl Dock {
         dock
     }
 
-    pub fn position(&self) -> DockPosition {
+    pub const fn position(&self) -> DockPosition {
         self.position
     }
 
-    pub fn is_open(&self) -> bool {
+    pub const fn is_open(&self) -> bool {
         self.is_open
     }
 
@@ -395,7 +395,7 @@ impl Dock {
             .and_then(|index| self.panel_entries.get(index))
     }
 
-    pub fn active_panel_index(&self) -> Option<usize> {
+    pub const fn active_panel_index(&self) -> Option<usize> {
         self.active_panel_index
     }
 
@@ -627,7 +627,7 @@ impl Dock {
         }
     }
 
-    pub fn panels_len(&self) -> usize {
+    pub const fn panels_len(&self) -> usize {
         self.panel_entries.len()
     }
 
  
  
  
    
    @@ -32,7 +32,7 @@ struct GlobalHistoryManager(Entity<HistoryManager>);
 impl Global for GlobalHistoryManager {}
 
 impl HistoryManager {
-    fn new() -> Self {
+    const fn new() -> Self {
         Self {
             history: Vec::new(),
         }
  
  
  
    
    @@ -117,7 +117,7 @@ pub struct TabContentParams {
 
 impl TabContentParams {
     /// Returns the text color to be used for the tab content.
-    pub fn text_color(&self) -> Color {
+    pub const fn text_color(&self) -> Color {
         if self.deemphasized {
             if self.selected {
                 Color::Muted
  
  
  
    
    @@ -67,7 +67,7 @@ impl Default for ModalLayer {
 }
 
 impl ModalLayer {
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         Self {
             active_modal: None,
             dismiss_on_focus_lost: false,
@@ -159,7 +159,7 @@ impl ModalLayer {
         active_modal.modal.view().downcast::<V>().ok()
     }
 
-    pub fn has_active_modal(&self) -> bool {
+    pub const fn has_active_modal(&self) -> bool {
         self.active_modal.is_some()
     }
 }
  
  
  
    
    @@ -52,7 +52,7 @@ impl NotificationId {
     }
 
     /// Builds a `NotificationId` out of the given string.
-    pub fn named(id: SharedString) -> Self {
+    pub const fn named(id: SharedString) -> Self {
         Self::Named(id)
     }
 }
@@ -500,12 +500,12 @@ impl NotificationFrame {
 
     /// Determines whether the given notification ID should be suppressible
     /// Suppressed motifications will not be shown anymore
-    pub fn show_suppress_button(mut self, show: bool) -> Self {
+    pub const fn show_suppress_button(mut self, show: bool) -> Self {
         self.show_suppress_button = show;
         self
     }
 
-    pub fn show_close_button(mut self, show: bool) -> Self {
+    pub const fn show_close_button(mut self, show: bool) -> Self {
         self.show_close_button = show;
         self
     }
@@ -676,12 +676,12 @@ pub mod simple_message_notification {
             self
         }
 
-        pub fn primary_icon(mut self, icon: IconName) -> Self {
+        pub const fn primary_icon(mut self, icon: IconName) -> Self {
             self.primary_icon = Some(icon);
             self
         }
 
-        pub fn primary_icon_color(mut self, color: Color) -> Self {
+        pub const fn primary_icon_color(mut self, color: Color) -> Self {
             self.primary_icon_color = Some(color);
             self
         }
@@ -710,12 +710,12 @@ pub mod simple_message_notification {
             self
         }
 
-        pub fn secondary_icon(mut self, icon: IconName) -> Self {
+        pub const fn secondary_icon(mut self, icon: IconName) -> Self {
             self.secondary_icon = Some(icon);
             self
         }
 
-        pub fn secondary_icon_color(mut self, color: Color) -> Self {
+        pub const fn secondary_icon_color(mut self, color: Color) -> Self {
             self.secondary_icon_color = Some(color);
             self
         }
@@ -756,14 +756,14 @@ pub mod simple_message_notification {
             cx.emit(DismissEvent);
         }
 
-        pub fn show_close_button(mut self, show: bool) -> Self {
+        pub const fn show_close_button(mut self, show: bool) -> Self {
             self.show_close_button = show;
             self
         }
 
         /// Determines whether the given notification ID should be supressable
         /// Suppressed motifications will not be shown anymor
-        pub fn show_suppress_button(mut self, show: bool) -> Self {
+        pub const fn show_suppress_button(mut self, show: bool) -> Self {
             self.show_suppress_button = show;
             self
         }
  
  
  
    
    @@ -251,7 +251,7 @@ actions!(
 );
 
 impl DeploySearch {
-    pub fn find() -> Self {
+    pub const fn find() -> Self {
         Self {
             replace_enabled: false,
             included_files: None,
@@ -715,7 +715,7 @@ impl Pane {
         cx.notify();
     }
 
-    pub fn active_item_index(&self) -> usize {
+    pub const fn active_item_index(&self) -> usize {
         self.active_item_index
     }
 
@@ -794,11 +794,11 @@ impl Pane {
         }
     }
 
-    pub fn nav_history(&self) -> &NavHistory {
+    pub const fn nav_history(&self) -> &NavHistory {
         &self.nav_history
     }
 
-    pub fn nav_history_mut(&mut self) -> &mut NavHistory {
+    pub const fn nav_history_mut(&mut self) -> &mut NavHistory {
         &mut self.nav_history
     }
 
@@ -846,7 +846,7 @@ impl Pane {
         self.toolbar.update(cx, |_, cx| cx.notify());
     }
 
-    pub fn preview_item_id(&self) -> Option<EntityId> {
+    pub const fn preview_item_id(&self) -> Option<EntityId> {
         self.preview_item_id
     }
 
@@ -879,11 +879,11 @@ impl Pane {
     }
 
     /// Should only be used when deserializing a pane.
-    pub fn set_pinned_count(&mut self, count: usize) {
+    pub const fn set_pinned_count(&mut self, count: usize) {
         self.pinned_tab_count = count;
     }
 
-    pub fn pinned_count(&self) -> usize {
+    pub const fn pinned_count(&self) -> usize {
         self.pinned_tab_count
     }
 
@@ -2319,7 +2319,7 @@ impl Pane {
         }
     }
 
-    pub fn toolbar(&self) -> &Entity<Toolbar> {
+    pub const fn toolbar(&self) -> &Entity<Toolbar> {
         &self.toolbar
     }
 
@@ -2388,7 +2388,7 @@ impl Pane {
         })
     }
 
-    pub fn icon_color(selected: bool) -> Color {
+    pub const fn icon_color(selected: bool) -> Color {
         if selected {
             Color::Default
         } else {
@@ -2488,7 +2488,7 @@ impl Pane {
         });
     }
 
-    fn is_tab_pinned(&self, ix: usize) -> bool {
+    const fn is_tab_pinned(&self, ix: usize) -> bool {
         self.pinned_tab_count > ix
     }
 
@@ -3180,7 +3180,7 @@ impl Pane {
         cx.notify();
     }
 
-    pub fn is_zoomed(&self) -> bool {
+    pub const fn is_zoomed(&self) -> bool {
         self.zoomed
     }
 
@@ -3515,7 +3515,7 @@ impl Pane {
             .log_err();
     }
 
-    pub fn display_nav_history_buttons(&mut self, display: Option<bool>) {
+    pub const fn display_nav_history_buttons(&mut self, display: Option<bool>) {
         self.display_nav_history_buttons = display;
     }
 
@@ -3568,11 +3568,11 @@ impl Pane {
             .collect()
     }
 
-    pub fn drag_split_direction(&self) -> Option<SplitDirection> {
+    pub const fn drag_split_direction(&self) -> Option<SplitDirection> {
         self.drag_split_direction
     }
 
-    pub fn set_zoom_out_on_close(&mut self, zoom_out_on_close: bool) {
+    pub const fn set_zoom_out_on_close(&mut self, zoom_out_on_close: bool) {
         self.zoom_out_on_close = zoom_out_on_close;
     }
 }
  
  
  
    
    @@ -36,11 +36,11 @@ pub struct PaneRenderResult {
 }
 
 impl PaneGroup {
-    pub fn with_root(root: Member) -> Self {
+    pub const fn with_root(root: Member) -> Self {
         Self { root }
     }
 
-    pub fn new(pane: Entity<Pane>) -> Self {
+    pub const fn new(pane: Entity<Pane>) -> Self {
         Self {
             root: Member::Pane(pane),
         }
@@ -271,7 +271,7 @@ pub struct ActivePaneDecorator<'a> {
 }
 
 impl<'a> ActivePaneDecorator<'a> {
-    pub fn new(active_pane: &'a Entity<Pane>, workspace: &'a WeakEntity<Workspace>) -> Self {
+    pub const fn new(active_pane: &'a Entity<Pane>, workspace: &'a WeakEntity<Workspace>) -> Self {
         Self {
             active_pane,
             workspace,
@@ -902,7 +902,7 @@ impl std::fmt::Display for SplitDirection {
 }
 
 impl SplitDirection {
-    pub fn all() -> [Self; 4] {
+    pub const fn all() -> [Self; 4] {
         [Self::Up, Self::Down, Self::Left, Self::Right]
     }
 
@@ -950,14 +950,14 @@ impl SplitDirection {
         }
     }
 
-    pub fn axis(&self) -> Axis {
+    pub const fn axis(&self) -> Axis {
         match self {
             Self::Up | Self::Down => Axis::Vertical,
             Self::Left | Self::Right => Axis::Horizontal,
         }
     }
 
-    pub fn increasing(&self) -> bool {
+    pub const fn increasing(&self) -> bool {
         match self {
             Self::Left | Self::Up => false,
             Self::Down | Self::Right => true,
@@ -1040,7 +1040,7 @@ mod element {
     }
 
     impl PaneAxisElement {
-        pub fn with_active_pane(mut self, active_pane_ix: Option<usize>) -> Self {
+        pub const fn with_active_pane(mut self, active_pane_ix: Option<usize>) -> Self {
             self.active_pane_ix = active_pane_ix;
             self
         }
  
  
  
    
    @@ -71,7 +71,7 @@ pub struct DockStructure {
 }
 
 impl RemoteConnectionKind {
-    pub(crate) fn serialize(&self) -> &'static str {
+    pub(crate) const fn serialize(&self) -> &'static str {
         match self {
             RemoteConnectionKind::Ssh => "ssh",
             RemoteConnectionKind::Wsl => "wsl",
@@ -254,7 +254,7 @@ pub struct SerializedPane {
 }
 
 impl SerializedPane {
-    pub fn new(children: Vec<SerializedItem>, active: bool, pinned_count: usize) -> Self {
+    pub const fn new(children: Vec<SerializedItem>, active: bool, pinned_count: usize) -> Self {
         SerializedPane {
             children,
             active,
  
  
  
    
    @@ -26,7 +26,7 @@ pub enum Direction {
 }
 
 impl Direction {
-    pub fn opposite(&self) -> Self {
+    pub const fn opposite(&self) -> Self {
         match self {
             Direction::Prev => Direction::Next,
             Direction::Next => Direction::Prev,
  
  
  
    
    @@ -36,7 +36,7 @@ enum ThemePreviewPage {
 }
 
 impl ThemePreviewPage {
-    pub fn name(&self) -> &'static str {
+    pub const fn name(&self) -> &'static str {
         match self {
             Self::Overview => "Overview",
             Self::Typography => "Typography",
  
  
  
    
    @@ -101,7 +101,7 @@ impl Default for ToastLayer {
 }
 
 impl ToastLayer {
-    pub fn new() -> Self {
+    pub const fn new() -> Self {
         Self {
             active_toast: None,
             duration_remaining: None,
@@ -158,7 +158,7 @@ impl ToastLayer {
         active_toast.toast.view().downcast::<V>().ok()
     }
 
-    pub fn has_active_toast(&self) -> bool {
+    pub const fn has_active_toast(&self) -> bool {
         self.active_toast.is_some()
     }
 
  
  
  
    
    @@ -233,7 +233,7 @@ impl Toolbar {
             .find_map(|(item, _)| item.to_any().downcast().ok())
     }
 
-    pub fn hidden(&self) -> bool {
+    pub const fn hidden(&self) -> bool {
         self.hidden
     }
 }
  
  
  
    
    @@ -285,7 +285,7 @@ pub struct MoveItemToPane {
     pub clone: bool,
 }
 
-fn default_1() -> usize {
+const fn default_1() -> usize {
     1
 }
 
@@ -302,7 +302,7 @@ pub struct MoveItemToPaneInDirection {
     pub clone: bool,
 }
 
-fn default_right() -> SplitDirection {
+const fn default_right() -> SplitDirection {
     SplitDirection::Right
 }
 
@@ -472,7 +472,7 @@ impl Toast {
         self
     }
 
-    pub fn autohide(mut self) -> Self {
+    pub const fn autohide(mut self) -> Self {
         self.autohide = true;
         self
     }
@@ -997,7 +997,7 @@ struct DelayedDebouncedEditAction {
 }
 
 impl DelayedDebouncedEditAction {
-    fn new() -> DelayedDebouncedEditAction {
+    const fn new() -> DelayedDebouncedEditAction {
         DelayedDebouncedEditAction {
             task: None,
             cancel_channel: None,
@@ -1698,11 +1698,11 @@ impl Workspace {
         self.weak_self.clone()
     }
 
-    pub fn left_dock(&self) -> &Entity<Dock> {
+    pub const fn left_dock(&self) -> &Entity<Dock> {
         &self.left_dock
     }
 
-    pub fn bottom_dock(&self) -> &Entity<Dock> {
+    pub const fn bottom_dock(&self) -> &Entity<Dock> {
         &self.bottom_dock
     }
 
@@ -1721,15 +1721,15 @@ impl Workspace {
         self.serialize_workspace(window, cx);
     }
 
-    pub fn right_dock(&self) -> &Entity<Dock> {
+    pub const fn right_dock(&self) -> &Entity<Dock> {
         &self.right_dock
     }
 
-    pub fn all_docks(&self) -> [&Entity<Dock>; 3] {
+    pub const fn all_docks(&self) -> [&Entity<Dock>; 3] {
         [&self.left_dock, &self.bottom_dock, &self.right_dock]
     }
 
-    pub fn dock_at_position(&self, position: DockPosition) -> &Entity<Dock> {
+    pub const fn dock_at_position(&self, position: DockPosition) -> &Entity<Dock> {
         match position {
             DockPosition::Left => &self.left_dock,
             DockPosition::Bottom => &self.bottom_dock,
@@ -1737,7 +1737,7 @@ impl Workspace {
         }
     }
 
-    pub fn is_edited(&self) -> bool {
+    pub const fn is_edited(&self) -> bool {
         self.window_edited
     }
 
@@ -1772,7 +1772,7 @@ impl Workspace {
         }
     }
 
-    pub fn status_bar(&self) -> &Entity<StatusBar> {
+    pub const fn status_bar(&self) -> &Entity<StatusBar> {
         &self.status_bar
     }
 
@@ -1780,7 +1780,7 @@ impl Workspace {
         StatusBarSettings::get_global(cx).show
     }
 
-    pub fn app_state(&self) -> &Arc<AppState> {
+    pub const fn app_state(&self) -> &Arc<AppState> {
         &self.app_state
     }
 
@@ -1788,7 +1788,7 @@ impl Workspace {
         &self.app_state.user_store
     }
 
-    pub fn project(&self) -> &Entity<Project> {
+    pub const fn project(&self) -> &Entity<Project> {
         &self.project
     }
 
@@ -4199,7 +4199,7 @@ impl Workspace {
         &self.panes
     }
 
-    pub fn active_pane(&self) -> &Entity<Pane> {
+    pub const fn active_pane(&self) -> &Entity<Pane> {
         &self.active_pane
     }
 
@@ -5164,7 +5164,7 @@ impl Workspace {
         }
     }
 
-    pub fn database_id(&self) -> Option<WorkspaceId> {
+    pub const fn database_id(&self) -> Option<WorkspaceId> {
         self.database_id
     }
 
@@ -5954,7 +5954,7 @@ impl Workspace {
         window.root().flatten()
     }
 
-    pub fn zoomed_item(&self) -> Option<&AnyWeakView> {
+    pub const fn zoomed_item(&self) -> Option<&AnyWeakView> {
         self.zoomed.as_ref()
     }
 
@@ -6884,7 +6884,7 @@ impl WorkspaceStore {
         })?
     }
 
-    pub fn workspaces(&self) -> &HashSet<WindowHandle<Workspace>> {
+    pub const fn workspaces(&self) -> &HashSet<WindowHandle<Workspace>> {
         &self.workspaces
     }
 }
@@ -6900,7 +6900,7 @@ impl ViewId {
         })
     }
 
-    pub(crate) fn to_proto(self) -> Option<proto::ViewId> {
+    pub(crate) const fn to_proto(self) -> Option<proto::ViewId> {
         if let CollaboratorId::PeerId(peer_id) = self.creator {
             Some(proto::ViewId {
                 creator: Some(peer_id),
  
  
  
    
    @@ -570,7 +570,7 @@ impl Worktree {
         })
     }
 
-    pub fn as_local(&self) -> Option<&LocalWorktree> {
+    pub const fn as_local(&self) -> Option<&LocalWorktree> {
         if let Worktree::Local(worktree) = self {
             Some(worktree)
         } else {
@@ -578,7 +578,7 @@ impl Worktree {
         }
     }
 
-    pub fn as_remote(&self) -> Option<&RemoteWorktree> {
+    pub const fn as_remote(&self) -> Option<&RemoteWorktree> {
         if let Worktree::Remote(worktree) = self {
             Some(worktree)
         } else {
@@ -586,7 +586,7 @@ impl Worktree {
         }
     }
 
-    pub fn as_local_mut(&mut self) -> Option<&mut LocalWorktree> {
+    pub const fn as_local_mut(&mut self) -> Option<&mut LocalWorktree> {
         if let Worktree::Local(worktree) = self {
             Some(worktree)
         } else {
@@ -594,7 +594,7 @@ impl Worktree {
         }
     }
 
-    pub fn as_remote_mut(&mut self) -> Option<&mut RemoteWorktree> {
+    pub const fn as_remote_mut(&mut self) -> Option<&mut RemoteWorktree> {
         if let Worktree::Remote(worktree) = self {
             Some(worktree)
         } else {
@@ -602,11 +602,11 @@ impl Worktree {
         }
     }
 
-    pub fn is_local(&self) -> bool {
+    pub const fn is_local(&self) -> bool {
         matches!(self, Worktree::Local(_))
     }
 
-    pub fn is_remote(&self) -> bool {
+    pub const fn is_remote(&self) -> bool {
         !self.is_local()
     }
 
@@ -647,14 +647,14 @@ impl Worktree {
         }
     }
 
-    pub fn is_visible(&self) -> bool {
+    pub const fn is_visible(&self) -> bool {
         match self {
             Worktree::Local(worktree) => worktree.visible,
             Worktree::Remote(worktree) => worktree.visible,
         }
     }
 
-    pub fn replica_id(&self) -> ReplicaId {
+    pub const fn replica_id(&self) -> ReplicaId {
         match self {
             Worktree::Local(_) => 0,
             Worktree::Remote(worktree) => worktree.replica_id,
@@ -1018,7 +1018,7 @@ impl LocalWorktree {
         !self.share_private_files && self.settings.is_path_private(path)
     }
 
-    pub fn fs_is_case_sensitive(&self) -> bool {
+    pub const fn fs_is_case_sensitive(&self) -> bool {
         self.fs_case_sensitive
     }
 
@@ -1792,7 +1792,7 @@ impl LocalWorktree {
 }
 
 impl RemoteWorktree {
-    pub fn project_id(&self) -> u64 {
+    pub const fn project_id(&self) -> u64 {
         self.project_id
     }
 
@@ -2053,7 +2053,7 @@ impl Snapshot {
         }
     }
 
-    pub fn id(&self) -> WorktreeId {
+    pub const fn id(&self) -> WorktreeId {
         self.id
     }
 
@@ -2367,7 +2367,7 @@ impl Snapshot {
         self.root_name.as_unix_str()
     }
 
-    pub fn scan_id(&self) -> usize {
+    pub const fn scan_id(&self) -> usize {
         self.scan_id
     }
 
@@ -2388,7 +2388,7 @@ impl Snapshot {
         self.entry_for_path(&entry.path)
     }
 
-    pub fn path_style(&self) -> PathStyle {
+    pub const fn path_style(&self) -> PathStyle {
         self.path_style
     }
 }
@@ -3175,7 +3175,7 @@ impl File {
         self.worktree.read(cx).id()
     }
 
-    pub fn project_entry_id(&self) -> Option<ProjectEntryId> {
+    pub const fn project_entry_id(&self) -> Option<ProjectEntryId> {
         match self.disk_state {
             DiskState::Deleted => None,
             _ => self.entry_id,
@@ -3386,32 +3386,32 @@ impl Entry {
         }
     }
 
-    pub fn is_created(&self) -> bool {
+    pub const fn is_created(&self) -> bool {
         self.mtime.is_some()
     }
 
-    pub fn is_dir(&self) -> bool {
+    pub const fn is_dir(&self) -> bool {
         self.kind.is_dir()
     }
 
-    pub fn is_file(&self) -> bool {
+    pub const fn is_file(&self) -> bool {
         self.kind.is_file()
     }
 }
 
 impl EntryKind {
-    pub fn is_dir(&self) -> bool {
+    pub const fn is_dir(&self) -> bool {
         matches!(
             self,
             EntryKind::Dir | EntryKind::PendingDir | EntryKind::UnloadedDir
         )
     }
 
-    pub fn is_unloaded(&self) -> bool {
+    pub const fn is_unloaded(&self) -> bool {
         matches!(self, EntryKind::UnloadedDir)
     }
 
-    pub fn is_file(&self) -> bool {
+    pub const fn is_file(&self) -> bool {
         matches!(self, EntryKind::File)
     }
 }
@@ -5201,7 +5201,7 @@ struct TraversalProgress<'a> {
 }
 
 impl TraversalProgress<'_> {
-    fn count(&self, include_files: bool, include_dirs: bool, include_ignored: bool) -> usize {
+    const fn count(&self, include_files: bool, include_dirs: bool, include_ignored: bool) -> usize {
         match (include_files, include_dirs, include_ignored) {
             (true, true, true) => self.count,
             (true, true, false) => self.non_ignored_count,
@@ -5315,11 +5315,11 @@ impl<'a> Traversal<'a> {
         self.cursor.item()
     }
 
-    pub fn snapshot(&self) -> &'a Snapshot {
+    pub const fn snapshot(&self) -> &'a Snapshot {
         self.snapshot
     }
 
-    pub fn start_offset(&self) -> usize {
+    pub const fn start_offset(&self) -> usize {
         self.cursor
             .start()
             .count(self.include_files, self.include_dirs, self.include_ignored)
@@ -5390,11 +5390,11 @@ enum TraversalTarget<'a> {
 }
 
 impl<'a> TraversalTarget<'a> {
-    fn path(path: &'a RelPath) -> Self {
+    const fn path(path: &'a RelPath) -> Self {
         Self::Path(PathTarget::Path(path))
     }
 
-    fn successor(path: &'a RelPath) -> Self {
+    const fn successor(path: &'a RelPath) -> Self {
         Self::Path(PathTarget::Successor(path))
     }
 
@@ -5522,19 +5522,19 @@ impl ProjectEntryId {
         Self(counter.fetch_add(1, SeqCst))
     }
 
-    pub fn from_proto(id: u64) -> Self {
+    pub const fn from_proto(id: u64) -> Self {
         Self(id as usize)
     }
 
-    pub fn to_proto(self) -> u64 {
+    pub const fn to_proto(self) -> u64 {
         self.0 as u64
     }
 
-    pub fn from_usize(id: usize) -> Self {
+    pub const fn from_usize(id: usize) -> Self {
         ProjectEntryId(id)
     }
 
-    pub fn to_usize(self) -> usize {
+    pub const fn to_usize(self) -> usize {
         self.0
     }
 }
  
  
  
    
    @@ -47,7 +47,7 @@ pub enum Model {
 }
 
 impl Model {
-    pub fn default_fast() -> Self {
+    pub const fn default_fast() -> Self {
         Self::Grok3Fast
     }
 
@@ -98,7 +98,7 @@ impl Model {
         }
     }
 
-    pub fn max_token_count(&self) -> u64 {
+    pub const fn max_token_count(&self) -> u64 {
         match self {
             Self::Grok3 | Self::Grok3Mini | Self::Grok3Fast | Self::Grok3MiniFast => 131_072,
             Self::Grok4 | Self::GrokCodeFast1 => 256_000,
@@ -108,7 +108,7 @@ impl Model {
         }
     }
 
-    pub fn max_output_tokens(&self) -> Option<u64> {
+    pub const fn max_output_tokens(&self) -> Option<u64> {
         match self {
             Self::Grok3 | Self::Grok3Mini | Self::Grok3Fast | Self::Grok3MiniFast => Some(8_192),
             Self::Grok4
@@ -122,7 +122,7 @@ impl Model {
         }
     }
 
-    pub fn supports_parallel_tool_calls(&self) -> bool {
+    pub const fn supports_parallel_tool_calls(&self) -> bool {
         match self {
             Self::Grok2Vision
             | Self::Grok3
@@ -140,11 +140,11 @@ impl Model {
         }
     }
 
-    pub fn supports_prompt_cache_key(&self) -> bool {
+    pub const fn supports_prompt_cache_key(&self) -> bool {
         false
     }
 
-    pub fn supports_tool(&self) -> bool {
+    pub const fn supports_tool(&self) -> bool {
         match self {
             Self::Grok2Vision
             | Self::Grok3
@@ -163,7 +163,7 @@ impl Model {
         }
     }
 
-    pub fn supports_images(&self) -> bool {
+    pub const fn supports_images(&self) -> bool {
         match self {
             Self::Grok2Vision => true,
             Self::Custom {
  
  
  
    
    @@ -880,7 +880,7 @@ pub struct ComponentPreviewPage {
 }
 
 impl ComponentPreviewPage {
-    pub fn new(
+    pub const fn new(
         component: ComponentMetadata,
         reset_key: usize,
         // languages: Arc<LanguageRegistry>
  
  
  
    
    @@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize};
 // These may provide relevant context:
 // https://github.com/rust-lang/rust/issues/47384
 // https://github.com/mmastrac/rust-ctor/issues/280
-pub fn init() {}
+pub const fn init() {}
 
 /// Opens a URL in the system's default web browser.
 #[derive(Clone, PartialEq, Deserialize, JsonSchema, Action)]
@@ -412,7 +412,7 @@ pub enum Spawn {
 }
 
 impl Spawn {
-    pub fn modal() -> Self {
+    pub const fn modal() -> Self {
         Self::ViaModal {
             reveal_target: None,
         }
  
  
  
    
    @@ -59,7 +59,7 @@ impl Display for OpenSourceLicense {
 impl OpenSourceLicense {
     /// These are SPDX identifiers for the licenses, except for BSD, where the variants are not
     /// distinguished.
-    pub fn spdx_identifier(&self) -> &'static str {
+    pub const fn spdx_identifier(&self) -> &'static str {
         match self {
             OpenSourceLicense::Apache2_0 => "apache-2.0",
             OpenSourceLicense::BSDZero => "0bsd",
@@ -71,7 +71,7 @@ impl OpenSourceLicense {
         }
     }
 
-    pub fn patterns(&self) -> &'static [&'static str] {
+    pub const fn patterns(&self) -> &'static [&'static str] {
         match self {
             OpenSourceLicense::Apache2_0 => &[
                 include_str!("../license_patterns/apache-2.0-pattern"),
  
  
  
    
    @@ -45,7 +45,7 @@ enum RateCompletionView {
 }
 
 impl RateCompletionView {
-    pub fn name(&self) -> &'static str {
+    pub const fn name(&self) -> &'static str {
         match self {
             Self::SuggestedEdits => "Suggested Edits",
             Self::RawInput => "Recorded Events & Input",
  
  
  
    
    @@ -1203,14 +1203,14 @@ pub enum DataCollectionChoice {
 }
 
 impl DataCollectionChoice {
-    pub fn is_enabled(self) -> bool {
+    pub const fn is_enabled(self) -> bool {
         match self {
             Self::Enabled => true,
             Self::NotAnswered | Self::Disabled => false,
         }
     }
 
-    pub fn is_answered(self) -> bool {
+    pub const fn is_answered(self) -> bool {
         match self {
             Self::Enabled | Self::Disabled => true,
             Self::NotAnswered => false,
@@ -1218,7 +1218,7 @@ impl DataCollectionChoice {
     }
 
     #[must_use]
-    pub fn toggle(&self) -> DataCollectionChoice {
+    pub const fn toggle(&self) -> DataCollectionChoice {
         match self {
             Self::Enabled => Self::Disabled,
             Self::Disabled => Self::Enabled,
@@ -1574,7 +1574,7 @@ impl edit_prediction::EditPredictionProvider for ZetaEditPredictionProvider {
 /// intentionally low to err on the side of underestimating limits.
 const BYTES_PER_TOKEN_GUESS: usize = 3;
 
-fn guess_token_count(bytes: usize) -> usize {
+const fn guess_token_count(bytes: usize) -> usize {
     bytes / BYTES_PER_TOKEN_GUESS
 }
 
  
  
  
    
    @@ -190,7 +190,7 @@ pub fn interpolate_edits(
     if edits.is_empty() { None } else { Some(edits) }
 }
 
-pub fn line_range_to_point_range(range: Range<predict_edits_v3::Line>) -> Range<language::Point> {
+pub const fn line_range_to_point_range(range: Range<predict_edits_v3::Line>) -> Range<language::Point> {
     language::Point::new(range.start.0, 0)..language::Point::new(range.end.0, 0)
 }
 
  
  
  
    
    @@ -235,11 +235,11 @@ impl Zeta {
         debug_watch_rx
     }
 
-    pub fn options(&self) -> &ZetaOptions {
+    pub const fn options(&self) -> &ZetaOptions {
         &self.options
     }
 
-    pub fn set_options(&mut self, options: ZetaOptions) {
+    pub const fn set_options(&mut self, options: ZetaOptions) {
         self.options = options;
     }
 
  
  
  
    
    @@ -320,7 +320,7 @@ impl ScopeMap {
         this
     }
 
-    pub fn is_empty(&self) -> bool {
+    pub const fn is_empty(&self) -> bool {
         self.entries.is_empty() && self.modules.is_empty()
     }
 
  
  
  
    
    @@ -327,7 +327,7 @@ impl Timer {
         }
     }
 
-    pub fn warn_if_gt(mut self, warn_limit: std::time::Duration) -> Self {
+    pub const fn warn_if_gt(mut self, warn_limit: std::time::Duration) -> Self {
         self.warn_if_longer_than = Some(warn_limit);
         self
     }