Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
add: filter api-/sdk-reference docs before indexing
Ben Fornefeldc565bdbcb26b
diff --git a/apps/web/src/mdx/search.mjs b/apps/web/src/mdx/search.mjsindex 7c6c5d7bb..c538e027a 100644--- a/apps/web/src/mdx/search.mjs+++ b/apps/web/src/mdx/search.mjs@@ -96,7 +96,7 @@ export default function (nextConfig = {}) {document: {id: 'url',index: 'content',- store: ['title', 'pageTitle', 'preview'],+ store: ['title', 'pageTitle', 'preview', 'sdkRefVersion'],},context: {resolution: 9,@@ -108,6 +108,12 @@ export default function (nextConfig = {}) {let data = ${JSON.stringify(data)}for (let { url, sections } of data) {+ const isReference = url.includes('docs/sdk-reference') || url.includes('docs/api-reference')++ if (isReference) {+ continue+ }+for (let [title, hash, content] of sections) {sectionIndex.add({url: url + (hash ? ('#' + hash) : ''),