MCPcopy Index your code
hub / github.com/AI45Lab/Code / program_code_search

Function program_code_search

core/src/program.rs:753–784  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

751}
752
753pub fn program_code_search() -> ProgramTemplate {
754 ProgramTemplate::new(
755 "program_code_search",
756 "Search code with a bounded grep pass and return file/line matches.",
757 )
758 .with_parameter(ProgramParameter::required(
759 "query",
760 "Regex or literal pattern to search for.",
761 ))
762 .with_parameter(ProgramParameter::optional(
763 "path",
764 "Workspace-relative path to search.",
765 serde_json::json!("."),
766 ))
767 .with_parameter(ProgramParameter::optional(
768 "glob",
769 "Optional file glob filter.",
770 serde_json::json!("*"),
771 ))
772 .with_step(
773 ProgramStepTemplate::new(
774 "grep",
775 serde_json::json!({
776 "pattern": "{{query}}",
777 "path": "{{path}}",
778 "glob": "{{glob}}",
779 "context": 2
780 }),
781 )
782 .with_label("search_code"),
783 )
784}
785
786pub fn program_repo_map() -> ProgramTemplate {
787 let mut template = ProgramTemplate::new(

Callers

nothing calls this directly

Calls 3

with_stepMethod · 0.80
with_parameterMethod · 0.80
with_labelMethod · 0.80

Tested by

no test coverage detected