WebviewMessage.ts 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. import { ApiConfiguration, ApiProvider } from "./api"
  2. export type AudioType = "notification" | "celebration" | "progress_loop"
  3. export interface WebviewMessage {
  4. type:
  5. | "apiConfiguration"
  6. | "customInstructions"
  7. | "allowedCommands"
  8. | "alwaysAllowReadOnly"
  9. | "alwaysAllowWrite"
  10. | "alwaysAllowExecute"
  11. | "webviewDidLaunch"
  12. | "newTask"
  13. | "askResponse"
  14. | "clearTask"
  15. | "didShowAnnouncement"
  16. | "selectImages"
  17. | "exportCurrentTask"
  18. | "showTaskWithId"
  19. | "deleteTaskWithId"
  20. | "exportTaskWithId"
  21. | "resetState"
  22. | "requestOllamaModels"
  23. | "requestLmStudioModels"
  24. | "openImage"
  25. | "openFile"
  26. | "openMention"
  27. | "cancelTask"
  28. | "refreshOpenRouterModels"
  29. | "refreshOpenAiModels"
  30. | "alwaysAllowBrowser"
  31. | "alwaysAllowMcp"
  32. | "playSound"
  33. | "soundEnabled"
  34. | "soundVolume"
  35. | "diffEnabled"
  36. | "browserViewportSize"
  37. | "screenshotQuality"
  38. | "openMcpSettings"
  39. | "restartMcpServer"
  40. | "toggleToolAlwaysAllow"
  41. | "toggleMcpServer"
  42. | "fuzzyMatchThreshold"
  43. | "preferredLanguage"
  44. | "writeDelayMs"
  45. | "enhancePrompt"
  46. | "enhancedPrompt"
  47. | "draggedImages"
  48. | "deleteMessage"
  49. text?: string
  50. disabled?: boolean
  51. askResponse?: ClineAskResponse
  52. apiConfiguration?: ApiConfiguration
  53. images?: string[]
  54. bool?: boolean
  55. value?: number
  56. commands?: string[]
  57. audioType?: AudioType
  58. serverName?: string
  59. toolName?: string
  60. alwaysAllow?: boolean
  61. dataUrls?: string[]
  62. values?: Record<string, any>
  63. }
  64. export type ClineAskResponse = "yesButtonClicked" | "noButtonClicked" | "messageResponse"