Eng 1595 single prompt based extraction pass prompt encodes dg#963
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
📝 WalkthroughWalkthroughThis PR implements dynamic extraction prompt generation based on selected node types, replacing a hard-coded default prompt. The extraction workflow is integrated into the page component with base64 PDF conversion and API integration, while the sidebar is updated to provide extraction control and status feedback. Changes
Sequence DiagramsequenceDiagram
actor User
participant Sidebar as Sidebar Component
participant Page as Page Component
participant PDFHandler as PDF Handler
participant API as Extract API
participant Anthropic as Anthropic API
User->>Sidebar: Click "Re-Extract" button
Sidebar->>Page: onExtract()
Page->>Page: handleExtract()
Page->>PDFHandler: readFileAsBase64(pdfFile)
PDFHandler-->>Page: base64 string
Page->>Page: buildSystemPrompt(selectedNodeTypes)
Page->>Page: Construct request payload
Page->>API: POST /api/ai/extract
Note over API: Validate systemPrompt (required)
API->>Anthropic: Send extraction request with base64, systemPrompt
Anthropic-->>API: Extraction results
API-->>Page: JSON response
Page->>Page: isExtracting = false
Page->>Sidebar: Update canExtract, isExtracting state
Sidebar-->>User: Display results/re-enable button
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit