mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
chore(shared): dedupe WebviewMessage.type union; add WebviewMessagePayload alias; clarify ExtensionMessage header comment
This commit is contained in:
parent
06d5674801
commit
8ac8247ca9
2 changed files with 9 additions and 6 deletions
|
|
@ -57,9 +57,12 @@ export interface LanguageModelChatSelector {
|
|||
id?: string
|
||||
}
|
||||
|
||||
// Represents JSON data that is sent from extension to webview, called
|
||||
// ExtensionMessage and has 'type' enum which can be 'plusButtonClicked' or
|
||||
// 'settingsButtonClicked' or 'hello'. Webview will hold state.
|
||||
/**
|
||||
* Message sent from the VS Code extension to the webview UI.
|
||||
* The 'type' union below enumerates outbound notifications and data updates
|
||||
* (e.g., "state", "theme", "indexingStatusUpdate", "filesChanged") that the
|
||||
* webview consumes to render and synchronize state. See the full union below.
|
||||
*/
|
||||
export interface ExtensionMessage {
|
||||
type:
|
||||
| "action"
|
||||
|
|
|
|||
|
|
@ -83,7 +83,6 @@ export interface WebviewMessage {
|
|||
| "allowedMaxRequests"
|
||||
| "allowedMaxCost"
|
||||
| "alwaysAllowSubtasks"
|
||||
| "alwaysAllowUpdateTodoList"
|
||||
| "autoCondenseContext"
|
||||
| "autoCondenseContextPercent"
|
||||
| "condensingApiConfigId"
|
||||
|
|
@ -186,7 +185,6 @@ export interface WebviewMessage {
|
|||
| "indexCleared"
|
||||
| "focusPanelRequest"
|
||||
| "profileThresholds"
|
||||
| "setHistoryPreviewCollapsed"
|
||||
| "openExternal"
|
||||
| "filterMarketplaceItems"
|
||||
| "marketplaceButtonClicked"
|
||||
|
|
@ -197,7 +195,6 @@ export interface WebviewMessage {
|
|||
| "marketplaceInstallResult"
|
||||
| "fetchMarketplaceData"
|
||||
| "switchTab"
|
||||
| "profileThresholds"
|
||||
| "shareTaskSuccess"
|
||||
| "exportMode"
|
||||
| "exportModeResult"
|
||||
|
|
@ -346,3 +343,6 @@ export type WebViewMessagePayload =
|
|||
| IndexClearedPayload
|
||||
| InstallMarketplaceItemWithParametersPayload
|
||||
| UpdateTodoListPayload
|
||||
|
||||
// Alias for consistent naming (prefer 'Webview' spelling in new code)
|
||||
export type WebviewMessagePayload = WebViewMessagePayload
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue