mirror of
https://github.com/openai/codex.git
synced 2026-05-03 04:42:20 +03:00
Add config to disable /feedback (#8909)
Some enterprises do not want their users to be able to `/feedback`. <img width="395" height="325" alt="image" src="https://github.com/user-attachments/assets/2dae9c0b-20c3-4a15-bcd3-0187857ebbd8" /> Adds to `config.toml`: ```toml [feedback] enabled = false ``` I've deliberately decided to: 1. leave other references to `/feedback` (e.g. in the interrupt message, tips of the day) unchanged. I think we should continue to promote the feature even if it is not usable currently. 2. leave the `/feedback` menu item selectable and display an error saying it's disabled, rather than remove the menu item (which I believe would raise more questions). but happy to discuss these. This will be followed by a change to requirements.toml that admins can use to force the value of feedback.enabled.
This commit is contained in:
@@ -380,6 +380,21 @@ pub(crate) fn feedback_selection_params(
|
||||
}
|
||||
}
|
||||
|
||||
/// Build the selection popup params shown when feedback is disabled.
|
||||
pub(crate) fn feedback_disabled_params() -> super::SelectionViewParams {
|
||||
super::SelectionViewParams {
|
||||
title: Some("Sending feedback is disabled".to_string()),
|
||||
subtitle: Some("This action is disabled by configuration.".to_string()),
|
||||
footer_hint: Some(standard_popup_hint_line()),
|
||||
items: vec![super::SelectionItem {
|
||||
name: "Close".to_string(),
|
||||
dismiss_on_select: true,
|
||||
..Default::default()
|
||||
}],
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
fn make_feedback_item(
|
||||
app_event_tx: AppEventSender,
|
||||
name: &str,
|
||||
|
||||
Reference in New Issue
Block a user