Repository navigation
Add /remove-dir and keep /add-dir grants across resets - #389
Merged
Merged
Conversation
Adds a /remove-dir [N] command that drops the Nth granted folder, or all of them when called bare, and numbers the bare /add-dir listing from 1. Grants now survive /reset, /clear and /handoff, so /remove-dir is the only way to drop them. The help text, the CLAUDE.md rule and the tests are updated to match.
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.
Summary
Adds a
/remove-dir [N]TUI chat command and changes/add-dirgrants to persist across/reset,/clearand/handoff. Grants are now removed only explicitly with/remove-dir.Changes
/remove-dir(commands.rs,side_panel.rs,app.rs): bare form removes all grants of the active conversation;/remove-dir Nremoves the Nth grant (1-based). Out-of-range or non-numeric values leave grants untouched and show a usage message with the current listing. Dispatch matches on the first token, so/remove-diris not confused with other commands./add-dirlisting: bare/add-dirnow numbers grants from 1 so the numbers match what/remove-dir Ntakes. Listing text is factored intoadd_dir_listing.agent_chat.rs):reset_conversation_atno longer clearssession_read_folders, so/reset,/clearand/handoffkeep them. Doc comments,/helptext and the/add-dirconfirmation message are updated accordingly./add-dirrule inCLAUDE.mdnow describes the new persistence and/remove-dir./remove-diris asserted not to be inREMOTE_ALLOWED_SLASH.Testing
git diff --check origin/main...HEADcargo test— skipped (not run for this PR). New and updated unit tests are included but were not executed here.Risks / Notes
/reset,/clearor/handoffto drop read-only folder grants must now run/remove-dir. Grants remain persisted with the conversation, so they carry on until removed./add-dir,/remove-diris desktop only and is not in the remote slash allow-list.