zed-industries/zed · error

prompt_for_new_path is not supported on the web

Error message

prompt_for_new_path is not supported on the web

What it means

Sentinel from the web platform's prompt_for_new_path: browsers have no native save-as dialog, so the returned channel always resolves with this error. Fires whenever a create/save-file prompt is requested on the web.

Source

Thrown at crates/gpui_web/src/platform.rs:446

            .browser_window
            .match_media("(prefers-color-scheme: dark)")
        else {
            return WindowAppearance::Light;
        };
        if media_query.matches() {
            WindowAppearance::Dark
        } else {
            WindowAppearance::Light
        }
    }

    fn open_url(&self, url: &str) {
        if let Err(error) = self.browser_window.open_with_url(url) {
            log::warn!("Failed to open URL '{url}': {error:?}");
        }
    }

    fn on_open_urls(&self, callback: Box<dyn FnMut(Vec<String>)>) {
        self.callbacks.borrow_mut().open_urls = Some(callback);
    }

    fn register_url_scheme(&self, _url: &str) -> Task<Result<()>> {
        Task::ready(Ok(()))
    }

    fn prompt_for_paths(
        &self,
        _options: PathPromptOptions,
    ) -> oneshot::Receiver<Result<Option<Vec<PathBuf>>>> {
        let (tx, rx) = oneshot::channel();
        tx.send(Err(anyhow::anyhow!(
            "prompt_for_paths is not supported on the web"
        )))
        .ok();
        rx
    }

View on GitHub (pinned to 9d272b0363)

Solutions

  1. Use a web download flow or the File System Access API (showSaveFilePicker) instead
  2. Disable save-as prompts on the web via capability detection
  3. Handle the sentinel at call sites to offer an alternative (e.g. download to disk)
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/gpui_web/src/platform.rs:446 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@9d272b0363 (2026-08-20). Data as JSON: /api/errors/d9e1643786a4bb60. Report an issue: GitHub.