import{a as d}from"./chunk-HWKDQ44K.js";import{a as i,b as l}from"./chunk-74CEPOFO.js";var u={name:"ag-find-symbol",summary:"search for symbols across the workspace",usage:"ag-find-symbol <query>",options:["    --help        display this help and exit"]},p={name:"ag-find-symbol",async execute(s,n){if(l(s))return i(u);let o=d("ag-find-symbol",s,Object.create(null));if(!o.ok)return o.error;let{positional:m}=o.result,r=m[0];if(!n.bash)return{stdout:"",stderr:`ag-find-symbol: no bash host available
`,exitCode:1};let t=await n.bash.indexer.findSymbols(r);if(t.length===0)return{stdout:`No symbols found matching '${r}'.
`,stderr:"",exitCode:0};let a=`Found ${t.length} symbols:
`;return t.forEach(e=>{a+=`  - ${e.name} (${e.type}) in ${e.path} (line ${e.line})
`}),{stdout:a,stderr:"",exitCode:0}}};export{p as a};
