()
| 751 | } |
| 752 | |
| 753 | pub 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 | |
| 786 | pub fn program_repo_map() -> ProgramTemplate { |
| 787 | let mut template = ProgramTemplate::new( |
nothing calls this directly
no test coverage detected