feat - support edit/create local files outside of workspace#248
Open
xinyi-gong wants to merge 3 commits into
Open
feat - support edit/create local files outside of workspace#248xinyi-gong wants to merge 3 commits into
xinyi-gong wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for tracking and reviewing create_file / insert_edit_into_file operations targeting absolute local filesystem paths outside the Eclipse workspace, integrating them into the existing “file change summary bar” UX and diff/keep/undo flows.
Changes:
- Introduces a
ChangedFileabstraction so the summary bar can track both workspaceIFileand externalPathtargets. - Extends Create/Edit file tools and the compare-editor plumbing to support local files (including empty-baseline diffs for newly created files).
- Adds/updates unit tests and documents a SWTBot test plan for the user-visible local-file flows.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/WorkingSetBar.java | Updates summary bar UI to render and route actions for ChangedFile (workspace + local). |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/tools/WorkingSetHandler.java | Extends handler contract with Path overloads for keep/undo/view-diff. |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/tools/FileToolService.java | Switches change tracking to ChangedFile, adds routing for local keep/undo/diff and “created then edited” behavior. |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/tools/FileToolBase.java | Adds local-file caches and compare editor handling (Path-keyed) alongside existing workspace support. |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/tools/EditFileTool.java | Adds local-path resolution + local edit/write/undo/diff behavior. |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/tools/EditableLocalFileCompareInput.java | New compare input to represent editable local-file content within Compare UI. |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/tools/CreateFileTool.java | Adds local file creation + local diff/undo support; adjusts baseline caching for create flows. |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/tools/ChangedFile.java | New model type representing either a workspace IFile or external local Path. |
| com.microsoft.copilot.eclipse.ui.test/src/com/microsoft/copilot/eclipse/ui/chat/WorkingSetBarTest.java | Updates UI unit tests to use ChangedFile for summary bar rendering scenarios. |
| com.microsoft.copilot.eclipse.ui.test/src/com/microsoft/copilot/eclipse/ui/chat/tools/EditFileToolTest.java | Adds focused unit coverage for external local-file edit and undo/baseline behavior. |
| com.microsoft.copilot.eclipse.ui.test/src/com/microsoft/copilot/eclipse/ui/chat/tools/CreateFileToolTest.java | Adds focused unit coverage for external local-file create and undo behavior. |
| com.microsoft.copilot.eclipse.swtbot.test/test-plans/file-system/local-file-edit-and-create-tools.md | Adds a SWTBot-oriented manual test plan for local file edit/create UX flows. |
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
create_fileandedit_filetool when the target is an absolute local file path outside the Eclipse workspace.IFileresources before falling back to local filesystem paths.