Skip to content

feat: SCM 'Open with Pi' + active-editor-aware cwd#16

Open
renebarbosabc wants to merge 3 commits into
pithings:mainfrom
renebarbosabc:rbarbosa/scm-open-with-pi
Open

feat: SCM 'Open with Pi' + active-editor-aware cwd#16
renebarbosabc wants to merge 3 commits into
pithings:mainfrom
renebarbosabc:rbarbosa/scm-open-with-pi

Conversation

@renebarbosabc

Copy link
Copy Markdown

Summary

  • Add Open with Pi inline button and context menu in the SCM view that opens a pi terminal in the selected repository/worktree directory, resolving to the git root automatically
  • Make pi terminal cwd follow the active editor's workspace folder (active-editor-aware), falling back to the first workspace folder
  • Add vscode_open_folder bridge tool to open any folder in VS Code from pi
  • Refactor cwd resolution to flatten nested ternaries for readability
  • Improve error logging for the openInFolder command

Type of change

  • feat — new feature or command
  • refactor — code restructure, no behavior change

Verification

  • Lint and format pass (pnpm fmt)
  • Typecheck passes (pnpm typecheck)

- Add pi-vscode.openInFolder command (opens Pi terminal in a repo/worktree dir)
- Contribute to scm/sourceControl (inline button, group 3_worktree@2) and scm/resourceState/context (right-click menu)
- createNewTerminal and runPiRpcPrompt now resolve cwd from active editor's workspace folder
- Add openFolder bridge RPC handler and vscode_open_worktree Pi tool
- Accept optional cwd override in createNewTerminal
…logging

- Flatten nested ternary in cwd resolution (terminal.ts, chat.ts)
- Rename vscode_open_worktree to vscode_open_folder (accurate naming)
- Add comment explaining dirname usage in git root resolution
- Replace silent catch with console.warn in openInFolder handler
@renebarbosabc renebarbosabc changed the title feat: SCM 'Open with Pi' + active-editor-aware cwd + refactors feat: SCM 'Open with Pi' + active-editor-aware cwd Jun 4, 2026
@renebarbosabc renebarbosabc marked this pull request as ready for review June 4, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant