Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 24, 2025

Overview

This PR adds a new "Open in New Window" button to BSP items in the PROJECT FILES tree view when running in workspace mode. This allows users to quickly open a specific BSP project in a new VS Code window for independent development.

Changes

  • Added new command extension.openProjectInNewWindow with the empty-window icon
  • Implemented the command handler to open BSP directories in new VS Code windows using vscode.openFolder
  • Registered the command as an inline action button for project_bsp items

UI Enhancement

The new button appears as the 4th inline icon (after Build, Menuconfig, and Open Terminal) on each BSP item in the PROJECT FILES view:

Current UI

The new button uses VS Code's built-in empty-window icon:

Icon

Implementation Details

Modified Files:

  • package.json: Added command definition and menu contribution
  • src/project/cmd.ts: Implemented openProjectInNewWindow() function
  • src/project/tree.ts: Registered the command in initProjectTree()

The implementation follows the existing patterns for other inline buttons (Build, Menuconfig, Open Terminal) and integrates seamlessly with the workspace mode functionality.

Usage

When in workspace mode with multiple BSPs listed in the PROJECT FILES view, users can click the new "Open in New Window" button to open that specific BSP directory in a separate VS Code window, making it easier to work on multiple BSPs simultaneously.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • registry.npmmirror.com
    • Triggering command: npm install (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>feature: 在workspace模式下,针对bsp增加新开窗口打开bsp工程的图标按钮</issue_title>
<issue_description>在workspace模式下,PROJECT FILES 会列出关注的BSP列表,目前有 Build, Menuconfig, Open RT-Thread Terminal 的功能,如下图所示:

Image

Open RT-Thread Terminal图标后新添加一个 Open in New Window 给功能。图标可以使用

Image

即vscode icone:empty-window 。点击这个图标后,将使用vscode来打开对应的bsp目录。

</issue_description>

<agent_instructions>按issue描述添加新功能,添加后需要编译验证,确保没问题。</agent_instructions>

Comments on the Issue (you are @copilot in this section)

Fixes #25


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add 'Open in New Window' button for BSP in workspace mode feat: Add "Open in New Window" button for BSP projects in workspace mode Oct 24, 2025
Copilot AI requested a review from BernardXiong October 24, 2025 01:51
@BernardXiong BernardXiong marked this pull request as ready for review October 24, 2025 02:33
@BernardXiong BernardXiong merged commit 7aff41e into main Oct 24, 2025
2 checks passed
@BernardXiong BernardXiong deleted the copilot/add-open-in-new-window-button branch October 24, 2025 17:06
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.

feature: 在workspace模式下,针对bsp增加新开窗口打开bsp工程的图标按钮

2 participants