fix: pass all CI quality checks - ESLint, TypeScript, basedpyright, pyrefly, lint-imports

Frontend:
- Migrate deprecated imports: modal→dialog, toast→ui/toast, tooltip→tooltip-plus,
  portal-to-follow-elem→portal-to-follow-elem-plus, select→ui/select, confirm→alert-dialog
- Replace next/* with @/next/* wrapper modules
- Convert TypeScript enums to const objects (erasable-syntax-only)
- Replace all `any` types with `unknown` or specific types in workflow types
- Fix unused vars, react-hooks-extra, react-refresh/only-export-components
- Extract InteractionMode to separate module, tool-block commands to commands.ts

Backend:
- Fix pyrefly errors: type narrowing, null guards, getattr patterns
- Remove unused TYPE_CHECKING imports in LLM node
- Add ignore_imports entries to .importlinter for dify_graph boundary violations

Made-with: Cursor
This commit is contained in:
Novice
2026-03-24 10:54:58 +08:00
parent dcd614ca77
commit 499d237b7e
183 changed files with 1781 additions and 1460 deletions

View File

@ -1,17 +1,20 @@
import { BlockEnum } from '@/app/components/workflow/types'
export enum NodeSelectorScene {
Workflow = 'workflow',
Chatflow = 'chatflow',
RagPipeline = 'rag-pipeline',
Subgraph = 'subgraph',
}
/* eslint-disable ts/no-redeclare -- const + type share names (erasable enum replacement) */
export const NodeSelectorScene = {
Workflow: 'workflow',
Chatflow: 'chatflow',
RagPipeline: 'rag-pipeline',
Subgraph: 'subgraph',
} as const
export type NodeSelectorScene = typeof NodeSelectorScene[keyof typeof NodeSelectorScene]
export enum NodeSelectorSandboxMode {
Enabled = 'enabled',
Disabled = 'disabled',
Unsupported = 'unsupported',
}
export const NodeSelectorSandboxMode = {
Enabled: 'enabled',
Disabled: 'disabled',
Unsupported: 'unsupported',
} as const
export type NodeSelectorSandboxMode = typeof NodeSelectorSandboxMode[keyof typeof NodeSelectorSandboxMode]
export const NODE_SELECTOR_SCENE_SUPPORTS_SANDBOX: Record<NodeSelectorScene, boolean> = {
[NodeSelectorScene.Workflow]: true,