Files
cline-multi-mirror/src/shared/WebviewMessage.ts
T
67cff02892 Feat: Faster file mentions searching, candidate scoring, sorting (#2599)
* Rebase

* prettier, logging

* removed opened file

* rebase

* fix

* Streaming

* Sorting

* Removed streaming

* One more file

* cleanup

* fix

* cleanup

* more filtering, prevented results flashing

* Better sorting/scoring, cleanup

* prettier

* more efficient sort

* prettier

* optimize and document

* cleanup

* one small cleanup

* changeset

* added package-lock.json to resolve git test runner error

* removed leftover logging

* tests

* tests

* moved tests to non running statae

* formatting

* setTimeout added for ContextMenu to prevent immediate invocation

* Removed unnecesary timeout

* Added 500ms delay to Searching... status indicator

* Fix package lock

* added updated tests

* More

---------

Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-04-05 00:28:46 -05:00

110 lines
2.7 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"
export interface WebviewMessage {
type:
| "addRemoteServer"
| "apiConfiguration"
| "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"
| "showAccountViewClicked"
| "authStateChanged"
| "authCallback"
| "fetchMcpMarketplace"
| "downloadMcp"
| "silentlyRefreshMcpMarketplace"
| "searchCommits"
| "showMcpView"
| "fetchLatestMcpServersFromHub"
| "telemetrySetting"
| "openSettings"
| "updateMcpTimeout"
| "fetchOpenGraphData"
| "checkIsImageUrl"
| "invoke"
| "updateSettings"
| "clearAllTaskHistory"
| "fetchUserCreditsData"
| "optionsResponse"
| "requestTotalTasksSize"
| "taskFeedback"
| "searchFiles"
// | "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
serverUrl?: string
toolNames?: string[]
autoApprove?: boolean
// For auth
user?: UserInfo | null
customToken?: string
// For openInBrowser
url?: string
planActSeparateModelsSetting?: boolean
telemetrySetting?: TelemetrySetting
customInstructionsSetting?: string
// For task feedback
feedbackType?: TaskFeedbackType
mentionsRequestId?: string
query?: string
}
export type ClineAskResponse = "yesButtonClicked" | "noButtonClicked" | "messageResponse"
export type ClineCheckpointRestore = "task" | "workspace" | "taskAndWorkspace"
export type TaskFeedbackType = "thumbs_up" | "thumbs_down"