subpanel add
A subpanel is a webview view rendered inline inside a menu’s activity-bar container (unlike a panel, which opens in the editor area).
vsceasy subpanel add --name history --menu settings --title "History"Flags
| Flag | Type | Notes |
|---|---|---|
--name | text | Required. Subpanel id. |
--menu | menu id | Required. Container to render inside. |
--title | text | View title. |
--withApi | yes | no | Generate a typed RPC interface. |
What it generates
src/subpanels/<name>.ts— the subpanel definition.src/webview/subpanels/<name>/{App.tsx,main.tsx}— the React UI.- Appends
<Name>ViewApitosrc/shared/api.tswhen the API is on.
import { defineSubpanel } from '../shared/vsceasy';
export default defineSubpanel({ title: 'History', menu: 'settings',});Subpanels and panels share the same RPC machinery — see Typed RPC.