mirror of https://github.com/langgenius/dify.git
Merge 97a6f34ab3 into 8b634a9bee
This commit is contained in:
commit
198a73e532
|
|
@ -26,7 +26,8 @@ export type QAChunks = {
|
|||
|
||||
export type ChunkInfo = GeneralChunks | ParentChildChunks | QAChunks
|
||||
|
||||
export enum QAItemType {
|
||||
Question = 'question',
|
||||
Answer = 'answer',
|
||||
}
|
||||
export const QAItemType = {
|
||||
Question: 'question',
|
||||
Answer: 'answer',
|
||||
} as const
|
||||
export type QAItemType = typeof QAItemType[keyof typeof QAItemType]
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
import type { DataSourceNodeType } from '@/app/components/workflow/nodes/data-source/types'
|
||||
|
||||
export enum TestRunStep {
|
||||
dataSource = 'dataSource',
|
||||
documentProcessing = 'documentProcessing',
|
||||
}
|
||||
export const TestRunStep = {
|
||||
dataSource: 'dataSource',
|
||||
documentProcessing: 'documentProcessing',
|
||||
} as const
|
||||
export type TestRunStep = typeof TestRunStep[keyof typeof TestRunStep]
|
||||
|
||||
export type DataSourceOption = {
|
||||
label: string
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
import type { CommonNodeType } from '../types'
|
||||
|
||||
export enum NoteTheme {
|
||||
blue = 'blue',
|
||||
cyan = 'cyan',
|
||||
green = 'green',
|
||||
yellow = 'yellow',
|
||||
pink = 'pink',
|
||||
violet = 'violet',
|
||||
}
|
||||
export const NoteTheme = {
|
||||
blue: 'blue',
|
||||
cyan: 'cyan',
|
||||
green: 'green',
|
||||
yellow: 'yellow',
|
||||
pink: 'pink',
|
||||
violet: 'violet',
|
||||
} as const
|
||||
export type NoteTheme = typeof NoteTheme[keyof typeof NoteTheme]
|
||||
|
||||
export type NoteNodeType = CommonNodeType & {
|
||||
text: string
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ const Right = ({
|
|||
{currentNodeVar?.var && (
|
||||
<>
|
||||
{
|
||||
[VarInInspectType.environment, VarInInspectType.conversation, VarInInspectType.system].includes(currentNodeVar.nodeType as VarInInspectType) && (
|
||||
([VarInInspectType.environment, VarInInspectType.conversation, VarInInspectType.system] as VarInInspectType[]).includes(currentNodeVar.nodeType as VarInInspectType) && (
|
||||
<VariableIconWithColor
|
||||
variableCategory={currentNodeVar.nodeType as VarInInspectType}
|
||||
className="size-4"
|
||||
|
|
|
|||
|
|
@ -2,12 +2,14 @@ export const EVENT_WORKFLOW_STOP = 'WORKFLOW_STOP'
|
|||
|
||||
export const CHUNK_SCHEMA_TYPES = ['general_structure', 'parent_child_structure', 'qa_structure']
|
||||
|
||||
export enum ViewMode {
|
||||
Code = 'code',
|
||||
Preview = 'preview',
|
||||
}
|
||||
export const ViewMode = {
|
||||
Code: 'code',
|
||||
Preview: 'preview',
|
||||
} as const
|
||||
export type ViewMode = typeof ViewMode[keyof typeof ViewMode]
|
||||
|
||||
export enum PreviewType {
|
||||
Markdown = 'markdown',
|
||||
Chunks = 'chunks',
|
||||
}
|
||||
export const PreviewType = {
|
||||
Markdown: 'markdown',
|
||||
Chunks: 'chunks',
|
||||
} as const
|
||||
export type PreviewType = typeof PreviewType[keyof typeof PreviewType]
|
||||
|
|
|
|||
|
|
@ -5840,11 +5840,6 @@
|
|||
"count": 1
|
||||
}
|
||||
},
|
||||
"app/components/rag-pipeline/components/chunk-card-list/types.ts": {
|
||||
"erasable-syntax-only/enums": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"app/components/rag-pipeline/components/conversion.tsx": {
|
||||
"no-restricted-imports": {
|
||||
"count": 2
|
||||
|
|
@ -6002,11 +5997,6 @@
|
|||
"count": 1
|
||||
}
|
||||
},
|
||||
"app/components/rag-pipeline/components/panel/test-run/types.ts": {
|
||||
"erasable-syntax-only/enums": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"app/components/rag-pipeline/components/publish-as-knowledge-pipeline-modal.tsx": {
|
||||
"no-restricted-imports": {
|
||||
"count": 1
|
||||
|
|
@ -8890,11 +8880,6 @@
|
|||
"count": 1
|
||||
}
|
||||
},
|
||||
"app/components/workflow/note-node/types.ts": {
|
||||
"erasable-syntax-only/enums": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"app/components/workflow/operator/add-block.tsx": {
|
||||
"ts/no-explicit-any": {
|
||||
"count": 1
|
||||
|
|
@ -9511,11 +9496,6 @@
|
|||
"count": 1
|
||||
}
|
||||
},
|
||||
"app/components/workflow/variable-inspect/types.ts": {
|
||||
"erasable-syntax-only/enums": {
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"app/components/workflow/variable-inspect/utils.tsx": {
|
||||
"ts/no-explicit-any": {
|
||||
"count": 2
|
||||
|
|
@ -10112,11 +10092,6 @@
|
|||
"count": 3
|
||||
}
|
||||
},
|
||||
"types/model-provider.ts": {
|
||||
"erasable-syntax-only/enums": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"types/pipeline.tsx": {
|
||||
"ts/no-explicit-any": {
|
||||
"count": 3
|
||||
|
|
@ -10128,9 +10103,6 @@
|
|||
}
|
||||
},
|
||||
"types/workflow.ts": {
|
||||
"erasable-syntax-only/enums": {
|
||||
"count": 1
|
||||
},
|
||||
"ts/no-explicit-any": {
|
||||
"count": 17
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ export default antfu(
|
|||
overrides: {
|
||||
'ts/consistent-type-definitions': ['error', 'type'],
|
||||
'ts/no-explicit-any': 'error',
|
||||
'ts/no-redeclare': 'off',
|
||||
},
|
||||
erasableOnly: true,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2,12 +2,13 @@
|
|||
* Model provider quota types - shared type definitions for API responses
|
||||
* These represent the provider identifiers that support paid/trial quotas
|
||||
*/
|
||||
export enum ModelProviderQuotaGetPaid {
|
||||
ANTHROPIC = 'langgenius/anthropic/anthropic',
|
||||
OPENAI = 'langgenius/openai/openai',
|
||||
// AZURE_OPENAI = 'langgenius/azure_openai/azure_openai',
|
||||
GEMINI = 'langgenius/gemini/google',
|
||||
X = 'langgenius/x/x',
|
||||
DEEPSEEK = 'langgenius/deepseek/deepseek',
|
||||
TONGYI = 'langgenius/tongyi/tongyi',
|
||||
}
|
||||
export const ModelProviderQuotaGetPaid = {
|
||||
ANTHROPIC: 'langgenius/anthropic/anthropic',
|
||||
OPENAI: 'langgenius/openai/openai',
|
||||
// AZURE_OPENAI: 'langgenius/azure_openai/azure_openai',
|
||||
GEMINI: 'langgenius/gemini/google',
|
||||
X: 'langgenius/x/x',
|
||||
DEEPSEEK: 'langgenius/deepseek/deepseek',
|
||||
TONGYI: 'langgenius/tongyi/tongyi',
|
||||
} as const
|
||||
export type ModelProviderQuotaGetPaid = typeof ModelProviderQuotaGetPaid[keyof typeof ModelProviderQuotaGetPaid]
|
||||
|
|
|
|||
|
|
@ -455,12 +455,13 @@ export type PanelProps = {
|
|||
export type NodeRunResult = NodeTracing
|
||||
|
||||
// Var Inspect
|
||||
export enum VarInInspectType {
|
||||
conversation = 'conversation',
|
||||
environment = 'env',
|
||||
node = 'node',
|
||||
system = 'sys',
|
||||
}
|
||||
export const VarInInspectType = {
|
||||
conversation: 'conversation',
|
||||
environment: 'env',
|
||||
node: 'node',
|
||||
system: 'sys',
|
||||
} as const
|
||||
export type VarInInspectType = typeof VarInInspectType[keyof typeof VarInInspectType]
|
||||
|
||||
export type FullContent = {
|
||||
size_bytes: number
|
||||
|
|
|
|||
Loading…
Reference in New Issue