Skip to content

Commit d81c4f2

Browse files
committed
Migrate docs to Mintlify: remove Docs.tsx, search.ts, search-index.json, mdx.d.ts; redirect /docs to docs.opensync.dev; update files.md, changelog.md, task.md
1 parent a764de2 commit d81c4f2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+6263
-5421
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dist/
2626
# Logs
2727
*.log
2828

29-
# Documentation (internal)
30-
docs/
29+
# Internal documentation (setup guides, PRDs, marketing)
30+
docs-internal/
3131

3232
# Disabled pages (kept for reference, no files currently disabled)

changelog.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
88

99
### Changed
1010

11+
- Migrated all in-app documentation to Mintlify at docs.opensync.dev
12+
- Removed Docs.tsx (full in-app documentation page with sidebar, search, and markdown export)
13+
- Removed src/lib/search.ts (client-side search index builder for docs)
14+
- Removed src/search-index.json (pre-built search index data)
15+
- Removed src/mdx.d.ts (MDX type declarations)
16+
- All /docs, /docs/*, and /docs-legacy routes now redirect externally to docs.opensync.dev
17+
- Added DocsRedirect component in App.tsx for client-side redirect
18+
- Updated Sidebar.tsx docs link to point to external docs.opensync.dev
1119
- Platform Stats header now displays "last 1000 sessions" label for clarity
1220
- Users know the leaderboard data is based on recent activity, not all-time totals
1321

@@ -16,6 +24,8 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1624
- Fixed Netlify build error: Stats.tsx was git-ignored causing module not found error
1725
- Removed src/pages/Stats.tsx from .gitignore so placeholder page is included in build
1826
- Updated Stats.tsx header comment to reflect it's no longer git-ignored
27+
- Fixed Netlify build error caused by removed Docs.tsx import references
28+
- Cleaned up all imports of deleted files (search.ts, search-index.json, mdx.d.ts)
1929

2030
### Added
2131

convex/_generated/api.d.ts

Lines changed: 81 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export declare const components: {
9292
"internal",
9393
{
9494
entryId: string;
95+
order: "desc" | "asc";
9596
paginationOpts: {
9697
cursor: string | null;
9798
endCursor?: string | null;
@@ -145,16 +146,6 @@ export declare const components: {
145146
{
146147
created: boolean;
147148
entryId: string;
148-
replacedVersion: {
149-
contentHash?: string;
150-
entryId: string;
151-
filterValues: Array<{ name: string; value: any }>;
152-
importance: number;
153-
key?: string;
154-
metadata?: Record<string, any>;
155-
status: "pending" | "ready" | "replaced";
156-
title?: string;
157-
} | null;
158149
status: "pending" | "ready" | "replaced";
159150
}
160151
>;
@@ -182,6 +173,24 @@ export declare const components: {
182173
{ entryId: string; startOrder: number },
183174
null
184175
>;
176+
deleteByKeyAsync: FunctionReference<
177+
"mutation",
178+
"internal",
179+
{ beforeVersion?: number; key: string; namespaceId: string },
180+
null
181+
>;
182+
deleteByKeySync: FunctionReference<
183+
"action",
184+
"internal",
185+
{ key: string; namespaceId: string },
186+
null
187+
>;
188+
deleteSync: FunctionReference<
189+
"action",
190+
"internal",
191+
{ entryId: string },
192+
null
193+
>;
185194
findByContentHash: FunctionReference<
186195
"query",
187196
"internal",
@@ -200,6 +209,7 @@ export declare const components: {
200209
importance: number;
201210
key?: string;
202211
metadata?: Record<string, any>;
212+
replacedAt?: number;
203213
status: "pending" | "ready" | "replaced";
204214
title?: string;
205215
} | null
@@ -215,6 +225,7 @@ export declare const components: {
215225
importance: number;
216226
key?: string;
217227
metadata?: Record<string, any>;
228+
replacedAt?: number;
218229
status: "pending" | "ready" | "replaced";
219230
title?: string;
220231
} | null
@@ -223,7 +234,7 @@ export declare const components: {
223234
"query",
224235
"internal",
225236
{
226-
namespaceId: string;
237+
namespaceId?: string;
227238
order?: "desc" | "asc";
228239
paginationOpts: {
229240
cursor: string | null;
@@ -245,6 +256,7 @@ export declare const components: {
245256
importance: number;
246257
key?: string;
247258
metadata?: Record<string, any>;
259+
replacedAt?: number;
248260
status: "pending" | "ready" | "replaced";
249261
title?: string;
250262
}>;
@@ -257,20 +269,44 @@ export declare const components: {
257269
"internal",
258270
{ entryId: string },
259271
{
260-
replacedVersion: {
272+
replacedEntry: {
261273
contentHash?: string;
262274
entryId: string;
263275
filterValues: Array<{ name: string; value: any }>;
264276
importance: number;
265277
key?: string;
266278
metadata?: Record<string, any>;
279+
replacedAt?: number;
267280
status: "pending" | "ready" | "replaced";
268281
title?: string;
269282
} | null;
270283
}
271284
>;
272285
};
273286
namespaces: {
287+
deleteNamespace: FunctionReference<
288+
"mutation",
289+
"internal",
290+
{ namespaceId: string },
291+
{
292+
deletedNamespace: null | {
293+
createdAt: number;
294+
dimension: number;
295+
filterNames: Array<string>;
296+
modelId: string;
297+
namespace: string;
298+
namespaceId: string;
299+
status: "pending" | "ready" | "replaced";
300+
version: number;
301+
};
302+
}
303+
>;
304+
deleteNamespaceSync: FunctionReference<
305+
"action",
306+
"internal",
307+
{ namespaceId: string },
308+
null
309+
>;
274310
get: FunctionReference<
275311
"query",
276312
"internal",
@@ -335,6 +371,37 @@ export declare const components: {
335371
splitCursor?: string | null;
336372
}
337373
>;
374+
listNamespaceVersions: FunctionReference<
375+
"query",
376+
"internal",
377+
{
378+
namespace: string;
379+
paginationOpts: {
380+
cursor: string | null;
381+
endCursor?: string | null;
382+
id?: number;
383+
maximumBytesRead?: number;
384+
maximumRowsRead?: number;
385+
numItems: number;
386+
};
387+
},
388+
{
389+
continueCursor: string;
390+
isDone: boolean;
391+
page: Array<{
392+
createdAt: number;
393+
dimension: number;
394+
filterNames: Array<string>;
395+
modelId: string;
396+
namespace: string;
397+
namespaceId: string;
398+
status: "pending" | "ready" | "replaced";
399+
version: number;
400+
}>;
401+
pageStatus?: "SplitRecommended" | "SplitRequired" | null;
402+
splitCursor?: string | null;
403+
}
404+
>;
338405
lookup: FunctionReference<
339406
"query",
340407
"internal",
@@ -351,7 +418,7 @@ export declare const components: {
351418
"internal",
352419
{ namespaceId: string },
353420
{
354-
replacedVersion: null | {
421+
replacedNamespace: null | {
355422
createdAt: number;
356423
dimension: number;
357424
filterNames: Array<string>;
@@ -385,6 +452,7 @@ export declare const components: {
385452
importance: number;
386453
key?: string;
387454
metadata?: Record<string, any>;
455+
replacedAt?: number;
388456
status: "pending" | "ready" | "replaced";
389457
title?: string;
390458
}>;

convex/rag.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ import { action, internalAction } from "./_generated/server";
33
import { internal, components } from "./_generated/api";
44
import { RAG } from "@convex-dev/rag";
55
import { openai } from "@ai-sdk/openai";
6-
import type { EmbeddingModelV1, LanguageModelV1 } from "@ai-sdk/provider";
6+
import type { EmbeddingModelV2, LanguageModelV2 } from "@ai-sdk/provider";
77

88
// Initialize RAG with user namespace filtering
9-
// Type cast needed due to AI SDK v3 -> v1 model type mismatch
9+
// Type cast needed due to AI SDK model type mismatch
1010
const rag = new RAG(components.rag, {
11-
textEmbeddingModel: openai.embedding("text-embedding-3-small") as unknown as EmbeddingModelV1<string>,
11+
textEmbeddingModel: openai.embedding(
12+
"text-embedding-3-small",
13+
) as unknown as EmbeddingModelV2<string>,
1214
embeddingDimension: 1536,
1315
filterNames: ["userId"],
1416
});
@@ -28,9 +30,7 @@ export const indexSession = internalAction({
2830
await rag.add(ctx, {
2931
namespace: `user_${data.session.userId}`,
3032
text: data.textContent,
31-
filterValues: [
32-
{ name: "userId", value: data.session.userId.toString() },
33-
],
33+
filterValues: [{ name: "userId", value: data.session.userId.toString() }],
3434
});
3535

3636
return null;
@@ -99,14 +99,16 @@ export const generateWithContext = action({
9999
// Generate response using RAG's generateText with proper API signature
100100
// Type cast needed due to AI SDK v3 -> v1 model type mismatch
101101
const { text } = await rag.generateText(ctx, {
102-
model: openai("gpt-4o-mini") as unknown as LanguageModelV1,
102+
model: openai("gpt-4o-mini") as unknown as LanguageModelV2,
103103
search: {
104104
namespace: `user_${user._id}`,
105105
limit: 5,
106106
vectorScoreThreshold: 0.5,
107107
},
108108
prompt: query,
109-
system: systemPrompt || "You are a helpful coding assistant. Use the provided context from previous coding sessions to answer questions.",
109+
system:
110+
systemPrompt ||
111+
"You are a helpful coding assistant. Use the provided context from previous coding sessions to answer questions.",
110112
});
111113

112114
return { text, contextUsed: !!context };

0 commit comments

Comments
 (0)