This commit is contained in:
Mahmoud Hamdy 2026-03-24 06:31:23 +02:00 committed by GitHub
commit 198a73e532
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 48 additions and 68 deletions

View File

@ -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]

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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]

View File

@ -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
}

View File

@ -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,
},

View File

@ -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]

View File

@ -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