Windows portability fixes + interact with agents from the office window - #302
Open
paulocabrito620 wants to merge 4 commits into
Open
Conversation
quote() wrapped the file path in single quotes, which cmd.exe (used by execSync on Windows) does not strip. The spawned prettier/eslint then received a literal-quoted path, failed to find the file, and aborted the whole build via process.exit(1). Use double quotes so the path survives both POSIX shells and cmd.exe. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
cli.ts passed distRoot (__dirname, i.e. the dist/ dir) to copyHookScript(), which appends dist/hooks itself — yielding dist/dist/hooks. The hook script was never found, so it was not copied to ~/.pixel-agents/hooks/, leaving the 14 hook entries in the global settings.json pointing at a missing file and breaking hook delivery for every Claude session. Pass the package root (parent of dist/) so the path resolves to dist/hooks. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds a message input under the selected agent's overlay. Submitting writes the text to that agent's terminal (terminalRef.sendText) as if typed and presses Enter, so you can prompt/redirect a Claude agent without switching to its terminal. Teammates route to the lead's terminal. External/standalone agents (no terminal owned by the extension) are a no-op. - core/asyncapi.yaml: new SendAgentMessage client message (regenerated messages.ts) - adapters/vscode: handle sendAgentMessage -> terminal.show() + sendText - webview-ui: AgentMessageBar input in ToolOverlay + wiring in App Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New opt-in setting (Approve Tools from Window). When enabled, a PreToolUse for a non-exempt tool blocks until the user clicks Allow/Deny on the agent in the window; the decision is returned to Claude via the hook. - hook script reads the HTTP response and, for PreToolUse, forwards the decision to Claude as a permissionDecision (longer socket timeout). - httpServer holds the PreToolUse response and awaits a decision; hookEventHandler tracks pending approvals, broadcasts agentApprovalRequest, and resolves on RespondApproval (or times out after 9 min). - works in both standalone and VS Code modes; webview shows Allow/Deny; toggle in Settings. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@RSBLisboa is attempting to deploy a commit to the pablodelucca's projects Team on Vercel. A member of the Team first needs to authorize it. |
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
Two Windows portability fixes (the build was broken on Windows) plus two opt-in features for interacting with agents from the office window instead of only observing them.
Fixes
generate-messagesquote() cross-platform —quote()wrapped the path in single quotes, whichcmd.exe(used byexecSyncon Windows) does not strip, so the spawned prettier/eslint never found the file andprocess.exit(1)aborted the whole build. Now uses double quotes (works in POSIX shells and cmd.exe).copyHookScriptpath in standalone CLI —cli.tspasseddistRoot(thedist/dir) tocopyHookScript(), which appendsdist/hooksitself, yieldingdist/dist/hooks. The hook script was never copied to~/.pixel-agents/hooks/, leaving the globalsettings.jsonhooks pointing at a missing file. Now passes the package root.Features
terminal.sendText) as if typed and submits it. VS Code mode only (the extension owns the terminal); no-op for external/standalone agents.Approve Tools from Windowsetting. When enabled, aPreToolUsefor a non-exempt tool blocks until the user clicks Allow/Deny on the agent's character; the decision is returned to Claude via the hook'spermissionDecision. The server holds the hook response and resolves it on the window's decision (or times out after 9 min, under Claude's 10-min hook cap). Works in both standalone and VS Code modes.AgentApprovalRequest/AgentApprovalResolved(server→client),RespondApproval/SetApprovalsFromWindow(client→server),approvalsFromWindowinSettingsLoaded.Testing
npm run buildpasses end-to-end on Windows.fileStateAdapter/migrateVsCodeStateare unrelated — they mockHOME, whichos.homedir()ignores on Windows in favour ofUSERPROFILE; identical onmain).PreToolUseuntil Allow was clicked in the real webview, then returned{"decision":"allow"}to the hook.Notes
PreToolUsefires for every tool, so when on, every non-exempt tool asks for approval.🤖 Generated with Claude Code