Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions webview-ui/src/components/settings/providers/Requesty.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ export const Requesty = ({
}: RequestyProps) => {
const { t } = useAppTranslation()

const [didRefetch, setDidRefetch] = useState<boolean>()

const [requestyEndpointSelected, setRequestyEndpointSelected] = useState(!!apiConfiguration.requestyBaseUrl)

// This ensures that the "Use custom URL" checkbox is hidden when the user deletes the URL.
Expand Down Expand Up @@ -131,18 +129,12 @@ export const Requesty = ({
onClick={() => {
vscode.postMessage({ type: "flushRouterModels", text: "requesty" })
refetchRouterModels()
setDidRefetch(true)
}}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup! Removing this state variable simplifies the component.

One minor suggestion for completeness: The translation key is now unused across the codebase. While not critical, it would be good housekeeping to remove this unused translation from all locale files (en, fr, de, etc.) to keep them clean. You could do this in a follow-up PR if you prefer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove it?

<div className="flex items-center gap-2">
<span className="codicon codicon-refresh" />
{t("settings:providers.refreshModels.label")}
</div>
</Button>
{didRefetch && (
<div className="flex items-center text-vscode-errorForeground">
{t("settings:providers.refreshModels.hint")}
</div>
)}
<ModelPicker
apiConfiguration={apiConfiguration}
setApiConfigurationField={setApiConfigurationField}
Expand Down
Loading