MCPcopy Create free account
hub / github.com/AI45Lab/Code / detect_local_context_perception_intent

Function detect_local_context_perception_intent

core/src/agent/context_perception.rs:22–143  ·  view source on GitHub ↗
(
    prompt: &str,
    session_id: &str,
    workspace: &str,
)

Source from the content-addressed store, hash-verified

20}
21
22pub(super) fn detect_local_context_perception_intent(
23 prompt: &str,
24 session_id: &str,
25 workspace: &str,
26) -> Option<PreContextPerceptionEvent> {
27 let lower = prompt.to_lowercase();
28
29 let intents: &[(&[&str], &str)] = &[
30 (
31 &[
32 "where is",
33 "where are",
34 "find the file",
35 "find all",
36 "find files",
37 "who wrote",
38 "locate",
39 "search for",
40 "look for",
41 "search",
42 ],
43 "locate",
44 ),
45 (
46 &[
47 "how does",
48 "what does",
49 "explain",
50 "understand",
51 "what is this",
52 "how does this work",
53 ],
54 "understand",
55 ),
56 (
57 &[
58 "remember",
59 "earlier",
60 "before",
61 "previously",
62 "last time",
63 "past",
64 "previous",
65 ],
66 "retrieve",
67 ),
68 (
69 &[
70 "how is organized",
71 "project structure",
72 "what files",
73 "show me the structure",
74 "explore",
75 ],
76 "explore",
77 ),
78 (
79 &[

Calls 3

containsMethod · 0.80