codetether_rlm/engine/
classify.rs1use crate::oracle::{GrepOracle, QueryType};
4
5#[derive(Debug, Clone, Copy, PartialEq, Eq)]
7pub enum QueryKind {
8 Pattern,
10 Structural,
12 Semantic,
14}
15
16pub fn classify(tool_id: &str, query: &str) -> QueryKind {
18 if matches!(
19 tool_id,
20 "session_context" | "context_reset" | "summary_index"
21 ) {
22 return QueryKind::Semantic;
23 }
24 match GrepOracle::classify_query(query) {
25 QueryType::PatternMatch => QueryKind::Pattern,
26 QueryType::Structural => QueryKind::Structural,
27 QueryType::Semantic => QueryKind::Semantic,
28 }
29}