Repository navigation
feat: let the agent move and rename workspace files - #57
Merged
Merged
Conversation
A new move tool takes a file id and a new path. The id, revision and content stay, the preview kind follows the new extension, and an open document keeps its tab and address. Moves onto another file's path, across a file and folder of the same name, or of chat attachments are refused.
The file tree revealed a file's folders only when another file became active, so a file moved while open stayed hidden behind folded folders whenever its address was an id. Revealing follows the active file's path instead.
This was referenced Oct 1, 2026
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.
Why
Now that files live on folder paths (#52), the agent can create files in folders, but it cannot reorganize the ones that exist. Today it can only write text copies and leave the originals behind, and it cannot touch PDFs, Word files or images at all.
What changes
move({ fileId, path })→{ fileId, from, path }. It covers both moving and renaming.write:docs/a.md,./docs/a.mdand/workspace/docs/a.mdare all accepted.writeandmovenow share one validator,agentWorkspacePath.notes.txt→notes.mdnow renders as Markdown.data/file-store.ts:moveStoredFileruns in a single read-write transaction.shell/use-workspace.ts: when the open document moves, the address follows it to the new path. Before, the address went to/filesand the document closed.resource-tree.tsx: the active file's folders are revealed whenever its path changes, not only when another file becomes active.moverather than writing copies to organize files.Not handled
Tests
/workspace/prefix, reportsfrom, and rejects...guides/. The tab stays selected, the folder unfolds and the file stays highlighted. I confirmed that this test fails without the address-follow change.pnpm checkpasses. The known flaky "deletes only what this tab asked for" integration test can still fail under full-suite load, as it does on main.