Context
Sub-issue of #1. Splits the secrets-cleanup work into two reviewable pieces.
openRouterImageApiKey flows through getStateToPostToWebview() as a raw string. Unlike the provider API keys in apiConfiguration, this field is only used to derive a boolean status (isConfigured = !!openRouterImageApiKey) in ImageGenerationSettings.tsx — the raw value is never needed in the renderer.
This is the simpler half: no settings-input UX changes required. It also establishes the boolean-presence pattern that W1.1b will apply more broadly.
Developer Notes
- In
getStateToPostToWebview() (src/core/webview/ClineProvider.ts): replace openRouterImageApiKey (raw string) with openRouterImageApiKeyConfigured: !!openRouterImageApiKey.
- Update
ExtensionState type in packages/types/src/ to reflect the new field name/type.
- In
webview-ui/src/context/ExtensionStateContext.tsx: update the state shape and initial value.
- In
webview-ui/src/components/settings/ImageGenerationSettings.tsx: change the openRouterImageApiKey?: string prop to openRouterImageApiKeyConfigured: boolean; derive isConfigured from the boolean directly.
- When the user types a new key in the settings input and saves, the value is posted back via the existing settings-save message — no change needed there.
- Files:
src/core/webview/ClineProvider.ts, packages/types/src/, webview-ui/src/context/ExtensionStateContext.tsx, webview-ui/src/components/settings/ImageGenerationSettings.tsx, webview-ui/src/components/settings/ExperimentalSettings.tsx, webview-ui/src/components/settings/SettingsView.tsx.
- Validation: webview functions identically; unit test asserts the broadcast payload does not contain
openRouterImageApiKey as a string field; isConfigured renders correctly for both configured and unconfigured states.
Context
Sub-issue of #1. Splits the secrets-cleanup work into two reviewable pieces.
openRouterImageApiKeyflows throughgetStateToPostToWebview()as a raw string. Unlike the provider API keys inapiConfiguration, this field is only used to derive a boolean status (isConfigured = !!openRouterImageApiKey) inImageGenerationSettings.tsx— the raw value is never needed in the renderer.This is the simpler half: no settings-input UX changes required. It also establishes the boolean-presence pattern that W1.1b will apply more broadly.
Developer Notes
getStateToPostToWebview()(src/core/webview/ClineProvider.ts): replaceopenRouterImageApiKey(raw string) withopenRouterImageApiKeyConfigured: !!openRouterImageApiKey.ExtensionStatetype inpackages/types/src/to reflect the new field name/type.webview-ui/src/context/ExtensionStateContext.tsx: update the state shape and initial value.webview-ui/src/components/settings/ImageGenerationSettings.tsx: change theopenRouterImageApiKey?: stringprop toopenRouterImageApiKeyConfigured: boolean; deriveisConfiguredfrom the boolean directly.src/core/webview/ClineProvider.ts,packages/types/src/,webview-ui/src/context/ExtensionStateContext.tsx,webview-ui/src/components/settings/ImageGenerationSettings.tsx,webview-ui/src/components/settings/ExperimentalSettings.tsx,webview-ui/src/components/settings/SettingsView.tsx.openRouterImageApiKeyas a string field;isConfiguredrenders correctly for both configured and unconfigured states.