Files
cline/src/shared/WebviewMessage.ts
T
ToshiiandCline Evaluation 5147e28aaf workflows (#3540)
* remove workflows subdirectory from cline local toggles

* set workflow toggles

* pre-updating the rules deletion logic

* delete file logic

* integration with task

* words

* pre-updating storage structure of workflows

* workflow menu items, no regex

* slash menu scrolling

* menu buttons

* placeholder

* match command base

* regex

* nit

* slash menu click outside

* changeset

* fixing linter warning

* better UI/UX

---------

Co-authored-by: Cline Evaluation <cline@example.com>
2025-05-15 22:20:20 -07:00

129 lines
3.2 KiB
TypeScript

import { ApiConfiguration } from "./api"
import { AutoApprovalSettings } from "./AutoApprovalSettings"
import { BrowserSettings } from "./BrowserSettings"
import { ChatSettings } from "./ChatSettings"
import { UserInfo } from "./UserInfo"
import { ChatContent } from "./ChatContent"
import { TelemetrySetting } from "./TelemetrySetting"
import { McpViewTab } from "./mcp"
export interface WebviewMessage {
type:
| "apiConfiguration"
| "webviewDidLaunch"
| "newTask"
| "condense"
| "reportBug"
| "askResponse"
| "didShowAnnouncement"
| "resetState"
| "openInBrowser"
| "openMention"
| "showChatView"
| "refreshClineRules"
| "openMcpSettings"
| "restartMcpServer"
| "deleteMcpServer"
| "autoApprovalSettings"
| "browserRelaunchResult"
| "togglePlanActMode"
| "taskCompletionViewChanges"
| "openExtensionSettings"
| "requestVsCodeLmModels"
| "toggleToolAutoApprove"
| "accountLogoutClicked"
| "showAccountViewClicked"
| "authStateChanged"
| "authCallback"
| "fetchMcpMarketplace"
| "silentlyRefreshMcpMarketplace"
| "searchCommits"
| "fetchLatestMcpServersFromHub"
| "telemetrySetting"
| "openSettings"
| "fetchOpenGraphData"
| "invoke"
| "updateSettings"
| "clearAllTaskHistory"
| "fetchUserCreditsData"
| "optionsResponse"
| "requestTotalTasksSize"
| "relaunchChromeDebugMode"
| "taskFeedback"
| "scrollToSettings"
| "searchFiles"
| "grpc_request"
| "grpc_request_cancel"
| "toggleClineRule"
| "toggleCursorRule"
| "toggleWindsurfRule"
| "toggleWorkflow"
| "deleteClineRule"
| "copyToClipboard"
| "updateTerminalConnectionTimeout"
| "setActiveQuote"
// | "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
tab?: McpViewTab
// For toggleToolAutoApprove
serverName?: string
serverUrl?: string
toolNames?: string[]
autoApprove?: boolean
// For auth
user?: UserInfo | null
customToken?: string
// For openInBrowser
url?: string
planActSeparateModelsSetting?: boolean
enableCheckpointsSetting?: boolean
mcpMarketplaceEnabled?: boolean
telemetrySetting?: TelemetrySetting
customInstructionsSetting?: string
// For task feedback
feedbackType?: TaskFeedbackType
mentionsRequestId?: string
query?: string
// For toggleFavoriteModel
modelId?: string
grpc_request?: {
service: string
method: string
message: any // JSON serialized protobuf message
request_id: string // For correlating requests and responses
is_streaming?: boolean // Whether this is a streaming request
}
grpc_request_cancel?: {
request_id: string // ID of the request to cancel
}
// For cline rules and workflows
isGlobal?: boolean
rulePath?: string
workflowPath?: string
enabled?: boolean
filename?: string
offset?: number
shellIntegrationTimeout?: number
}
export type ClineAskResponse = "yesButtonClicked" | "noButtonClicked" | "messageResponse"
export type ClineCheckpointRestore = "task" | "workspace" | "taskAndWorkspace"
export type TaskFeedbackType = "thumbs_up" | "thumbs_down"