WebviewMessage.ts 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. | "requestVsCodeLmModels"
  25. | "openImage"
  26. | "openFile"
  27. | "openMention"
  28. | "cancelTask"
  29. | "refreshOpenRouterModels"
  30. | "refreshOpenAiModels"
  31. | "alwaysAllowBrowser"
  32. | "alwaysAllowMcp"
  33. | "playSound"
  34. | "soundEnabled"
  35. | "soundVolume"
  36. | "diffEnabled"
  37. | "browserViewportSize"
  38. | "screenshotQuality"
  39. | "openMcpSettings"
  40. | "restartMcpServer"
  41. | "toggleToolAlwaysAllow"
  42. | "toggleMcpServer"
  43. | "fuzzyMatchThreshold"
  44. | "preferredLanguage"
  45. | "writeDelayMs"
  46. | "enhancePrompt"
  47. | "enhancedPrompt"
  48. | "draggedImages"
  49. | "deleteMessage"
  50. | "terminalOutputLineLimit"
  51. | "mcpEnabled"
  52. text?: string
  53. disabled?: boolean
  54. askResponse?: ClineAskResponse
  55. apiConfiguration?: ApiConfiguration
  56. images?: string[]
  57. bool?: boolean
  58. value?: number
  59. commands?: string[]
  60. audioType?: AudioType
  61. serverName?: string
  62. toolName?: string
  63. alwaysAllow?: boolean
  64. dataUrls?: string[]
  65. values?: Record<string, any>
  66. }
  67. export type ClineAskResponse = "yesButtonClicked" | "noButtonClicked" | "messageResponse"