⚙️ FEATURE-#30: Add in-chat toggle for the workspace jail - #31
Merged
Conversation
FernandoCelmer
commented
Aug 16, 2026
FernandoCelmer
left a comment
Member
Author
There was a problem hiding this comment.
🔍 Code Review
Code issues found: 0
This PR follows all established patterns exactly. Each concern was traced back to the codebase:
!!message.next— consistent withtoggleAutoApprove,toggleSkills,toggleDelegation,toggleMemoryinchatSidebarProvider.tsthis.reload()after toggle — intentional; all toggle methods reload to restart the subprocess with updated settings- No
try/catchintoggleWorkspace— matches the error-handling posture of every other toggle; errors surface via the globalunhandledrejectionhandler indom.js menuWorkspacenull risk — same pattern as all other DOM refs; the element is always rendered by the HTML template in the same requestworkspaceEnabled = message.workspace !== false— correct sentinel for a setting whose default istrue(same asskillsandmemory)
LGTM.
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.
Description
src/vscode/webview/html.ts— Adds a "Workspace jail" menu item, mirroring "Project memory".media/dom.js— AddsmenuWorkspace/menuWorkspaceCheckelement refs andworkspaceEnabledstate.media/menu.js— Wires the click totoggleWorkspace, appliesmessage.workspaceinapplySettings(), toggles the checkbox.eslint.config.mjs— Declares the new cross-file globals (same pattern as every other menu toggle).src/vscode/webview/messages.ts— Adds{ type: "toggleWorkspace"; next: boolean }toWebviewMessage.src/vscode/sidebar/chatSidebarProvider.ts— Routes it toSettingsController.toggleWorkspace().src/features/settings/settings.controller.ts— AddstoggleWorkspace()(mirrorstoggleMemory()) and includesworkspacein thepostSettings()payload.Motivation and Context
pycodeloop.workspace— the jail that keepsread_file/write_file/edit_file/delete_file/grep/globinside the workspace root — was already wired end-to-end from settings through to--no-workspace, but unlike every other boolean setting (skills, delegation, memory, auto-approve) it had no in-chat toggle. The only way to flip it was editingsettings.jsondirectly and reloading.Closes #30.
Types of changes
Checklist