pub fn is_interactive_tool(tool_name: &str) -> bool {
matches!(tool_name, "question")
}
pub fn is_local_cuda_provider(provider: &str) -> bool {
matches!(provider, "local-cuda" | "local_cuda" | "localcuda")
}
pub fn local_cuda_light_system_prompt() -> String {
std::env::var("CODETETHER_LOCAL_CUDA_SYSTEM_PROMPT").unwrap_or_else(|_| {
"You are CodeTether local CUDA assistant. Be concise and execution-focused. \
Use tools only when needed. For tool discovery, call list_tools first, then call specific tools with valid JSON arguments. \
Do not invent tool outputs."
.to_string()
})
}
pub fn is_codesearch_no_match_output(tool_name: &str, success: bool, output: &str) -> bool {
tool_name == "codesearch"
&& success
&& output
.to_ascii_lowercase()
.contains("no matches found for pattern:")
}