Pull app / OS info out of GPUI, add Linux information, make fallible window initialization (#12869)
TODO: - [x] Finish GPUI changes on other operating systems This is a largely internal change to how we report data to our diagnostics and telemetry. This PR also includes an update to our blade backend which allows us to report errors in a more useful way when failing to initialize blade. Release Notes: - N/A --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
parent
ec9e700e70
commit
80c14c9198
50 changed files with 571 additions and 550 deletions
|
@ -1,5 +1,6 @@
|
|||
use gpui::{actions, AppContext, ClipboardItem, PromptLevel};
|
||||
use system_specs::SystemSpecs;
|
||||
use util::ResultExt;
|
||||
use workspace::Workspace;
|
||||
|
||||
pub mod feedback_modal;
|
||||
|
@ -38,25 +39,38 @@ pub fn init(cx: &mut AppContext) {
|
|||
feedback_modal::FeedbackModal::register(workspace, cx);
|
||||
workspace
|
||||
.register_action(|_, _: &CopySystemSpecsIntoClipboard, cx| {
|
||||
let specs = SystemSpecs::new(&cx).to_string();
|
||||
let specs = SystemSpecs::new(&cx);
|
||||
|
||||
let prompt = cx.prompt(
|
||||
PromptLevel::Info,
|
||||
"Copied into clipboard",
|
||||
Some(&specs),
|
||||
&["OK"],
|
||||
);
|
||||
cx.spawn(|_, _cx| async move {
|
||||
prompt.await.ok();
|
||||
cx.spawn(|_, mut cx| async move {
|
||||
let specs = specs.await.to_string();
|
||||
|
||||
cx.update(|cx| cx.write_to_clipboard(ClipboardItem::new(specs.clone())))
|
||||
.log_err();
|
||||
|
||||
cx.prompt(
|
||||
PromptLevel::Info,
|
||||
"Copied into clipboard",
|
||||
Some(&specs),
|
||||
&["OK"],
|
||||
)
|
||||
.await
|
||||
.ok();
|
||||
})
|
||||
.detach();
|
||||
cx.write_to_clipboard(ClipboardItem::new(specs.clone()));
|
||||
})
|
||||
.register_action(|_, _: &RequestFeature, cx| {
|
||||
cx.open_url(request_feature_url());
|
||||
})
|
||||
.register_action(move |_, _: &FileBugReport, cx| {
|
||||
cx.open_url(&file_bug_report_url(&SystemSpecs::new(&cx)));
|
||||
let specs = SystemSpecs::new(&cx);
|
||||
cx.spawn(|_, mut cx| async move {
|
||||
let specs = specs.await;
|
||||
cx.update(|cx| {
|
||||
cx.open_url(&file_bug_report_url(&specs));
|
||||
})
|
||||
.log_err();
|
||||
})
|
||||
.detach();
|
||||
})
|
||||
.register_action(move |_, _: &OpenZedRepo, cx| {
|
||||
cx.open_url(zed_repo_url());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue