Tolti i link OpenAI dagli avvisi della TUI (B)
Da 03524f02: via i riferimenti a developers.openai.com / help.openai.com dagli avvisi
(sandbox, MCP, memorie, safety buffering, aggiornamenti).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -147,23 +147,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.",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,7 +162,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)],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,37 +192,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> {
|
||||
|
||||
Reference in New Issue
Block a user