Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Feature: Link external “knowledge folders” into Rowboat
Users can now add an external folder (e.g., an Obsidian vault) into Knowledge. It is mounted as a symlink at:
~/.rowboat/knowledge/
This mount:
appears in the Knowledge tree
is searchable by workspace-grep
is included in the knowledge graph index
remains read/write (deleting files inside it affects the real folder)
can be “unlinked” from the UI without touching the external data
Core config + backend plumbing
New config file
knowledge_vaults.ts
Stores metadata in knowledge_vaults.json
Tracks: name, path, mountPath, readOnly, addedAt
Validates names and prevents collisions with reserved folder names
Handles symlink creation and removal
Guards against duplicates
Config auto‑init
initConfigs.ts
Ensures vault config file exists at startup via ensureKnowledgeVaultsConfig()
IPC + main process
New IPC channels
ipc.ts
knowledge:listVaults
knowledge:pickVaultDirectory
knowledge:addVault
knowledge:removeVault
Handler implementation
ipc.ts
Folder picker via Electron dialog.showOpenDialog
knowledge:addVault creates symlink + persists config
knowledge:removeVault unlinks + removes config entry
Workspace tools now follow mounted folders safely
Workspace API
workspace.ts
stat now resolves symlink targets, preserving isSymlink
readFile returns stats based on target file
readdir:
includes symlinked folders only if they are known mounts
recurses into those symlinks
prevents symlink cycles using realpath tracking
Helper to validate symlink mounts from config
Search tools
builtin-tools.ts
workspace-grep now follows symlinks under knowledge/
uses rg --follow
fallback uses grep -R
workspace-glob uses follow: true under knowledge/
Watcher
watcher.ts
followSymlinks: true so file changes in linked folders appear in the app
Knowledge graph integration
knowledge_index.ts
Recognizes:
knowledge//People
knowledge//Projects
knowledge//Organizations
knowledge//Topics
as valid category roots
So graph index and entity resolution work for mounted folders
build_graph.ts
Added explicit instruction: new notes must be created only in base knowledge folders, not mounted folders
Updates to existing notes (including in linked folders) are still allowed
UI: Add Knowledge Folder
Quick action
sidebar-content.tsx
Adds “Add Knowledge Folder” action in Knowledge toolbar
Uses circled plus icon (PlusCircle)
Dialog
App.tsx
Open folder picker → show dialog to name the folder
Creates symlink via IPC
Toasts updated to “knowledge folder” copy
Wording changed per your request (“Add Knowledge Folder”, “Link an existing folder…”)
UI: Unlink instead of delete for mounted folders
sidebar-content.tsx
On right‑click:
If folder is a symlink mount, action becomes “Unlink Knowledge Folder”
Otherwise it stays “Delete”
Prevents renaming of linked folders (to avoid breaking config)
Uses workspace:stat lazily to detect symlink
Unlink calls IPC to remove mount + config
Bugfix
workspace.ts
Fixed TS type error in readFile stats by explicitly typing stat as workspace.Stat
Other notable changes
Updated UI text everywhere to avoid the word “vault”
Updated toast messages to match new copy
Resolved rebase conflict in App.tsx after upstream changes (new tab support, etc.)