WebviewMessage.ts 1.8 KB

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