sync: ingestion improvements from private repo
- Fixed dimension auto-assignment (locked dimensions now properly assigned) - Added description field as grounding context for AI - Updated embedding format: Title → Description → Content → Dimensions - Description-weighted search (5x boost) - Bug fixes: extraction tool dimension display, DimensionSearchModal closing - Removed quickLink tool (use Quick Link workflow instead) - Added regenerate-description API endpoint
This commit is contained in:
@@ -4,7 +4,7 @@ import { enqueueQuickAdd, QuickAddMode } from '@/services/agents/quickAdd';
|
||||
export async function POST(request: NextRequest) {
|
||||
try {
|
||||
const body = await request.json();
|
||||
const { input, mode } = body as { input?: unknown; mode?: unknown };
|
||||
const { input, mode, description } = body as { input?: unknown; mode?: unknown; description?: unknown };
|
||||
|
||||
if (typeof input !== 'string' || input.trim().length === 0) {
|
||||
return NextResponse.json(
|
||||
@@ -16,9 +16,13 @@ export async function POST(request: NextRequest) {
|
||||
const normalizedMode: QuickAddMode | undefined =
|
||||
mode === 'link' || mode === 'note' || mode === 'chat' ? mode : undefined;
|
||||
|
||||
const normalizedDescription: string | undefined =
|
||||
typeof description === 'string' && description.trim() ? description.trim() : undefined;
|
||||
|
||||
const delegation = await enqueueQuickAdd({
|
||||
rawInput: input.trim(),
|
||||
mode: normalizedMode,
|
||||
description: normalizedDescription,
|
||||
});
|
||||
|
||||
return NextResponse.json({ success: true, delegation });
|
||||
|
||||
Reference in New Issue
Block a user