Skip to content

Conversation

kvyb
Copy link
Contributor

@kvyb kvyb commented Jul 26, 2025

Related Issue

Issue: #XXXX

Description

Simple migration of vscode.commands.executeCommand("vscode.open", ...) calls to hostbridge pattern.
This change:

  • Moves the vscode.open command into a hostbridge without changing any product logic
  • Affects only the openImage() function in open-file.ts where temp images are opened

Test Procedure

  • Verified code compiles and passes linting (npm run lint)
  • Manually tested that opening images still works as before
  • Confirmed no behavior changes - same functionality, different call path

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • ♻️ Refactor Changes
  • 💅 Cosmetic Changes
  • 📚 Documentation update
  • 🏃 Workflow Changes

Pre-flight Checklist

  • Changes are limited to a single feature, bugfix or chore (split larger changes into separate PRs)
  • Tests are passing (npm test) and code is formatted and linted (npm run format && npm run lint)
  • I have created a changeset using npm run changeset (required for user-facing changes)
  • I have reviewed contributor guidelines

Screenshots

Additional Notes


Important

Refactor vscode.open command to use hostbridge pattern in openImage function, updating window.proto and maintaining functionality.

  • Refactor:
    • Move vscode.commands.executeCommand("vscode.open") to openFile function in openFile.ts.
    • Update openImage() in open-file.ts to use HostProvider.window.openFile().
  • Proto Changes:
    • Add openFile, getOpenTabs, and getVisibleTabs RPC methods to window.proto.
  • Testing:
    • Verified code compiles and passes linting.
    • Manually tested image opening functionality remains unchanged.

This description was created by Ellipsis for 53f680d. You can customize this summary. It will automatically update as commits are pushed.

kvyb added 2 commits July 24, 2025 07:01
- Remove success boolean field from OpenFileResponse proto
- Use gRPC exceptions for error handling instead of success/failure booleans
- Simplify hostbridge implementation to just move existing vscode.open code
Copy link

changeset-bot bot commented Jul 26, 2025

⚠️ No Changeset found

Latest commit: dc953cc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@kvyb kvyb requested a review from sjf July 26, 2025 07:12
Copy link
Contributor

Coverage Report

Extension Coverage

Base branch: 46%

PR branch: 47%

✅ Coverage increased or remained the same

Webview Coverage

Base branch: 17%

PR branch: 17%

✅ Coverage increased or remained the same

Overall Assessment

Test coverage has been maintained or improved

Last updated: 2025-07-26T07:13:19.476834

@sjf sjf merged commit 195e15d into main Jul 26, 2025
13 checks passed
li-yechao pushed a commit to li-yechao/cline that referenced this pull request Jul 27, 2025
…ne#5173)

* feat: add openFile host bridge for vscode.open command

* fix: simplify openFile hostbridge to follow gRPC best practices:
- Remove success boolean field from OpenFileResponse proto
- Use gRPC exceptions for error handling instead of success/failure booleans
- Simplify hostbridge implementation to just move existing vscode.open code

* fix: remove create wrapper from openFile call

* fix proto merge conflict
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.

2 participants