[PR #85] [MERGED] feat: display local pdf files #238

Closed
opened 2026-02-15 19:16:50 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/run-llama/create-llama/pull/85
Author: @thucpn
Created: 5/13/2024
Status: Merged
Merged: 5/16/2024
Merged by: @marcusschiesser

Base: mainHead: feat/display-local-pdf-files


📝 Commits (10+)

  • 45d66af feat: display local pdf files
  • 021bd3f Create weak-bobcats-trade.md
  • 56ed2f8 feat: support pdf url, open pdf dialog directly, agg same path
  • ec9a97f check relative path
  • 8a2585c use slug for nextjs static files
  • df77dd5 change to /api/data
  • e29cfba fix rabbit code reviews
  • b4b049c get static file from file_name of node
  • 2cab2d8 add unknown type
  • 9f9a7ea using pdf viewer 1.1.1

📊 Changes

9 files changed (+337 additions, -50 deletions)

View changed files

.changeset/weak-bobcats-trade.md (+5 -0)
📝 templates/types/streaming/express/index.ts (+1 -0)
📝 templates/types/streaming/fastapi/main.py (+3 -1)
templates/types/streaming/nextjs/app/api/data/[path]/route.ts (+38 -0)
📝 templates/types/streaming/nextjs/app/components/ui/chat/chat-sources.tsx (+102 -48)
templates/types/streaming/nextjs/app/components/ui/chat/widgets/PdfDialog.tsx (+56 -0)
templates/types/streaming/nextjs/app/components/ui/drawer.tsx (+118 -0)
templates/types/streaming/nextjs/app/components/ui/lib/url.ts (+11 -0)
📝 templates/types/streaming/nextjs/package.json (+3 -1)

📄 Description

Summary by CodeRabbit

  • New Features

    • Introduced an API endpoint to retrieve file data based on a provided path.
    • Added PdfDialog component to display PDF content within a drawer.
    • Enhanced ChatSources component to aggregate and display nodes by URL or file path.
  • Enhancements

    • Updated ChatSources rendering logic to differentiate between PDFs and other sources.
  • Dependencies

    • Added vaul version 0.9.1 and @llamaindex/pdf-viewer version 1.1.1 to dependencies.
  • Backend

    • Enabled serving of static files from the /data endpoint in FastAPI.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/run-llama/create-llama/pull/85 **Author:** [@thucpn](https://github.com/thucpn) **Created:** 5/13/2024 **Status:** ✅ Merged **Merged:** 5/16/2024 **Merged by:** [@marcusschiesser](https://github.com/marcusschiesser) **Base:** `main` ← **Head:** `feat/display-local-pdf-files` --- ### 📝 Commits (10+) - [`45d66af`](https://github.com/run-llama/create-llama/commit/45d66afa829231b7b6cc05fddbdfc84d7e85ca37) feat: display local pdf files - [`021bd3f`](https://github.com/run-llama/create-llama/commit/021bd3f0fed40de1d13b52c289a0781c37f8a38e) Create weak-bobcats-trade.md - [`56ed2f8`](https://github.com/run-llama/create-llama/commit/56ed2f8cb6f16aa45089fc64cf74851ea93c18d9) feat: support pdf url, open pdf dialog directly, agg same path - [`ec9a97f`](https://github.com/run-llama/create-llama/commit/ec9a97f855db9a9d10353df1101afa25d0f5c0e6) check relative path - [`8a2585c`](https://github.com/run-llama/create-llama/commit/8a2585cbe58c3c1b22fe95d7c840b82845f13d7f) use slug for nextjs static files - [`df77dd5`](https://github.com/run-llama/create-llama/commit/df77dd5b29f6e68ebde14e63b7e18454c09929ef) change to /api/data - [`e29cfba`](https://github.com/run-llama/create-llama/commit/e29cfba72134f4e41dfce4e4c330286ffac881fc) fix rabbit code reviews - [`b4b049c`](https://github.com/run-llama/create-llama/commit/b4b049c658cb4c66de7b7eb87f22e552ce3fa58e) get static file from file_name of node - [`2cab2d8`](https://github.com/run-llama/create-llama/commit/2cab2d898b02ac17ea955c10f9718636e738a0f7) add unknown type - [`9f9a7ea`](https://github.com/run-llama/create-llama/commit/9f9a7eaaf4cea9c1c4beed692d6360e14f73018a) using pdf viewer 1.1.1 ### 📊 Changes **9 files changed** (+337 additions, -50 deletions) <details> <summary>View changed files</summary> ➕ `.changeset/weak-bobcats-trade.md` (+5 -0) 📝 `templates/types/streaming/express/index.ts` (+1 -0) 📝 `templates/types/streaming/fastapi/main.py` (+3 -1) ➕ `templates/types/streaming/nextjs/app/api/data/[path]/route.ts` (+38 -0) 📝 `templates/types/streaming/nextjs/app/components/ui/chat/chat-sources.tsx` (+102 -48) ➕ `templates/types/streaming/nextjs/app/components/ui/chat/widgets/PdfDialog.tsx` (+56 -0) ➕ `templates/types/streaming/nextjs/app/components/ui/drawer.tsx` (+118 -0) ➕ `templates/types/streaming/nextjs/app/components/ui/lib/url.ts` (+11 -0) 📝 `templates/types/streaming/nextjs/package.json` (+3 -1) </details> ### 📄 Description <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced an API endpoint to retrieve file data based on a provided path. - Added `PdfDialog` component to display PDF content within a drawer. - Enhanced `ChatSources` component to aggregate and display nodes by URL or file path. - **Enhancements** - Updated `ChatSources` rendering logic to differentiate between PDFs and other sources. - **Dependencies** - Added `vaul` version `0.9.1` and `@llamaindex/pdf-viewer` version `1.1.1` to dependencies. - **Backend** - Enabled serving of static files from the `/data` endpoint in FastAPI. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 19:16:50 -05:00
yindo closed this issue 2026-02-15 19:16:50 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/create-llama#238