import { ApiConfiguration } from "./api" import { AutoApprovalSettings } from "./AutoApprovalSettings" import { BrowserSettings } from "./BrowserSettings" import { ChatSettings } from "./ChatSettings" import { ChatContent } from "./ChatContent" export interface WebviewMessage { type: | "apiConfiguration" | "customInstructions" | "webviewDidLaunch" | "newTask" | "askResponse" | "clearTask" | "didShowAnnouncement" | "selectImages" | "exportCurrentTask" | "showTaskWithId" | "deleteTaskWithId" | "exportTaskWithId" | "resetState" | "requestOllamaModels" | "requestLmStudioModels" | "openImage" | "openInBrowser" | "openFile" | "openMention" | "cancelTask" | "refreshOpenRouterModels" | "refreshOpenAiModels" | "openMcpSettings" | "restartMcpServer" | "deleteMcpServer" | "autoApprovalSettings" | "browserSettings" | "togglePlanActMode" | "checkpointDiff" | "checkpointRestore" | "taskCompletionViewChanges" | "openExtensionSettings" | "requestVsCodeLmModels" | "toggleToolAutoApprove" | "toggleMcpServer" | "getLatestState" | "accountLoginClicked" | "accountLogoutClicked" | "subscribeEmail" | "fetchMcpMarketplace" | "downloadMcp" | "silentlyRefreshMcpMarketplace" | "searchCommits" | "showMcpView" | "fetchLatestMcpServersFromHub" | "telemetrySetting" | "openSettings" | "updateMcpTimeout" | "fetchOpenGraphData" | "checkIsImageUrl" // | "relaunchChromeDebugMode" text?: string disabled?: boolean askResponse?: ClineAskResponse apiConfiguration?: ApiConfiguration images?: string[] bool?: boolean number?: number autoApprovalSettings?: AutoApprovalSettings browserSettings?: BrowserSettings chatSettings?: ChatSettings chatContent?: ChatContent mcpId?: string timeout?: number // For toggleToolAutoApprove serverName?: string toolName?: string autoApprove?: boolean // For openInBrowser url?: string } export type ClineAskResponse = "yesButtonClicked" | "noButtonClicked" | "messageResponse" export type ClineCheckpointRestore = "task" | "workspace" | "taskAndWorkspace"