refactor: remove remaining dead code

This commit is contained in:
chengyongru authored and chengyongru committed 2026-08-23 19:08:00 +08:00
1 parent 3852956a71
commit 961b1fdd7d
46 files changed
+85 -250

No files matched your search

@@ -174,7 +174,7 @@ export function ChannelLogo({
);
}
export function channelDisplayName(feature: NanobotFeatureInfo): string {
function channelDisplayName(feature: NanobotFeatureInfo): string {
return channelUiPresentation(feature.name, feature.webui)?.displayName ?? feature.display_name;
}
@@ -112,7 +112,7 @@ export function ChannelSetupLinks({
);
}
export function ChannelOfficialLink({
function ChannelOfficialLink({
feature,
setup,
}: {
@@ -6,7 +6,7 @@ import { Input } from "@/components/ui/input";
import type { ChannelConfigField } from "@/components/settings/channels/catalog";
import { cn } from "@/lib/utils";
export function channelFieldValue(field: ChannelConfigField, values: Record<string, string>): string {
function channelFieldValue(field: ChannelConfigField, values: Record<string, string>): string {
return values[field.key] ?? field.defaultValue ?? field.options?.[0]?.value ?? "";
}
@@ -27,7 +27,7 @@ export type ChannelSetupPresentation = {
presets?: ChannelProviderPreset[];
};
export type ChannelCatalogSetupPresentation = {
type ChannelCatalogSetupPresentation = {
mode?: "webui" | "credentials" | "connect";
command?: string;
docsUrl?: string;
@@ -38,15 +38,15 @@ export type ChannelCatalogSetupPresentation = {
presets?: ChannelProviderPresetDefinition[];
};
export type ChannelFieldPresentation = {
type ChannelFieldPresentation = {
key: string;
};
export type ChannelSetupActionDefinition = Omit<ChannelSetupAction, "label">;
type ChannelSetupActionDefinition = Omit<ChannelSetupAction, "label">;
export type ChannelProviderPresetDefinition = Omit<ChannelProviderPreset, "label">;
export type ChannelSetupAction = {
type ChannelSetupAction = {
id: string;
label: string;
url?: string;
@@ -72,7 +72,7 @@ export type ChannelConfigField = {
options?: ChannelConfigOption[];
};
export type ChannelConfigOption = {
type ChannelConfigOption = {
value: string;
label: string;
};
+1 -1
View File
@@ -14,7 +14,7 @@ export type SettingsSectionKey =
| "runtime"
| "advanced";
export type PendingRestartSection = "runtime" | "browser" | "image";
type PendingRestartSection = "runtime" | "browser" | "image";
export type PendingRestartSections = Record<PendingRestartSection, boolean>;
export type RestartAwarePayload = {