WebviewMessage.ts 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. | "refreshGlamaModels"
  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. | "searchCommits"
  53. text?: string
  54. disabled?: boolean
  55. askResponse?: ClineAskResponse
  56. apiConfiguration?: ApiConfiguration
  57. images?: string[]
  58. bool?: boolean
  59. value?: number
  60. commands?: string[]
  61. audioType?: AudioType
  62. serverName?: string
  63. toolName?: string
  64. alwaysAllow?: boolean
  65. dataUrls?: string[]
  66. values?: Record<string, any>
  67. query?: string
  68. }
  69. export type ClineAskResponse = "yesButtonClicked" | "noButtonClicked" | "messageResponse"