Repository navigation
feat: CLI: Native DuckDB file loading - #409
Conversation
Co-authored-by: Ilya Boyandin <[email protected]>
|
Cursor Agent can help with this pull request. Just |
📝 WalkthroughWalkthroughThe pull request removes server-side file upload functionality and transitions to loading files directly from the local filesystem using native file paths. DuckDB now references files directly rather than through server-uploaded copies, with updated documentation and user-facing messaging. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
apps/sqlrooms-cli-ui/src/store.ts (1)
114-130: Optional: Add defensive warning when native file path is missing.In the CLI environment, the
file.pathproperty should consistently be available from native file drops. However, adding a console warning when the fallback tofile.nameis used would help surface any unexpected scenarios during development.💡 Suggested defensive check
function getCliFileReference(file: File): string { const nativePath = (file as FileWithNativePath).path; if (typeof nativePath === 'string' && nativePath.trim()) { return nativePath; } + console.warn( + `Native file path not available for "${file.name}". Falling back to filename only.` + ); return file.name; }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/sqlrooms-cli-ui/src/store.ts` around lines 114 - 130, Add a defensive warning when we fall back from a missing native path to file.name: inside getCliFileReference (which uses type FileWithNativePath) detect when nativePath is not a non-empty string and before returning file.name call console.warn (or the app logger) indicating the missing native path for the given file (include file.name and any available metadata). Then ensure connector.loadFile (which wraps baseLoadFile) continues to call baseLoadFile with the returned reference; keep the function names getCliFileReference, FileWithNativePath, connector.loadFile and baseLoadFile intact so callers remain unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@apps/sqlrooms-cli-ui/src/store.ts`:
- Around line 114-130: Add a defensive warning when we fall back from a missing
native path to file.name: inside getCliFileReference (which uses type
FileWithNativePath) detect when nativePath is not a non-empty string and before
returning file.name call console.warn (or the app logger) indicating the missing
native path for the given file (include file.name and any available metadata).
Then ensure connector.loadFile (which wraps baseLoadFile) continues to call
baseLoadFile with the returned reference; keep the function names
getCliFileReference, FileWithNativePath, connector.loadFile and baseLoadFile
intact so callers remain unchanged.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
apps/sqlrooms-cli-ui/src/components/DataSourcesPanel.tsxapps/sqlrooms-cli-ui/src/serverApi.tsapps/sqlrooms-cli-ui/src/store.tspython/sqlrooms-cli/README.md
💤 Files with no reviewable changes (1)
- apps/sqlrooms-cli-ui/src/serverApi.ts
Co-authored-by: Cursor Agent <[email protected]>
This reverts commit bc32e25. Signed-off-by: Ilya Boyandin <[email protected]>
Signed-off-by: Ilya Boyandin <[email protected]>
Co-authored-by: Cursor Agent <[email protected]> Signed-off-by: bdjulbic <[email protected]>
Signed-off-by: Ilya Boyandin <[email protected]>
Switch CLI UI file ingestion to direct DuckDB filesystem loading to bypass browser uploads in native mode.
cli_dropzone_native_filesystem_load_demo.mp4
Summary by CodeRabbit
Bug Fixes
Documentation