Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@farming-labs/astro
@farming-labs/astro-theme
@farming-labs/docs
@farming-labs/theme
@farming-labs/next
@farming-labs/nuxt
@farming-labs/nuxt-theme
@farming-labs/svelte
@farming-labs/svelte-theme
@farming-labs/tanstack-start
commit: |
There was a problem hiding this comment.
5 issues found across 55 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="README.md">
<violation number="1" location="README.md:130">
P2: Replace the machine-local absolute path with a repository-relative link so the README link works for all users.</violation>
</file>
<file name="packages/docs/src/cli/config.ts">
<violation number="1" location="packages/docs/src/cli/config.ts:26">
P2: `readStringProperty` uses an unescaped, unbounded dynamic regex key, which can match the wrong property name.</violation>
</file>
<file name="packages/docs/src/search.ts">
<violation number="1" location="packages/docs/src/search.ts:38">
P2: Image markdown is not stripped correctly because the link regex runs first. For ``, the link regex matches the inner `[alt](url)`, producing `!alt` instead of `alt`. Swap these two lines so the image regex runs before the link regex.</violation>
</file>
<file name="packages/docs/src/mcp.ts">
<violation number="1" location="packages/docs/src/mcp.ts:738">
P2: Preserve `chunking` (and any other relevant search options) when converting a self-referential MCP search config to the simple provider. Otherwise user-defined chunking is ignored for the search tool.</violation>
</file>
<file name="packages/fumadocs/src/docs-command-search.tsx">
<violation number="1" location="packages/fumadocs/src/docs-command-search.tsx:36">
P2: `stripSearchPreview` strips normal links before images, which leaves a leading `!` for image markdown (e.g. `` becomes `!alt`). Strip images first (or exclude `!`-prefixed links) so previews are cleaned correctly.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
2 issues found across 5 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/docs/src/search.ts">
<violation number="1" location="packages/docs/src/search.ts:324">
P1: Record-size trimming can still exceed the byte cap because it measures raw content bytes, not JSON-encoded bytes.</violation>
<violation number="2" location="packages/docs/src/search.ts:842">
P2: Algolia indexing now omits `locale`/`framework`/`version`/`tags`, causing metadata regression versus other adapters and previous behavior.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| const baseRecord = { ...record, content: "" }; | ||
| const fixedBytes = sizeOf(baseRecord); | ||
| const remainingBytes = Math.max(ALGOLIA_MAX_RECORD_BYTES - fixedBytes - 32, 0); | ||
| record.content = trimTextToBytes(document.content, remainingBytes); |
There was a problem hiding this comment.
P1: Record-size trimming can still exceed the byte cap because it measures raw content bytes, not JSON-encoded bytes.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/docs/src/search.ts, line 324:
<comment>Record-size trimming can still exceed the byte cap because it measures raw content bytes, not JSON-encoded bytes.</comment>
<file context>
@@ -274,6 +275,57 @@ function cleanSearchResultText(value?: string): string | undefined {
+ const baseRecord = { ...record, content: "" };
+ const fixedBytes = sizeOf(baseRecord);
+ const remainingBytes = Math.max(ALGOLIA_MAX_RECORD_BYTES - fixedBytes - 32, 0);
+ record.content = trimTextToBytes(document.content, remainingBytes);
+
+ return record;
</file context>
| body: JSON.stringify({ | ||
| requests: context.documents.map((document) => ({ | ||
| action: "addObject", | ||
| body: buildAlgoliaRecord(document), |
There was a problem hiding this comment.
P2: Algolia indexing now omits locale/framework/version/tags, causing metadata regression versus other adapters and previous behavior.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/docs/src/search.ts, line 842:
<comment>Algolia indexing now omits `locale`/`framework`/`version`/`tags`, causing metadata regression versus other adapters and previous behavior.</comment>
<file context>
@@ -787,20 +839,7 @@ export function createAlgoliaSearchAdapter(config: AlgoliaDocsSearchConfig): Doc
- version: document.version,
- tags: document.tags,
- },
+ body: buildAlgoliaRecord(document),
})),
}),
</file context>
closes #25
Summary by cubic
Adds a provider-agnostic advanced search with a shared adapter pipeline across the UI and MCP, plus a new Next API entry and a CLI to sync external indexes. Env-driven setup lets projects switch between built-in search, Typesense (keyword or hybrid via Ollama), Algolia, MCP, or a custom adapter.
New Features
simple(built-in),typesense(keyword or hybrid via Ollama),algolia,mcp,customperformDocsSearchperformDocsSearch,buildDocsSearchDocuments,resolveSearchRequestConfig, and adapter factoriesdefineDocs()now acceptssearch; examples/docs use env-driven setup@farming-labs/next/apiwithcreateDocsAPIandcreateDocsMCPAPI; generated routes forwardsearchandaidocs search syncto push content to Typesense or Algolia (reads.env), with--typesense/--algoliaflagsMigration
@farming-labs/next/api; passsearchandaitocreateDocsAPI/createDocsMCPAPIsearchtodocs.config.ts(or keep defaults for built-in search)TYPESENSE_*orALGOLIA_*), then runpnpm exec docs search syncif pre-indexing is desiredWritten for commit 0516c1d. Summary will update on new commits.