globalState.ts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. // Define the array first with 'as const' to create a readonly tuple type
  2. export const SECRET_KEYS = [
  3. "apiKey",
  4. "glamaApiKey",
  5. "openRouterApiKey",
  6. "awsAccessKey",
  7. "awsSecretKey",
  8. "awsSessionToken",
  9. "openAiApiKey",
  10. "geminiApiKey",
  11. "openAiNativeApiKey",
  12. "deepSeekApiKey",
  13. "mistralApiKey",
  14. "unboundApiKey",
  15. "requestyApiKey",
  16. ] as const
  17. // Derive the type from the array - creates a union of string literals
  18. export type SecretKey = (typeof SECRET_KEYS)[number]
  19. // Define the array first with 'as const' to create a readonly tuple type
  20. export const GLOBAL_STATE_KEYS = [
  21. "apiProvider",
  22. "apiModelId",
  23. "glamaModelId",
  24. "glamaModelInfo",
  25. "awsRegion",
  26. "awsUseCrossRegionInference",
  27. "awsProfile",
  28. "awsUseProfile",
  29. "vertexKeyFile",
  30. "vertexJsonCredentials",
  31. "vertexProjectId",
  32. "vertexRegion",
  33. "lastShownAnnouncementId",
  34. "customInstructions",
  35. "alwaysAllowReadOnly",
  36. "alwaysAllowWrite",
  37. "alwaysAllowExecute",
  38. "alwaysAllowBrowser",
  39. "alwaysAllowMcp",
  40. "alwaysAllowModeSwitch",
  41. "taskHistory",
  42. "openAiBaseUrl",
  43. "openAiModelId",
  44. "openAiCustomModelInfo",
  45. "openAiUseAzure",
  46. "ollamaModelId",
  47. "ollamaBaseUrl",
  48. "lmStudioModelId",
  49. "lmStudioBaseUrl",
  50. "anthropicBaseUrl",
  51. "modelMaxThinkingTokens",
  52. "azureApiVersion",
  53. "openAiStreamingEnabled",
  54. "openRouterModelId",
  55. "openRouterModelInfo",
  56. "openRouterBaseUrl",
  57. "openRouterUseMiddleOutTransform",
  58. "allowedCommands",
  59. "soundEnabled",
  60. "soundVolume",
  61. "diffEnabled",
  62. "enableCheckpoints",
  63. "checkpointStorage",
  64. "browserViewportSize",
  65. "screenshotQuality",
  66. "fuzzyMatchThreshold",
  67. "preferredLanguage", // Language setting for Cline's communication
  68. "writeDelayMs",
  69. "terminalOutputLimit",
  70. "mcpEnabled",
  71. "enableMcpServerCreation",
  72. "alwaysApproveResubmit",
  73. "requestDelaySeconds",
  74. "rateLimitSeconds",
  75. "currentApiConfigName",
  76. "listApiConfigMeta",
  77. "vsCodeLmModelSelector",
  78. "mode",
  79. "modeApiConfigs",
  80. "customModePrompts",
  81. "customSupportPrompts",
  82. "enhancementApiConfigId",
  83. "experiments", // Map of experiment IDs to their enabled state
  84. "autoApprovalEnabled",
  85. "customModes", // Array of custom modes
  86. "unboundModelId",
  87. "requestyModelId",
  88. "requestyModelInfo",
  89. "unboundModelInfo",
  90. "modelTemperature",
  91. "modelMaxTokens",
  92. "mistralCodestralUrl",
  93. "maxOpenTabsContext",
  94. "browserToolEnabled",
  95. "lmStudioSpeculativeDecodingEnabled",
  96. "lmStudioDraftModelId",
  97. "telemetrySetting",
  98. ] as const
  99. // Derive the type from the array - creates a union of string literals
  100. export type GlobalStateKey = (typeof GLOBAL_STATE_KEYS)[number]