Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions cloudflare/worker/scripts/audit-consumer-rag-integrations.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -253,16 +253,6 @@ function auditLinkchat(fleetRoot) {
: fail('profile_memory_ingest_scope', 'info-block ingest must use ensureProfileMemoryIndex and user/page/block metadata'));
}

const settingsAiKeyRoute = resolve(repo, 'src/app/api/settings/ai-key/route.ts');
if (!existsSync(settingsAiKeyRoute)) {
checks.push(fail('route_src/app/api/settings/ai-key/route.ts', 'src/app/api/settings/ai-key/route.ts is missing'));
} else {
const source = readText(settingsAiKeyRoute);
checks.push(source.includes('@/lib/profile-memory-index') && source.includes('ensureProfileMemoryIndex(auth.userId)')
? pass('route_src/app/api/settings/ai-key/route.ts', 'uses profile-memory index lifecycle helper')
: fail('route_src/app/api/settings/ai-key/route.ts', 'settings route must use ensureProfileMemoryIndex for lazy account index repair'));
}

const knowledgebaseSettingsRoute = resolve(repo, 'src/app/api/settings/knowledgebase/route.ts');
if (!existsSync(knowledgebaseSettingsRoute)) {
checks.push(fail('knowledgebase_settings_route', 'src/app/api/settings/knowledgebase/route.ts is missing'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ function writeHealthyLinkchat(fleetRoot: string, dirname = 'linkchat') {
'export async function GET() { return Response.json({ hasIndex: true, indexId: "idx" }); }',
'export async function POST() { const indexId = await ensureProfileMemoryIndex(auth.userId); return Response.json({ hasIndex: true, indexId }); }',
].join('\n'));
write(resolve(repo, 'src/app/api/settings/ai-key/route.ts'), 'import { ensureProfileMemoryIndex } from "@/lib/profile-memory-index";\nensureProfileMemoryIndex(auth.userId);\n');
for (const route of [
'src/app/api/pages/[pageId]/info/route.ts',
'src/app/api/pages/[pageId]/info/[blockId]/route.ts',
Expand Down
Loading