Skip to content

Commit f7d787c

Browse files
fix: creating new profile when rotating keys
1 parent 30f7c00 commit f7d787c

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

src/core/webview/ClineProvider.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1475,7 +1475,8 @@ export class ClineProvider
14751475
newConfiguration.requestyBaseUrl = baseUrl
14761476
}
14771477

1478-
await this.upsertProviderProfile("Requesty", newConfiguration)
1478+
const profileName = `Requesty (${new Date().toLocaleString()})`
1479+
await this.upsertProviderProfile(profileName, newConfiguration)
14791480
}
14801481

14811482
// Task history

webview-ui/src/components/settings/providers/Requesty.tsx

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,19 @@ export const Requesty = ({
8484
<div className="text-sm text-vscode-descriptionForeground -mt-2">
8585
{t("settings:providers.apiKeyStorageNotice")}
8686
</div>
87-
{!apiConfiguration?.requestyApiKey && (
88-
<a
89-
href={getApiKeyUrl()}
90-
target="_blank"
91-
rel="noopener noreferrer"
92-
className="inline-flex items-center justify-center whitespace-nowrap text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-9 rounded-md px-3 w-full"
93-
style={{
94-
width: "100%",
95-
textDecoration: "none",
96-
color: "var(--vscode-button-foreground)",
97-
backgroundColor: "var(--vscode-button-background)",
98-
}}>
99-
{t("settings:providers.getRequestyApiKey")}
100-
</a>
101-
)}
87+
<a
88+
href={getApiKeyUrl()}
89+
target="_blank"
90+
rel="noopener noreferrer"
91+
className="inline-flex items-center justify-center whitespace-nowrap text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-9 rounded-md px-3 w-full"
92+
style={{
93+
width: "100%",
94+
textDecoration: "none",
95+
color: "var(--vscode-button-foreground)",
96+
backgroundColor: "var(--vscode-button-background)",
97+
}}>
98+
{t("settings:providers.getRequestyApiKey")}
99+
</a>
102100

103101
<VSCodeCheckbox
104102
checked={requestyEndpointSelected}

webview-ui/src/i18n/locales/en/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@
269269
"success": "Models list refreshed successfully!",
270270
"error": "Failed to refresh models list. Please try again."
271271
},
272-
"getRequestyApiKey": "Get Requesty API Key",
272+
"getRequestyApiKey": "Create new Requesty API Key",
273273
"getRequestyBaseUrl": "Base URL",
274274
"requestyUseCustomBaseUrl": "Use custom base URL",
275275
"openRouterTransformsText": "Compress prompts and message chains to the context size (<a>OpenRouter Transforms</a>)",

0 commit comments

Comments
 (0)