MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / draw_confirm_delete

Function draw_confirm_delete

crates/openshell-tui/src/ui/sandbox_settings.rs:172–199  ·  view source on GitHub ↗
(frame: &mut Frame<'_>, app: &App, idx: usize, area: Rect)

Source from the content-addressed store, hash-verified

170}
171
172fn draw_confirm_delete(frame: &mut Frame<'_>, app: &App, idx: usize, area: Rect) {
173 let t = &app.theme;
174 let Some(entry) = app.sandbox_settings.get(idx) else {
175 return;
176 };
177 let sandbox_name = app.selected_sandbox_name().unwrap_or("-");
178
179 let lines = vec![
180 Line::from(Span::styled(" Delete Sandbox Setting ", t.status_err)),
181 Line::from(""),
182 Line::from(vec![
183 Span::styled("Delete setting ", t.text),
184 Span::styled(&entry.key, t.accent),
185 Span::styled(" for ", t.text),
186 Span::styled(sandbox_name, t.accent),
187 Span::styled("?", t.text),
188 ]),
189 Line::from(""),
190 Line::from(vec![
191 Span::styled("[y]", t.key_hint),
192 Span::styled(" Delete ", t.muted),
193 Span::styled("[n]", t.key_hint),
194 Span::styled(" Cancel", t.muted),
195 ]),
196 ];
197
198 super::draw_confirm_popup(frame, lines, t.status_err, 55, area);
199}

Callers 1

drawFunction · 0.70

Calls 3

draw_confirm_popupFunction · 0.85
selected_sandbox_nameMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected