Skip to content
Closed
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export function FormTabNav({ activeTab, onTabChange, disabled, tabStatus = {} }:
{/* Mobile: Bottom Navigation */}
<nav className="flex md:hidden fixed bottom-0 left-0 right-0 z-50 border-t border-border/50 bg-card/95 backdrop-blur-md safe-area-bottom">
<div className="flex items-center justify-around w-full px-2 py-1">
{TAB_CONFIG.map((tab, index) => {
{TAB_CONFIG.map((tab, _index) => {
const Icon = tab.icon;
const isActive = activeTab === tab.id;
const status = tabStatus[tab.id];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ import {
AlertDialogTitle as AlertTitle,
} from "@/components/ui/alert-dialog";
import { Button } from "@/components/ui/button";
import { PROVIDER_DEFAULTS } from "@/lib/constants/provider.constants";
import { isValidUrl } from "@/lib/utils/validation";
import type { ProviderDisplay, ProviderType } from "@/types/provider";
import { FormTabNav, TAB_CONFIG } from "./components/form-tab-nav";
import { createInitialState, ProviderFormProvider, useProviderForm } from "./provider-form-context";
import { FormTabNav } from "./components/form-tab-nav";
import { ProviderFormProvider, useProviderForm } from "./provider-form-context";
import type { TabId } from "./provider-form-types";
import { BasicInfoSection } from "./sections/basic-info-section";
import { LimitsSection } from "./sections/limits-section";
Expand Down Expand Up @@ -97,7 +96,7 @@ function ProviderFormContent({

const container = contentRef.current;
const containerRect = container.getBoundingClientRect();
const scrollTop = container.scrollTop;
const _scrollTop = container.scrollTop;

// Find which section is at the top of the viewport
let activeSection: TabId = "basic";
Expand All @@ -119,7 +118,7 @@ function ProviderFormContent({
if (state.ui.activeTab !== activeSection) {
dispatch({ type: "SET_ACTIVE_TAB", payload: activeSection });
}
}, [dispatch, state.ui.activeTab, tabOrder]);
}, [dispatch, state.ui.activeTab]);

const handleTabChange = (tab: TabId) => {
dispatch({ type: "SET_ACTIVE_TAB", payload: tab });
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"use client";

import { createContext, useContext, useReducer, type ReactNode } from "react";
import { PROVIDER_TIMEOUT_DEFAULTS } from "@/lib/constants/provider.constants";
import { createContext, type ReactNode, useContext, useReducer } from "react";
import type { ProviderDisplay } from "@/types/provider";
import type {
FormMode,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { Context1mPreference } from "@/lib/special-attributes";
import type {
CodexInstructionsStrategy,
CodexParallelToolCallsPreference,
CodexReasoningEffortPreference,
CodexReasoningSummaryPreference,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { useTranslations } from "next-intl";
import { useEffect, useRef, useState } from "react";
import { Input } from "@/components/ui/input";
import { UrlPreview } from "../../url-preview";
import { useProviderForm } from "../provider-form-context";
import { SectionCard, SmartInputWrapper } from "../components/section-card";
import { useProviderForm } from "../provider-form-context";

interface BasicInfoSectionProps {
autoUrlPending?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import {
} from "@/components/ui/select";
import { PROVIDER_DEFAULTS } from "@/lib/constants/provider.constants";
import { cn } from "@/lib/utils";
import { useProviderForm } from "../provider-form-context";
import { FieldGroup, SectionCard, SmartInputWrapper } from "../components/section-card";
import { useProviderForm } from "../provider-form-context";

// Validation helpers
function validatePositiveDecimalField(value: string): number | null {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { Switch } from "@/components/ui/switch";
import { PROVIDER_TIMEOUT_DEFAULTS } from "@/lib/constants/provider.constants";
import { cn } from "@/lib/utils";
import { ProxyTestButton } from "../../proxy-test-button";
import { useProviderForm } from "../provider-form-context";
import { FieldGroup, SectionCard, SmartInputWrapper, ToggleRow } from "../components/section-card";
import { useProviderForm } from "../provider-form-context";

// Timeout input component with visual indicator
interface TimeoutInputProps {
Expand Down Expand Up @@ -42,7 +42,7 @@ function TimeoutInput({
isCore,
}: TimeoutInputProps) {
const t = useTranslations("settings.providers.form");
const displayValue = value ?? defaultValue;
const _displayValue = value ?? defaultValue;
const isCustom = value !== undefined;

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { useTranslations } from "next-intl";
import { toast } from "sonner";
import { Badge } from "@/components/ui/badge";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import {
Select,
SelectContent,
Expand All @@ -27,8 +26,8 @@ import type {
} from "@/types/provider";
import { ModelMultiSelect } from "../../../model-multi-select";
import { ModelRedirectEditor } from "../../../model-redirect-editor";
import { useProviderForm } from "../provider-form-context";
import { FieldGroup, SectionCard, SmartInputWrapper, ToggleRow } from "../components/section-card";
import { useProviderForm } from "../provider-form-context";

const GROUP_TAG_MAX_TOTAL_LENGTH = 50;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import {
import { extractBaseUrl } from "@/lib/utils/validation";
import type { McpPassthroughType } from "@/types/provider";
import { ApiTestButton } from "../../api-test-button";
import { useProviderForm } from "../provider-form-context";
import { SectionCard, SmartInputWrapper } from "../components/section-card";
import { useProviderForm } from "../provider-form-context";

export function TestingSection() {
const t = useTranslations("settings.providers.form");
Expand Down