aKode: rimossi i link a OpenAI dagli avvisi della TUI

- Avvisi di sicurezza, buffering e catalogo plugin senza link a
  help.openai.com e chatgpt.com; snapshot aggiornati.
- Rimossi il riesporto e la funzione per i link sottolineati rimasti
  senza utilizzi (nessun avviso nella build release).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-11 16:40:27 +01:00
parent 24a3cfe2f4
commit 03524f0272
21 changed files with 41 additions and 107 deletions

View File

@@ -106,23 +106,13 @@ pub(crate) struct SafetyAccessBlockCell {
title: &'static str,
pub(crate) explanation: Option<String>,
body: &'static str,
actions: &'static [(&'static str, &'static str)],
}
const SAFETY_ACCESS_BLOCK_LEARN_MORE_URL: &str = "https://help.openai.com/en/articles/20001326";
pub(crate) fn new_safety_access_block_event() -> SafetyAccessBlockCell {
SafetyAccessBlockCell {
title: "This content can't be shown",
explanation: Some("We take extra caution with requests involving biological research and applications that could pose safety risks.".into()),
body: "Eligible researchers can apply for Trusted Access.",
actions: &[
(
"Trusted Access",
"https://chatgpt.com/r/b749fb02595e04c3007a54375f3f4374",
),
("Learn more", SAFETY_ACCESS_BLOCK_LEARN_MORE_URL),
],
body: "Some biological research requests are limited.",
}
}
@@ -131,7 +121,6 @@ pub(crate) fn new_cyber_policy_error_event() -> SafetyAccessBlockCell {
title: "This content can’t be shown",
explanation: Some("We take extra care with some cybersecurity requests.".into()),
body: "Some cybersecurity requests are limited.",
actions: &[("Learn more", SAFETY_ACCESS_BLOCK_LEARN_MORE_URL)],
}
}
@@ -162,37 +151,11 @@ impl HistoryCell for SafetyAccessBlockCell {
let mut wrapped_body = Vec::new();
push_owned_lines(&wrapped, &mut wrapped_body);
lines.extend(plain_hyperlink_lines(wrapped_body));
for &(label, url) in self.actions {
let source = crate::terminal_hyperlinks::annotate_web_urls_in_line(
vec![
format!(" {label}: ").dim(),
url.fg(accent_color()).underlined(),
]
.into(),
);
let wrapped = crate::wrapping::word_wrap_line(
&source.line,
RtOptions::new(wrap_width).subsequent_indent(" ".into()),
);
let mut wrapped_links = Vec::new();
push_owned_lines(&wrapped, &mut wrapped_links);
lines.extend(crate::terminal_hyperlinks::remap_wrapped_line(
&source,
wrapped_links,
));
}
lines
}
fn raw_lines(&self) -> Vec<Line<'static>> {
let mut lines = vec![Line::from(self.title), Line::from(self.message())];
lines.extend(
self.actions
.iter()
.map(|(label, target)| Line::from(format!("{label}: {target}"))),
);
lines
vec![Line::from(self.title), Line::from(self.message())]
}
fn transcript_hyperlink_lines(&self, width: u16) -> Vec<HyperlinkLine> {