[{"data":1,"prerenderedAt":468},["ShallowReactive",2],{"navigation_docs":3,"-guide-code-search":80,"-guide-code-search-surround":463},[4,56],{"title":5,"path":6,"stem":7,"children":8,"icon":55},"Guide","\u002Fguide","1.guide\u002F01.index",[9,11,15,19,23,27,31,35,39,43,47,51],{"title":10,"path":6,"stem":7},"Getting Started",{"title":12,"path":13,"stem":14},"Authentication","\u002Fguide\u002Fauth","1.guide\u002F02.auth",{"title":16,"path":17,"stem":18},"Repositories","\u002Fguide\u002Frepositories","1.guide\u002F03.repositories",{"title":20,"path":21,"stem":22},"Issues","\u002Fguide\u002Fissues","1.guide\u002F04.issues",{"title":24,"path":25,"stem":26},"Pull requests","\u002Fguide\u002Fpull-requests","1.guide\u002F05.pull-requests",{"title":28,"path":29,"stem":30},"Review threads","\u002Fguide\u002Fthreads","1.guide\u002F06.threads",{"title":32,"path":33,"stem":34},"Commits and CI","\u002Fguide\u002Fcommits","1.guide\u002F07.commits",{"title":36,"path":37,"stem":38},"Contribution templates","\u002Fguide\u002Ftemplates","1.guide\u002F08.templates",{"title":40,"path":41,"stem":42},"Code search","\u002Fguide\u002Fcode-search","1.guide\u002F09.code-search",{"title":44,"path":45,"stem":46},"Agents","\u002Fguide\u002Fagents","1.guide\u002F10.agents",{"title":48,"path":49,"stem":50},"Custom providers","\u002Fguide\u002Fcustom","1.guide\u002F11.custom",{"title":52,"path":53,"stem":54},"Explorer","\u002Fguide\u002Fexplorer","1.guide\u002F12.explorer","i-lucide-book-open",{"title":57,"path":58,"stem":59,"children":60,"icon":79},"Platforms","\u002Fplatforms","2.platforms\u002F0.index",[61,63,67,71,75],{"title":62,"path":58,"stem":59},"Overview",{"title":64,"path":65,"stem":66},"GitHub","\u002Fplatforms\u002Fgithub","2.platforms\u002F01.github",{"title":68,"path":69,"stem":70},"GitLab","\u002Fplatforms\u002Fgitlab","2.platforms\u002F02.gitlab",{"title":72,"path":73,"stem":74},"Gitea","\u002Fplatforms\u002Fgitea","2.platforms\u002F03.gitea",{"title":76,"path":77,"stem":78},"GitBucket","\u002Fplatforms\u002Fgitbucket","2.platforms\u002F04.gitbucket","i-lucide-library",{"id":81,"title":40,"body":82,"description":456,"extension":457,"links":458,"meta":459,"navigation":215,"path":41,"seo":461,"stem":42,"__hash__":462},"docs\u002F1.guide\u002F09.code-search.md",{"type":83,"value":84,"toc":451},"minimark",[85,90,316,355,359,431,437,441,447],[86,87,89],"h2",{"id":88},"call","Call",[91,92,97],"pre",{"className":93,"code":94,"language":95,"meta":96,"style":96},"language-ts shiki shiki-themes github-light github-light poimandres","const result = await forge.code.search(\"defineNuxtConfig\", {\n  owner: \"nitrojs\",\n  repo: \"nitro\",\n  perPage: 20,\n});\n\nfor (const item of result.items) {\n  console.log(item.repository, item.path, item.url);\n}\nconsole.log(result.incomplete);\n","ts","",[98,99,100,152,173,190,204,210,217,245,288,294],"code",{"__ignoreMap":96},[101,102,105,109,113,116,120,124,128,130,132,136,139,143,147,149],"span",{"class":103,"line":104},"line",1,[101,106,108],{"class":107},"s1TYA","const",[101,110,112],{"class":111},"saoiD"," result",[101,114,115],{"class":107}," =",[101,117,119],{"class":118},"sZW6a"," await",[101,121,123],{"class":122},"spVlQ"," forge",[101,125,127],{"class":126},"sKlNE",".",[101,129,98],{"class":122},[101,131,127],{"class":126},[101,133,135],{"class":134},"sULi6","search",[101,137,138],{"class":126},"(",[101,140,142],{"class":141},"scVjq","\"",[101,144,146],{"class":145},"sQ7BG","defineNuxtConfig",[101,148,142],{"class":141},[101,150,151],{"class":126},", {\n",[101,153,155,159,162,165,168,170],{"class":103,"line":154},2,[101,156,158],{"class":157},"snHMy","  owner",[101,160,161],{"class":126},":",[101,163,164],{"class":141}," \"",[101,166,167],{"class":145},"nitrojs",[101,169,142],{"class":141},[101,171,172],{"class":126},",\n",[101,174,176,179,181,183,186,188],{"class":103,"line":175},3,[101,177,178],{"class":157},"  repo",[101,180,161],{"class":126},[101,182,164],{"class":141},[101,184,185],{"class":145},"nitro",[101,187,142],{"class":141},[101,189,172],{"class":126},[101,191,193,196,198,202],{"class":103,"line":192},4,[101,194,195],{"class":157},"  perPage",[101,197,161],{"class":126},[101,199,201],{"class":200},"siHFe"," 20",[101,203,172],{"class":126},[101,205,207],{"class":103,"line":206},5,[101,208,209],{"class":126},"});\n",[101,211,213],{"class":103,"line":212},6,[101,214,216],{"emptyLinePlaceholder":215},true,"\n",[101,218,220,224,227,229,232,235,237,239,242],{"class":103,"line":219},7,[101,221,223],{"class":222},"stCPd","for",[101,225,226],{"class":126}," (",[101,228,108],{"class":107},[101,230,231],{"class":111}," item",[101,233,234],{"class":107}," of",[101,236,112],{"class":122},[101,238,127],{"class":126},[101,240,241],{"class":122},"items",[101,243,244],{"class":126},") {\n",[101,246,248,251,253,256,258,261,263,266,269,271,273,276,278,280,282,285],{"class":103,"line":247},8,[101,249,250],{"class":122},"  console",[101,252,127],{"class":126},[101,254,255],{"class":134},"log",[101,257,138],{"class":126},[101,259,260],{"class":122},"item",[101,262,127],{"class":126},[101,264,265],{"class":122},"repository",[101,267,268],{"class":126},", ",[101,270,260],{"class":122},[101,272,127],{"class":126},[101,274,275],{"class":122},"path",[101,277,268],{"class":126},[101,279,260],{"class":122},[101,281,127],{"class":126},[101,283,284],{"class":122},"url",[101,286,287],{"class":126},");\n",[101,289,291],{"class":103,"line":290},9,[101,292,293],{"class":126},"}\n",[101,295,297,300,302,304,306,309,311,314],{"class":103,"line":296},10,[101,298,299],{"class":122},"console",[101,301,127],{"class":126},[101,303,255],{"class":134},[101,305,138],{"class":126},[101,307,308],{"class":122},"result",[101,310,127],{"class":126},[101,312,313],{"class":122},"incomplete",[101,315,287],{"class":126},[317,318,319,322,323,268,326,329,330,333,334,337,338,340,341,343,344,347,348,268,350,333,352,354],"p",{},[98,320,321],{},"CodeSearchOptions"," is ",[98,324,325],{},"page",[98,327,328],{},"perPage"," and an optional ",[98,331,332],{},"owner"," and ",[98,335,336],{},"repo"," scope. A ",[98,339,336],{}," without an ",[98,342,332],{}," is a 400 before any request. The result is a ",[98,345,346],{},"SearchPageResult\u003CCodeSearchItem>"," with ",[98,349,265],{},[98,351,275],{},[98,353,284],{}," per row.",[86,356,358],{"id":357},"per-platform","Per platform",[360,361,362,378],"table",{},[363,364,365],"thead",{},[366,367,368,372,375],"tr",{},[369,370,371],"th",{},"Platform",[369,373,374],{},"Scope",[369,376,377],{},"Fine print",[379,380,381,395,405,420],"tbody",{},[366,382,383,386,389],{},[384,385,64],"td",{},[384,387,388],{},"global, owner, repository",[384,390,391,392,394],{},"a token raises the rate limit; ",[98,393,313],{}," is true on a timeout, a dropped row or past the cap of 1 000 results",[366,396,397,399,402],{},[384,398,68],{},[384,400,401],{},"global, group (owner), project (repository)",[384,403,404],{},"every search call needs a token; global and group code search also need Premium or Ultimate with advanced or exact code search on",[366,406,407,410,413],{},[384,408,409],{},"Gitea, Forgejo",[384,411,412],{},"none",[384,414,415,416,419],{},"explicit ",[98,417,418],{},"ForgesError"," with status 501",[366,421,422,425,427],{},[384,423,424],{},"GitHub API hosts without the endpoint",[384,426,412],{},[384,428,415,429,419],{},[98,430,418],{},[317,432,433,434,436],{},"On GitHub the scope is checked on the rows too, not just in the query. A row from outside the requested owner or repository is dropped and ",[98,435,313],{}," goes true, instead of a stray match from somewhere else quietly landing in your list.",[86,438,440],{"id":439},"in-an-agent","In an agent",[317,442,443,446],{},[98,444,445],{},"forges_code_search"," takes the same arguments. Like every read tool it falls back to anonymous access when there is no credential, which on GitLab means a clear message about the token rather than a bare 401.",[448,449,450],"style",{},"html pre.shiki code .s1TYA, html code.shiki .s1TYA{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#91B4D5}html pre.shiki code .saoiD, html code.shiki .saoiD{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#E4F0FB}html pre.shiki code .sZW6a, html code.shiki .sZW6a{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#5DE4C7C0}html pre.shiki code .spVlQ, html code.shiki .spVlQ{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E4F0FB}html pre.shiki code .sKlNE, html code.shiki .sKlNE{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#A6ACCD}html pre.shiki code .sULi6, html code.shiki .sULi6{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#E4F0FBD0}html pre.shiki code .scVjq, html code.shiki .scVjq{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#A6ACCD}html pre.shiki code .sQ7BG, html code.shiki .sQ7BG{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#5DE4C7}html pre.shiki code .snHMy, html code.shiki .snHMy{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#ADD7FF}html pre.shiki code .siHFe, html code.shiki .siHFe{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#5DE4C7}html pre.shiki code .stCPd, html code.shiki .stCPd{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#A6ACCD}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":96,"searchDepth":154,"depth":154,"links":452},[453,454,455],{"id":88,"depth":154,"text":89},{"id":357,"depth":154,"text":358},{"id":439,"depth":154,"text":440},"File matches by query, global or scoped to an owner or a repository, on the platforms that have an endpoint for it.","md",null,{"icon":460},"i-lucide-search-code",{"title":40,"description":456},"zVugCNNzUOEOyJ52WpbSR839vrf27hTL9Pv92BYckc4",[464,466],{"title":36,"path":37,"stem":38,"description":465,"children":-1},"Find the effective issue and pull request templates of a repository, with their scope and source, and read one in full by its key.",{"title":44,"path":45,"stem":46,"description":467,"children":-1},"The same thirty tools over MCP, the Pi extension and the OMP extension, what they hold back, and how tokens and hosts stay out of a model's hands.",1788525967449]