Skip to main content

Interface: FrontendPluginContext

Defined in: types/frontend.ts:99

Extended plugin context for frontend plugins. Provides registration methods for each UI extension point. Every registerXxx method returns a Disposable that removes the registration.

Extends

Properties

logger

logger: PluginLogger

Defined in: types/plugin.ts:50

Scoped logger instance for the plugin

Inherited from

PluginContext.logger


pluginId

pluginId: string

Defined in: types/plugin.ts:47

The ID of the plugin being activated

Inherited from

PluginContext.pluginId


subscriptions

subscriptions: Disposable[]

Defined in: types/plugin.ts:56

Array of disposables that will be disposed when the plugin deactivates. Push disposables here during activate() for automatic cleanup.

Inherited from

PluginContext.subscriptions

Methods

registerActionBarItem()

registerActionBarItem(registration): Disposable

Defined in: types/frontend.ts:146

Register an item in the main action bar. Action bar items are shown based on the active session's AI mode.

Parameters

ParameterType
registrationActionBarItemRegistration

Returns

Disposable

Disposable that removes this item registration


registerMoreMenuItem()

registerMoreMenuItem(registration): Disposable

Defined in: types/frontend.ts:154

Register a menu item in the "More" overflow menu. Appears in the context menu for matching sessions.

Parameters

ParameterType
registrationMoreMenuItemRegistration

Returns

Disposable

Disposable that removes this menu item registration


registerSessionStatusRenderer()

registerSessionStatusRenderer(registration): Disposable

Defined in: types/frontend.ts:122

Register a custom session status renderer for a specific AI mode. Overrides or augments the default status display for sessions of that mode.

Parameters

ParameterType
registrationSessionStatusRendererRegistration

Returns

Disposable

Disposable that removes this renderer registration


registerSettingsCategory()

registerSettingsCategory(registration): Disposable

Defined in: types/frontend.ts:114

Register a new settings category (group of sections). Categories appear as top-level groups in the settings sidebar navigation.

Parameters

ParameterType
registrationSettingsCategoryRegistration

Returns

Disposable

Disposable that removes this category registration


registerSettingsSection()

registerSettingsSection(registration): Disposable

Defined in: types/frontend.ts:106

Register a settings section within an existing or plugin-provided category. The section appears as a navigation item in the settings sidebar.

Parameters

ParameterType
registrationSettingsSectionRegistration

Returns

Disposable

Disposable that removes this section registration


registerTerminalHeaderAction()

registerTerminalHeaderAction(registration): Disposable

Defined in: types/frontend.ts:138

Register an action button in the terminal header area. Appears alongside existing terminal header controls for matching sessions.

Parameters

ParameterType
registrationTerminalHeaderActionRegistration

Returns

Disposable

Disposable that removes this action registration


registerTheme()

registerTheme(registration): Disposable

Defined in: types/frontend.ts:162

Register a custom theme with the theme system. The theme appears in the appearance settings alongside built-in themes.

Parameters

ParameterType
registrationThemeRegistration

Returns

Disposable

Disposable that removes this theme registration


registerUsagePanel()

registerUsagePanel(registration): Disposable

Defined in: types/frontend.ts:130

Register a usage panel component for a specific AI mode. Shown in the usage display area when viewing sessions of that mode.

Parameters

ParameterType
registrationUsagePanelRegistration

Returns

Disposable

Disposable that removes this panel registration