Skip to content

[FEATURE]: cleaner and more aware extensions integration with vscode #7275

@altendky

Description

@altendky

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

hey all, thanks for opencode! we are switching to it at work from claude code. i've noticed a couple rough edges around the extension integration with vscode and have started developing some changes. but... that's the wrong order i'm supposed to make a ticket first so here i am. sorry about that.

i noticed a few little things pretty quickly.

  • the tab title doesn't get updated even though the tui intends to
  • exiting opencode leaves you at a terminal rather than closing the tab
  • closing the tab directly provides a terminal-style do you want to terminate dialog (not textual, but as if you are terminating a regular terminal, since you are)
  • opencode is unaware of what editors you have open or text you have selected in them

i have started working on these points. again, sorry for the wrong order. :[ at a high level the changes i'm working on are:

  • extension
    • switch from a vscode terminal to node-pty
      • runs fine initially, needs more detailed compatibility testing
      • allows setting of the title by the existing tui mechanism
      • directly closes the tab on exit
      • closing the tab directly works without a warning
    • cleanup
      • review auto-formatting and eslint and such
        • i keep getting a bunch of semicolons added to the file
      • add all disposables to the context for automatic cleanup
  • tui
    • the list of active mcp servers does not include dynamically configured servers
  • tui / extension integration
    • detect the vscode-mcp-extension in the opencode extension and configure it dynamically in the launched tui
      • easy enough to add but ran into the tui bug noted above
    • let the tui request port 0 and notify the extension of the listening port via a file
      • technically, this avoids picking a used port. personally, this avoids reminding me of all the times of addressed this sort of pattern in other code bases :]
      • adding a --dump-port cli option to pass a path to write the port to
      • could be an env var or...

i know vscode-mcp-server is a separate project, but i'll note that to achieve all my goals i will need to add some features to it. directly from my opening list, it needs to expose the editors and selections to provide awareness of those details around the user presence in the ide. i have it 'working', but of all these different things, that's really the only place there's much complexity it seems.

while i have every intent of making that work well in vscode-mcp-server, i think that the other changes i have mentioned that are in this opencode repository stand alone as valuable. not like gold and platinum valuable or anything... but like, bronze and copper valuable maybe? i dunno.

thanks for your time. let me know what interest, concerns, or general thoughts you have on all this.

cheers,
-kyle

some links that are related, or adjacent, to these topics.

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussionwebRelates to opencode on web / desktop

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions