MCPcopy Create free account
hub / github.com/bajrangCoder/setu / render_error

Method render_error

src/views/response_view.rs:505–531  ·  view source on GitHub ↗
(
        &self,
        theme: &gpui_component::theme::ThemeColor,
        message: &str,
    )

Source from the content-addressed store, hash-verified

503 if generation_clock.load(Ordering::Acquire) != generation {
504 return;
505 }
506 let Ok((content, model)) = result else {
507 let _ = view.update(app, |this, cx| {
508 if formatted && this.requested_body == Some(key) {
509 this.requested_body = None;
510 } else if !formatted && this.requested_raw == Some(key) {
511 this.requested_raw = None;
512 }
513 cx.notify();
514 });
515 return;
516 };
517
518 let is_current = response.read(app).data.as_ref().is_some_and(|data| {
519 data.body_hash() == key.body_hash && data.content_category() == key.category
520 });
521 if !is_current {
522 let _ = view.update(app, |this, cx| {
523 if formatted && this.requested_body == Some(key) {
524 this.requested_body = None;
525 } else if !formatted && this.requested_raw == Some(key) {
526 this.requested_raw = None;
527 }
528 cx.notify();
529 });
530 return;
531 }
532
533 response.update(app, |response, _cx| {
534 if let Some(data) = response.data.as_mut() {

Callers 1

render_contentMethod · 0.80

Calls 1

childMethod · 0.80

Tested by

no test coverage detected