Avoid panic when opening thread as markdown in non-local project (#30061)
Right now `agent: open active thread as markdown` will always panic when you try to use it over collab or when SSH remoting. This PR makes it log an error instead (we should follow up by restoring full remote support). Release Notes: - Prevented `agent: open active thread as markdown` from panicking when used in a non-local project.
This commit is contained in:
parent
f7511c3f65
commit
03b635bb27
1 changed files with 5 additions and 0 deletions
|
@ -3448,6 +3448,11 @@ pub(crate) fn open_active_thread_as_markdown(
|
|||
.unwrap_or_else(|| "Thread".to_string());
|
||||
|
||||
let project = workspace.project().clone();
|
||||
|
||||
if !project.read(cx).is_local() {
|
||||
anyhow::bail!("failed to open active thread as markdown in remote project");
|
||||
}
|
||||
|
||||
let buffer = project.update(cx, |project, cx| {
|
||||
project.create_local_buffer(&markdown, Some(markdown_language), cx)
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue