Repository navigation
feat: import uploaded documents as intel items - #86
Open
pranavsant wants to merge 4 commits into
Open
pranavsant wants to merge 4 commits into
pranavsant wants to merge 4 commits into
Conversation
…r each uploaded document we resume one source called uploaded documents
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🦸 What's new in this PR
Description
Users can now upload a PDF, TXT, DOCX, or EPUB and turn it into an intel item
Uploaded files and full document text are discarded after being processed
Relevance filtering is skipped
Existing intelligence extraction and saving code is reused
Save imports under one "Uploaded documents" source
Still prevents duplicates
Source URLs and publication dates are optional
Database changes make source URLs optional and add the upload filename and a hash for duplicate detection.
Screenshots
Screen.Recording.2026-11-18.at.1.08.30.PM.mov
🕵️ How to review
Look through upload flow:
components/intelligence-library/DocumentUpload.tsx— upload form.app/(authenticated)/(approved)/intelligence/upload/route.ts— authentication and request validationlib/intelligence-library/process-document.ts— starts the Python worker and handles its response.Look through document processing:
scripts/documents/extract.py— extracts text from PDF, TXT, DOCX, and EPUB files.scripts/documents/cli.py— checks duplicate file hashes, generates intelligence without relevance filtering, and summarizes longer documents.scripts/intelligence/extractor.py— shared AI request and intelligence-standardization code.🪜 Next steps
Related PRs
CC: @Kulieshova