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