mirror of
https://github.com/langgenius/dify.git
synced 2026-10-28 03:35:04 +08:00
chore: knip fix (#34481)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
autofix-ci[bot]
parent
985b41c40b
commit
36e840cd87
@@ -22,7 +22,7 @@ import OrgInfo from './base/org-info'
|
||||
import Placeholder from './base/placeholder'
|
||||
import Title from './base/title'
|
||||
|
||||
export type Props = {
|
||||
type Props = {
|
||||
className?: string
|
||||
payload: Plugin
|
||||
titleLeft?: React.ReactNode
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import type { Plugin } from '../types'
|
||||
|
||||
export type SearchParamsFromCollection = {
|
||||
query?: string
|
||||
sort_by?: string
|
||||
@@ -17,16 +15,6 @@ export type MarketplaceCollection = {
|
||||
search_params?: SearchParamsFromCollection
|
||||
}
|
||||
|
||||
export type MarketplaceCollectionsResponse = {
|
||||
collections: MarketplaceCollection[]
|
||||
total: number
|
||||
}
|
||||
|
||||
export type MarketplaceCollectionPluginsResponse = {
|
||||
plugins: Plugin[]
|
||||
total: number
|
||||
}
|
||||
|
||||
export type PluginsSearchParams = {
|
||||
query: string
|
||||
page?: number
|
||||
@@ -50,10 +38,3 @@ export type CollectionsAndPluginsSearchParams = {
|
||||
exclude?: string[]
|
||||
type?: 'plugin' | 'bundle'
|
||||
}
|
||||
|
||||
export type SearchParams = {
|
||||
language?: string
|
||||
q?: string
|
||||
tags?: string
|
||||
category?: string
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export { useDetailHeaderState } from './use-detail-header-state'
|
||||
export type { ModalStates, UseDetailHeaderStateReturn, VersionPickerState, VersionTarget } from './use-detail-header-state'
|
||||
export type { ModalStates, VersionTarget } from './use-detail-header-state'
|
||||
export { usePluginOperations } from './use-plugin-operations'
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@ export type ModalStates = {
|
||||
hideDeleting: () => void
|
||||
}
|
||||
|
||||
export type VersionPickerState = {
|
||||
type VersionPickerState = {
|
||||
isShow: boolean
|
||||
setIsShow: (show: boolean) => void
|
||||
targetVersion: VersionTarget
|
||||
@@ -38,7 +38,7 @@ export type VersionPickerState = {
|
||||
setIsDowngrade: (downgrade: boolean) => void
|
||||
}
|
||||
|
||||
export type UseDetailHeaderStateReturn = {
|
||||
type UseDetailHeaderStateReturn = {
|
||||
modalStates: ModalStates
|
||||
versionPicker: VersionPickerState
|
||||
hasNewVersion: boolean
|
||||
|
||||
@@ -29,7 +29,7 @@ import { fetchAndMergeValidCompletionParams } from '@/utils/completion-params'
|
||||
import LLMParamsPanel from './llm-params-panel'
|
||||
import TTSParamsPanel from './tts-params-panel'
|
||||
|
||||
export type ModelParameterModalProps = {
|
||||
type ModelParameterModalProps = {
|
||||
popupClassName?: string
|
||||
isAdvancedMode: boolean
|
||||
value: any
|
||||
|
||||
+4
-4
@@ -19,7 +19,7 @@ type StatusStepProps = {
|
||||
text: string
|
||||
}
|
||||
|
||||
export const StatusStep = ({ isActive, text }: StatusStepProps) => {
|
||||
const StatusStep = ({ isActive, text }: StatusStepProps) => {
|
||||
return (
|
||||
<div className={`system-2xs-semibold-uppercase flex items-center gap-1 ${isActive
|
||||
? 'text-state-accent-solid'
|
||||
@@ -81,7 +81,7 @@ type SubscriptionFormProps = {
|
||||
endpoint?: string
|
||||
}
|
||||
|
||||
export const SubscriptionForm = ({
|
||||
const SubscriptionForm = ({
|
||||
subscriptionFormRef,
|
||||
endpoint,
|
||||
}: SubscriptionFormProps) => {
|
||||
@@ -143,7 +143,7 @@ type AutoParametersFormProps = {
|
||||
credentialId: string
|
||||
}
|
||||
|
||||
export const AutoParametersForm = ({
|
||||
const AutoParametersForm = ({
|
||||
schemas,
|
||||
formRef,
|
||||
pluginId,
|
||||
@@ -192,7 +192,7 @@ type ManualPropertiesSectionProps = {
|
||||
pluginName: string
|
||||
}
|
||||
|
||||
export const ManualPropertiesSection = ({
|
||||
const ManualPropertiesSection = ({
|
||||
schemas,
|
||||
formRef,
|
||||
onChange,
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ export enum ApiKeyStep {
|
||||
Configuration = 'configuration',
|
||||
}
|
||||
|
||||
export const CREDENTIAL_TYPE_MAP: Record<SupportedCreationMethods, TriggerCredentialTypeEnum> = {
|
||||
const CREDENTIAL_TYPE_MAP: Record<SupportedCreationMethods, TriggerCredentialTypeEnum> = {
|
||||
[SupportedCreationMethods.APIKEY]: TriggerCredentialTypeEnum.ApiKey,
|
||||
[SupportedCreationMethods.OAUTH]: TriggerCredentialTypeEnum.Oauth2,
|
||||
[SupportedCreationMethods.MANUAL]: TriggerCredentialTypeEnum.Unauthorized,
|
||||
|
||||
@@ -14,7 +14,6 @@ type SubscriptionListProps = {
|
||||
pluginDetail?: PluginDetail
|
||||
}
|
||||
|
||||
export { SubscriptionSelectorEntry } from './selector-entry'
|
||||
export type { SimpleSubscription } from './types'
|
||||
|
||||
export const SubscriptionList = withErrorBoundary(({
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
export { default as ReasoningConfigForm } from './reasoning-config-form'
|
||||
export { default as SchemaModal } from './schema-modal'
|
||||
export { default as ToolAuthorizationSection } from './tool-authorization-section'
|
||||
export { default as ToolBaseForm } from './tool-base-form'
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
export { usePluginInstalledCheck } from './use-plugin-installed-check'
|
||||
export { useToolSelectorState } from './use-tool-selector-state'
|
||||
export type { TabType, ToolSelectorState, UseToolSelectorStateProps } from './use-tool-selector-state'
|
||||
|
||||
+1
-3
@@ -18,7 +18,7 @@ import { usePluginInstalledCheck } from './use-plugin-installed-check'
|
||||
|
||||
export type TabType = 'settings' | 'params'
|
||||
|
||||
export type UseToolSelectorStateProps = {
|
||||
type UseToolSelectorStateProps = {
|
||||
value?: ToolValue
|
||||
onSelect: (tool: ToolValue) => void
|
||||
onSelectMultiple?: (tool: ToolValue[]) => void
|
||||
@@ -247,5 +247,3 @@ export const useToolSelectorState = ({
|
||||
getSettingsValue,
|
||||
}
|
||||
}
|
||||
|
||||
export type ToolSelectorState = ReturnType<typeof useToolSelectorState>
|
||||
|
||||
@@ -13,7 +13,7 @@ import { PLUGIN_PAGE_TABS_MAP } from '../hooks'
|
||||
export type PluginPageTab = typeof PLUGIN_PAGE_TABS_MAP[keyof typeof PLUGIN_PAGE_TABS_MAP]
|
||||
| (typeof PLUGIN_TYPE_SEARCH_MAP)[keyof typeof PLUGIN_TYPE_SEARCH_MAP]
|
||||
|
||||
export type PluginPageContextValue = {
|
||||
type PluginPageContextValue = {
|
||||
containerRef: RefObject<HTMLDivElement | null>
|
||||
currentPluginID: string | undefined
|
||||
setCurrentPluginID: (pluginID?: string) => void
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { PluginStatus } from '@/app/components/plugins/types'
|
||||
import type { Locale } from '@/i18n-config'
|
||||
import CardIcon from '@/app/components/plugins/card/base/card-icon'
|
||||
|
||||
export type PluginItemProps = {
|
||||
type PluginItemProps = {
|
||||
plugin: PluginStatus
|
||||
getIconUrl: (icon: string) => string
|
||||
language: Locale
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { PluginStatus } from '@/app/components/plugins/types'
|
||||
import type { Locale } from '@/i18n-config'
|
||||
import PluginItem from './plugin-item'
|
||||
|
||||
export type PluginSectionProps = {
|
||||
type PluginSectionProps = {
|
||||
title: string
|
||||
count: number
|
||||
plugins: PluginStatus[]
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import Tooltip from '@/app/components/base/tooltip'
|
||||
import DownloadingIcon from '@/app/components/header/plugins-nav/downloading-icon'
|
||||
import { cn } from '@/utils/classnames'
|
||||
|
||||
export type TaskStatusIndicatorProps = {
|
||||
type TaskStatusIndicatorProps = {
|
||||
tip: string
|
||||
isInstalling: boolean
|
||||
isInstallingWithSuccess: boolean
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
.textGradient {
|
||||
background: linear-gradient(92deg, #2250F2 -29.55%, #0EBCF3 75.22%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
text-fill-color: transparent;
|
||||
}
|
||||
@@ -143,23 +143,6 @@ export type ParametersSchema = {
|
||||
description: Record<Locale, string>
|
||||
}
|
||||
|
||||
export type PropertiesSchema = {
|
||||
type: FormTypeEnum
|
||||
name: string
|
||||
scope: any
|
||||
required: boolean
|
||||
default: any
|
||||
options: Array<{
|
||||
value: string
|
||||
label: Record<Locale, string>
|
||||
icon?: string
|
||||
}>
|
||||
label: Record<Locale, string>
|
||||
help: Record<Locale, string>
|
||||
url: any
|
||||
placeholder: any
|
||||
}
|
||||
|
||||
export type TriggerEventParameter = {
|
||||
name: string
|
||||
label: TypeWithI18N
|
||||
@@ -353,10 +336,6 @@ export type GitHubUrlInfo = {
|
||||
}
|
||||
|
||||
// endpoint
|
||||
export type EndpointOperationResponse = {
|
||||
result: 'success' | 'error'
|
||||
}
|
||||
|
||||
export type EndpointsResponse = {
|
||||
endpoints: EndpointListItem[]
|
||||
has_more: boolean
|
||||
@@ -364,12 +343,6 @@ export type EndpointsResponse = {
|
||||
total: number
|
||||
page: number
|
||||
}
|
||||
export type UpdateEndpointRequest = {
|
||||
endpoint_id: string
|
||||
settings: Record<string, any>
|
||||
name: string
|
||||
}
|
||||
|
||||
export enum InstallStep {
|
||||
uploading = 'uploading',
|
||||
uploadFailed = 'uploadFailed',
|
||||
@@ -454,20 +427,12 @@ export type TaskStatusResponse = {
|
||||
task: PluginTask
|
||||
}
|
||||
|
||||
export type PluginTasksResponse = {
|
||||
tasks: PluginTask[]
|
||||
}
|
||||
|
||||
export type MetaData = {
|
||||
repo: string
|
||||
version: string
|
||||
package: string
|
||||
}
|
||||
|
||||
export type InstalledPluginListResponse = {
|
||||
plugins: PluginDetail[]
|
||||
}
|
||||
|
||||
export type InstalledPluginListWithTotalResponse = {
|
||||
plugins: PluginDetail[]
|
||||
total: number
|
||||
|
||||
Reference in New Issue
Block a user