refactor(opencode): simplify API format selector

- Reduce npm package options from 10 to 4 core API formats (OpenAI, OpenAI Compatible, Anthropic, Google)
- Rename "AI SDK Package" to "API Format" in i18n (zh/en/ja)
- Remove check icon from Select dropdown items for cleaner UI
This commit is contained in:
Jason
2026-01-16 20:29:12 +08:00
parent f349d85e85
commit 9b4485e111
6 changed files with 12 additions and 24 deletions
@@ -94,7 +94,7 @@ export function OpenCodeFormFields({
<div className="space-y-2">
<FormLabel htmlFor="opencode-npm">
{t("opencode.npmPackage", {
defaultValue: "AI SDK Package",
defaultValue: "接口格式",
})}
</FormLabel>
<Select value={npm} onValueChange={onNpmChange}>
+1 -7
View File
@@ -1,6 +1,6 @@
import * as React from "react";
import * as SelectPrimitive from "@radix-ui/react-select";
import { Check, ChevronDown, ChevronUp } from "lucide-react";
import { ChevronDown, ChevronUp } from "lucide-react";
import { cn } from "@/lib/utils";
const Select = SelectPrimitive.Root;
@@ -87,12 +87,6 @@ const SelectItem = React.forwardRef<
)}
{...props}
>
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
<SelectPrimitive.ItemIndicator>
<Check className="h-4 w-4" />
</SelectPrimitive.ItemIndicator>
</span>
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
</SelectPrimitive.Item>
));