mirror of
https://github.com/openai/codex.git
synced 2026-11-02 19:43:24 +00:00
Provide default auto-scope prompt and confirmation dialog
This commit is contained in:
@@ -2191,6 +2191,19 @@ impl ChatWidget {
|
||||
}
|
||||
}
|
||||
|
||||
let mut scope_prompt = scope_prompt;
|
||||
if resolved_paths.is_empty() && scope_prompt.is_none() {
|
||||
let default_prompt = match mode {
|
||||
SecurityReviewMode::Full => {
|
||||
"Identify the most security-relevant directories (3-8) for a comprehensive review. Focus on production services, externally reachable interfaces, auth/authz modules, secret management, and critical infrastructure. Exclude tests, vendor bundles, docs, and generated files."
|
||||
}
|
||||
SecurityReviewMode::Bugs => {
|
||||
"Suggest the smallest set of directories (3-8) most likely to contain exploitable bugs. Prioritise request parsing, input validation, authentication, authorisation, and secret handling. Skip tests, vendor bundles, docs, and generated files."
|
||||
}
|
||||
};
|
||||
scope_prompt = Some(default_prompt.to_string());
|
||||
}
|
||||
|
||||
let mut context_paths = display_paths.clone();
|
||||
if context_paths.is_empty()
|
||||
&& let Some(prompt) = scope_prompt.as_ref()
|
||||
|
||||
Reference in New Issue
Block a user