TabbyML / pochi

Home Page:https://docs.getpochi.com

Repository from Github https://github.comTabbyML/pochiRepository from Github https://github.comTabbyML/pochi

Feature Request: Support 'revealSettings' option for PochiConfigFilePath

wsxiaoys opened this issue · comments

Summary

Currently, commands like pochi.mcp.addServer, pochi.mcp.openServerSettings, and pochi.openCustomModelSettings open the PochiConfigFilePath using vscode.open. This works, but it just opens the file at the top.

It would be a great improvement to support a revealSettings option, similar to how workbench.action.openSettingsJson works. This would allow us to open the configuration file and directly navigate the user to the relevant setting (e.g., a newly added MCP server configuration).

Affected Code

The relevant code is located in packages/vscode/src/integrations/command.ts.

The specific commands that would benefit from this are:

  • pochi.mcp.addServer
  • pochi.mcp.openServerSettings
  • pochi.openCustomModelSettings

Implementation Idea

We should investigate if vscode.open or another VS Code API allows for revealing a specific JSON path within a file upon opening it. The goal is to replicate the behavior of workbench.action.openSettingsJson for our own configuration file.

🤖 Generated with Pochi

I would like to take this one. Thanks!

We need something like this:

openPochiConfig({
  revealSettings: {
    key: "pochi.mcpServers"
  }
})

revealSettings can

  • create the json field if it is not in pochi config file
  • locate the position of the json field and put editor cursor on it