Lines 131-171javascript
132`}else g=`[Note: Section "${o}" not found. Falling back to full page.]
134`}if(!g||g.includes("Falling back to full page"))if(g&&g.includes("Falling back to full page")&&(g=""),t){let w=d(t);if(w.length>0)g=w.text().replace(/\s+/g," ").trim();else{for(let T of cf){let x=d(T);if(x.length>0){let S=x.text().replace(/\s+/g," ").trim();if(S.length>pf){g=S;break}}}if(g)g=`[Note: Selector "${t}" not found. Showing auto-detected main content instead.]
136${g}`;else return`No element found matching selector "${t}" and could not auto-detect main content from ${e}`}}else for(let w of cf){let T=d(w);if(T.length>0){let x=T.text().replace(/\s+/g," ").trim();if(x.length>pf){g=x;break}}}if(g||(g=d("body").text().replace(/\s+/g," ").trim(),g&&(g=`[Note: Could not detect main content area. Showing full page text (may include navigation).]
138${g}`)),!g)return`Could not extract any content from ${e}`;if(g.length>s){let w=g.substring(0,s);return`[Warning: Content exceeds ${s} chars (actual: ${g.length} chars). Showing first ${s} chars only.]
140RECOMMENDATION: Use web.map to see page structure, then use web.scrape with section parameter to extract specific sections.
142Page content from ${e}:
146... [Content truncated. ${g.length-s} chars remaining. Use section parameter to extract specific sections.]`}return`Page content from ${e}:
148${g}`}var Fx,qx,cf,pf,Ko,ci=h(()=>{"use strict";c();lf();k();Fx="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",qx=["script","style","nav","footer","header","iframe",".ads",".sidebar","noscript"],cf=["article","main",".content","#content",'[role="main"]',"body"],pf=200;Ko={name:of,displayName:nf,description:rf,parameters:af,category:sf,execute:Wx}});var df,uf,ff,gf,hf,yf=h(()=>{"use strict";c();df="web.extract_links",uf="Extract Links",ff="Extract all links from a webpage. Returns an array of objects with text and URL. Optio ...
150`;for(let m of l){let d=" ".repeat(m.level-1);p+=`${d}${"#".repeat(m.level)} ${m.text}
151`}return p}var Bx,Vo,mi=h(()=>{"use strict";c();Sf();Bx="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36";Vo={name:wf,displayName:Tf,description:xf,parameters:Cf,category:vf,execute:zx}});var Pf,Rf,_f,$f,Ef,Df=h(()=>{"use strict";c();Pf
152`);for(let m of p){if(l.length>=t)break;let d=m.trim();if(d.toLowerCase().startsWith("sitemap:"))l.push({loc:d.substring(8).trim()});else if(d.toLowerCase().startsWith("allow:")){let g=d.substring(6).trim();l.push({loc:new URL(g,n).toString()})}}}return JSON.stringify(l,null,2)}var Jx,Xo,fi=h(()=>{"use strict";c();Lf();Jx="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36";Xo={name:Af,displayName:Of,description:Nf,parameters:jf,category:If,execute:Vx}});var qf,Wf,Uf,Gf,Bf,zf=h(()=>{"use strict";c();qf="web.feed",Wf="Extract Feed ...
153`),a=this.parseCode(s);Ee(a,{Identifier(l){if(l.node.name===t){let p=l.isFunctionDeclaration()||l.isClassDeclaration()||l.parent.type==="VariableDeclarator"&&l.parent.id===l.node
154`),l=Math.max(0,t-1),p=Math.min(a.length,n),m=a.slice(l,p).join(`
159`,g=`${i}();`;return{newFunction:d,replacementCall:g}}async getCallHierarchy(e,t,o){try{let n=this.parseCode(e.content),s=e.filePath,i=null,a="",l=0,p=0;if(Ee(n,{Function(w){let T=w.node.loc;T&&T.start.line<=t&&T.end&&T.end.line>=t&&(i=w,l=T.start.line,p=T.start.column,w.node.type==="FunctionDeclaration"&&w.node.id?a=w.node.id.name:w.parent.type==="VariableDeclarator"&&w.parent.id.type==="Identifier"?a=w.parent.id.name:w.parent.type==="ClassMethod"||w.parent.type==="ObjectMethod"?w.parent.key.type==="Identifier"&&(a=w.parent.key.name):a="<anonymous>")}}),!i||a==="<anonymous>")return null;let m ...
161 name: (identifier) @name.function) @definition.function
164 name: (identifier) @name.class) @definition.class
167 left: (identifier) @name.variable) @definition.variable
170 name: (dotted_name) @name) @import
Long lines were clipped for display.