mirror of
https://github.com/langgenius/dify.git
synced 2026-04-05 10:12:43 +08:00
chore(web): new lint setup (#30020)
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
This commit is contained in:
@@ -24,7 +24,7 @@ export type AccessControlAccount = {
|
||||
avatarUrl: 'string'
|
||||
}
|
||||
|
||||
export type SubjectGroup = { subjectId: string; subjectType: SubjectType; groupData: AccessControlGroup }
|
||||
export type SubjectAccount = { subjectId: string; subjectType: SubjectType; accountData: AccessControlAccount }
|
||||
export type SubjectGroup = { subjectId: string, subjectType: SubjectType, groupData: AccessControlGroup }
|
||||
export type SubjectAccount = { subjectId: string, subjectType: SubjectType, accountData: AccessControlAccount }
|
||||
|
||||
export type Subject = SubjectGroup | SubjectAccount
|
||||
|
||||
@@ -11,8 +11,8 @@ import type {
|
||||
TracingProvider,
|
||||
WeaveConfig,
|
||||
} from '@/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/type'
|
||||
import type { App, AppModeEnum, AppTemplate, SiteConfig } from '@/types/app'
|
||||
import type { Dependency } from '@/app/components/plugins/types'
|
||||
import type { App, AppModeEnum, AppTemplate, SiteConfig } from '@/types/app'
|
||||
|
||||
export enum DSLImportMode {
|
||||
YAML_CONTENT = 'yaml-content',
|
||||
@@ -56,15 +56,15 @@ export type CreateAppResponse = App
|
||||
export type UpdateAppSiteCodeResponse = { app_id: string } & SiteConfig
|
||||
|
||||
export type AppDailyMessagesResponse = {
|
||||
data: Array<{ date: string; message_count: number }>
|
||||
data: Array<{ date: string, message_count: number }>
|
||||
}
|
||||
|
||||
export type AppDailyConversationsResponse = {
|
||||
data: Array<{ date: string; conversation_count: number }>
|
||||
data: Array<{ date: string, conversation_count: number }>
|
||||
}
|
||||
|
||||
export type WorkflowDailyConversationsResponse = {
|
||||
data: Array<{ date: string; runs: number }>
|
||||
data: Array<{ date: string, runs: number }>
|
||||
}
|
||||
|
||||
export type AppStatisticsResponse = {
|
||||
@@ -72,11 +72,11 @@ export type AppStatisticsResponse = {
|
||||
}
|
||||
|
||||
export type AppDailyEndUsersResponse = {
|
||||
data: Array<{ date: string; terminal_count: number }>
|
||||
data: Array<{ date: string, terminal_count: number }>
|
||||
}
|
||||
|
||||
export type AppTokenCostsResponse = {
|
||||
data: Array<{ date: string; token_count: number; total_price: number; currency: number }>
|
||||
data: Array<{ date: string, token_count: number, total_price: number, currency: number }>
|
||||
}
|
||||
|
||||
export type UpdateAppModelConfigResponse = { result: string }
|
||||
|
||||
@@ -268,7 +268,7 @@ export type CodeBasedExtensionForm = {
|
||||
label: I18nText
|
||||
variable: string
|
||||
required: boolean
|
||||
options: { label: I18nText; value: string }[]
|
||||
options: { label: I18nText, value: string }[]
|
||||
default: string
|
||||
placeholder: string
|
||||
max_length?: number
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import type { DataSourceNotionPage, DataSourceProvider } from './common'
|
||||
import type { AppIconType, AppModeEnum, RetrievalConfig, TransferMethod } from '@/types/app'
|
||||
import type { DatasourceType } from './pipeline'
|
||||
import type { Tag } from '@/app/components/base/tag-management/constant'
|
||||
import type { IndexingType } from '@/app/components/datasets/create/step-two'
|
||||
import type { MetadataFilteringVariableType } from '@/app/components/workflow/nodes/knowledge-retrieval/types'
|
||||
import type { MetadataItemWithValue } from '@/app/components/datasets/metadata/types'
|
||||
import type { MetadataFilteringVariableType } from '@/app/components/workflow/nodes/knowledge-retrieval/types'
|
||||
import type { AppIconType, AppModeEnum, RetrievalConfig, TransferMethod } from '@/types/app'
|
||||
import { ExternalKnowledgeBase, General, ParentChild, Qa } from '@/app/components/base/icons/src/public/knowledge/dataset-card'
|
||||
import { GeneralChunk, ParentChildChunk, QuestionAndAnswer } from '@/app/components/base/icons/src/vender/knowledge'
|
||||
import type { DatasourceType } from './pipeline'
|
||||
|
||||
export enum DataSourceType {
|
||||
FILE = 'upload_file',
|
||||
@@ -98,7 +98,7 @@ export type ExternalAPIItem = {
|
||||
endpoint: string
|
||||
api_key: string
|
||||
}
|
||||
dataset_bindings: { id: string; name: string }[]
|
||||
dataset_bindings: { id: string, name: string }[]
|
||||
created_by: string
|
||||
created_at: string
|
||||
}
|
||||
@@ -224,7 +224,7 @@ export type IndexingEstimateResponse = {
|
||||
total_price: number
|
||||
currency: string
|
||||
total_segments: number
|
||||
preview: Array<{ content: string; child_chunks: string[] }>
|
||||
preview: Array<{ content: string, child_chunks: string[] }>
|
||||
qa_preview?: QA[]
|
||||
}
|
||||
|
||||
@@ -360,7 +360,7 @@ export type OnlineDocumentInfo = {
|
||||
page_name: string
|
||||
parent_id: string
|
||||
type: string
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
export type OnlineDriveInfo = {
|
||||
@@ -590,7 +590,7 @@ export type SegmentsResponse = {
|
||||
|
||||
export type Query = {
|
||||
content: string
|
||||
content_type: 'text_query' | 'image_query',
|
||||
content_type: 'text_query' | 'image_query'
|
||||
file_info: Attachment | null
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
import type { AgentStrategy, ModelModeType, RETRIEVE_TYPE, ToolItem, TtsAutoPlay } from '@/types/app'
|
||||
import type {
|
||||
RerankingModeEnum,
|
||||
WeightedScoreEnum,
|
||||
} from '@/models/datasets'
|
||||
import type { FileUpload } from '@/app/components/base/features/types'
|
||||
import type {
|
||||
MetadataFilteringConditions,
|
||||
@@ -10,6 +5,12 @@ import type {
|
||||
} from '@/app/components/workflow/nodes/knowledge-retrieval/types'
|
||||
import type { ModelConfig as NodeModelConfig } from '@/app/components/workflow/types'
|
||||
import type { ExternalDataTool } from '@/models/common'
|
||||
import type {
|
||||
RerankingModeEnum,
|
||||
WeightedScoreEnum,
|
||||
} from '@/models/datasets'
|
||||
import type { AgentStrategy, ModelModeType, RETRIEVE_TYPE, ToolItem, TtsAutoPlay } from '@/types/app'
|
||||
|
||||
export type Inputs = Record<string, string | number | object | boolean>
|
||||
|
||||
export enum PromptMode {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { AppIconType, AppModeEnum } from '@/types/app'
|
||||
|
||||
export type AppBasicInfo = {
|
||||
id: string
|
||||
mode: AppModeEnum
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { Viewport } from 'reactflow'
|
||||
import type { VisionFile } from '@/types/app'
|
||||
import type { Metadata } from '@/app/components/base/chat/chat/type'
|
||||
import type {
|
||||
Edge,
|
||||
Node,
|
||||
} from '@/app/components/workflow/types'
|
||||
import type { Metadata } from '@/app/components/base/chat/chat/type'
|
||||
import type { VisionFile } from '@/types/app'
|
||||
|
||||
// Log type contains key:string conversation_id:string created_at:string question:string answer:string
|
||||
export type Conversation = {
|
||||
@@ -77,7 +77,7 @@ export type MessageContent = {
|
||||
conversation_id: string
|
||||
query: string
|
||||
inputs: Record<string, any>
|
||||
message: { role: string; text: string; files?: VisionFile[] }[]
|
||||
message: { role: string, text: string, files?: VisionFile[] }[]
|
||||
message_tokens: number
|
||||
answer_tokens: number
|
||||
answer: string
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import type { Edge, EnvironmentVariable, Node, SupportUploadFileTypes } from '@/app/components/workflow/types'
|
||||
import type { Viewport } from 'reactflow'
|
||||
import type { DSLImportMode, DSLImportStatus } from './app'
|
||||
import type { ChunkingMode, DatasetPermission, DocumentIndexingStatus, FileIndexingEstimateResponse, IconInfo } from './datasets'
|
||||
import type { Dependency } from '@/app/components/plugins/types'
|
||||
import type { AppIconSelection } from '@/app/components/base/app-icon-picker'
|
||||
import type { Viewport } from 'reactflow'
|
||||
import type { Dependency } from '@/app/components/plugins/types'
|
||||
import type { Edge, EnvironmentVariable, Node, SupportUploadFileTypes } from '@/app/components/workflow/types'
|
||||
import type { TransferMethod } from '@/types/app'
|
||||
import { BaseFieldType } from '@/app/components/base/form/form-scenarios/base/types'
|
||||
import type { NodeRunResult } from '@/types/workflow'
|
||||
import { BaseFieldType } from '@/app/components/base/form/form-scenarios/base/types'
|
||||
|
||||
export enum DatasourceType {
|
||||
localFile = 'local_file',
|
||||
@@ -190,7 +190,7 @@ export type PublishedPipelineInfoResponse = {
|
||||
id: string
|
||||
name: string
|
||||
email: string
|
||||
},
|
||||
}
|
||||
environment_variables?: EnvironmentVariable[]
|
||||
rag_pipeline_variables?: RAGPipelineVariables
|
||||
version: string
|
||||
|
||||
Reference in New Issue
Block a user