fix: creating new profile when rotating keys

This commit is contained in:
John Costa 2025-10-25 13:52:28 +01:00
parent 30f7c00983
commit f7d787c3f2
No known key found for this signature in database
3 changed files with 16 additions and 17 deletions

View file

@ -1475,7 +1475,8 @@ export class ClineProvider
newConfiguration.requestyBaseUrl = baseUrl
}
await this.upsertProviderProfile("Requesty", newConfiguration)
const profileName = `Requesty (${new Date().toLocaleString()})`
await this.upsertProviderProfile(profileName, newConfiguration)
}
// Task history

View file

@ -84,21 +84,19 @@ export const Requesty = ({
<div className="text-sm text-vscode-descriptionForeground -mt-2">
{t("settings:providers.apiKeyStorageNotice")}
</div>
{!apiConfiguration?.requestyApiKey && (
<a
href={getApiKeyUrl()}
target="_blank"
rel="noopener noreferrer"
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"
style={{
width: "100%",
textDecoration: "none",
color: "var(--vscode-button-foreground)",
backgroundColor: "var(--vscode-button-background)",
}}>
{t("settings:providers.getRequestyApiKey")}
</a>
)}
<a
href={getApiKeyUrl()}
target="_blank"
rel="noopener noreferrer"
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"
style={{
width: "100%",
textDecoration: "none",
color: "var(--vscode-button-foreground)",
backgroundColor: "var(--vscode-button-background)",
}}>
{t("settings:providers.getRequestyApiKey")}
</a>
<VSCodeCheckbox
checked={requestyEndpointSelected}

View file

@ -269,7 +269,7 @@
"success": "Models list refreshed successfully!",
"error": "Failed to refresh models list. Please try again."
},
"getRequestyApiKey": "Get Requesty API Key",
"getRequestyApiKey": "Create new Requesty API Key",
"getRequestyBaseUrl": "Base URL",
"requestyUseCustomBaseUrl": "Use custom base URL",
"openRouterTransformsText": "Compress prompts and message chains to the context size (<a>OpenRouter Transforms</a>)",