Provide default auto-scope prompt and confirmation dialog

This commit is contained in:
kh.ai
2025-10-17 10:20:52 -07:00
parent 1cf533496d
commit ad88013ac4
+13
View File
@@ -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()