Fix type errors

This commit is contained in:
Alex Gleason committed 2025-12-30 20:32:50 -06:00
1 parent 5a43a1ea61
commit 2acc0191ad
7 files changed
+121 -100

No files matched your search

-16
View File
@@ -2,7 +2,6 @@ import { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { Rocket, ChevronDown } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { ExternalInput } from '@/components/ui/external-input';
import {
Dialog,
@@ -54,21 +53,6 @@ interface AddProviderDialogProps {
onAdd: (apiKey: string, accountId?: string, organizationId?: string) => void;
}
/**
* Normalize a URL string to ensure it has a protocol
* @param url - The URL string to normalize
* @returns A fully-qualified URL string
*/
function normalizeUrl(url: string): string {
// If it already has a protocol, return as-is
if (/^https?:\/\//i.test(url)) {
return url;
}
// Add https:// prefix
return `https://${url}`;
}
function getProviderUrl(preset: PresetProvider): string | null {
switch (preset.type) {
case 'shakespeare':