refactor: 清理未使用代码并添加未来功能标记
Some checks failed
CI / Rust Check (push) Has been cancelled
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled

style: 统一代码格式和注释风格

docs: 更新多个功能文档的完整度和状态

feat(runtime): 添加路径验证工具支持

fix(pipeline): 改进条件判断和变量解析逻辑

test(types): 为ID类型添加全面测试用例

chore: 更新依赖项和Cargo.lock文件

perf(mcp): 优化MCP协议传输和错误处理
This commit is contained in:
iven
2026-03-25 21:55:12 +08:00
parent aa6a9cbd84
commit bf6d81f9c6
109 changed files with 12271 additions and 815 deletions

View File

@@ -4,11 +4,13 @@
* Node for conditional branching.
*/
import React, { memo } from 'react';
import { Handle, Position, NodeProps } from '@xyflow/react';
import { memo } from 'react';
import { Handle, Position, NodeProps, Node } from '@xyflow/react';
import type { ConditionNodeData } from '../../../lib/workflow-builder/types';
export const ConditionNode = memo(({ data, selected }: NodeProps<ConditionNodeData>) => {
type ConditionNodeType = Node<ConditionNodeData>;
export const ConditionNode = memo(({ data, selected }: NodeProps<ConditionNodeType>) => {
const branchCount = data.branches.length + (data.hasDefault ? 1 : 0);
return (
@@ -39,7 +41,7 @@ export const ConditionNode = memo(({ data, selected }: NodeProps<ConditionNodeDa
{/* Branches */}
<div className="space-y-1">
{data.branches.map((branch, index) => (
{data.branches.map((branch: { label?: string; when: string }, index: number) => (
<div key={index} className="flex items-center justify-between">
<div className="relative">
{/* Branch Output Handle */}

View File

@@ -4,11 +4,11 @@
* Node for exporting workflow results to various formats.
*/
import React, { memo } from 'react';
import { Handle, Position, NodeProps } from '@xyflow/react';
import { memo } from 'react';
import { Handle, Position, NodeProps, Node } from '@xyflow/react';
import type { ExportNodeData } from '../../../lib/workflow-builder/types';
export const ExportNode = memo(({ data, selected }: NodeProps<ExportNodeData>) => {
export const ExportNode = memo(({ data, selected }: NodeProps<Node<ExportNodeData>>) => {
const formatLabels: Record<string, string> = {
pptx: 'PowerPoint',
html: 'HTML',

View File

@@ -4,11 +4,13 @@
* Node for executing hand actions.
*/
import React, { memo } from 'react';
import { Handle, Position, NodeProps } from '@xyflow/react';
import { memo } from 'react';
import { Handle, Position, NodeProps, Node } from '@xyflow/react';
import type { HandNodeData } from '../../../lib/workflow-builder/types';
export const HandNode = memo(({ data, selected }: NodeProps<HandNodeData>) => {
type HandNodeType = Node<HandNodeData>;
export const HandNode = memo(({ data, selected }: NodeProps<HandNodeType>) => {
const hasHand = Boolean(data.handId);
const hasAction = Boolean(data.action);

View File

@@ -4,8 +4,8 @@
* Node for making HTTP requests.
*/
import React, { memo } from 'react';
import { Handle, Position, NodeProps } from '@xyflow/react';
import { memo } from 'react';
import { Handle, Position, NodeProps, Node } from '@xyflow/react';
import type { HttpNodeData } from '../../../lib/workflow-builder/types';
const methodColors: Record<string, string> = {
@@ -16,7 +16,7 @@ const methodColors: Record<string, string> = {
PATCH: 'bg-purple-100 text-purple-700',
};
export const HttpNode = memo(({ data, selected }: NodeProps<HttpNodeData>) => {
export const HttpNode = memo(({ data, selected }: NodeProps<Node<HttpNodeData>>) => {
const hasUrl = Boolean(data.url);
return (

View File

@@ -4,11 +4,11 @@
* Node for defining workflow input variables.
*/
import React, { memo } from 'react';
import { Handle, Position, NodeProps } from '@xyflow/react';
import { memo } from 'react';
import { Handle, Position, NodeProps, Node } from '@xyflow/react';
import type { InputNodeData } from '../../../lib/workflow-builder/types';
export const InputNode = memo(({ data, selected }: NodeProps<InputNodeData>) => {
export const InputNode = memo(({ data, selected }: NodeProps<Node<InputNodeData>>) => {
return (
<div
className={`

View File

@@ -4,11 +4,11 @@
* Node for LLM generation actions.
*/
import React, { memo } from 'react';
import { Handle, Position, NodeProps } from '@xyflow/react';
import { memo } from 'react';
import { Handle, Position, NodeProps, Node } from '@xyflow/react';
import type { LlmNodeData } from '../../../lib/workflow-builder/types';
export const LlmNode = memo(({ data, selected }: NodeProps<LlmNodeData>) => {
export const LlmNode = memo(({ data, selected }: NodeProps<Node<LlmNodeData>>) => {
const templatePreview = data.template.length > 50
? data.template.slice(0, 50) + '...'
: data.template || 'No template';

View File

@@ -4,11 +4,11 @@
* Node for executing skill orchestration graphs (DAGs).
*/
import React, { memo } from 'react';
import { Handle, Position, NodeProps } from '@xyflow/react';
import { memo } from 'react';
import { Handle, Position, NodeProps, Node } from '@xyflow/react';
import type { OrchestrationNodeData } from '../../../lib/workflow-builder/types';
export const OrchestrationNode = memo(({ data, selected }: NodeProps<OrchestrationNodeData>) => {
export const OrchestrationNode = memo(({ data, selected }: NodeProps<Node<OrchestrationNodeData>>) => {
const hasGraphId = Boolean(data.graphId);
const hasGraph = Boolean(data.graph);
const inputCount = Object.keys(data.inputMappings).length;

View File

@@ -4,11 +4,11 @@
* Node for parallel execution of steps.
*/
import React, { memo } from 'react';
import { Handle, Position, NodeProps } from '@xyflow/react';
import { memo } from 'react';
import { Handle, Position, NodeProps, Node } from '@xyflow/react';
import type { ParallelNodeData } from '../../../lib/workflow-builder/types';
export const ParallelNode = memo(({ data, selected }: NodeProps<ParallelNodeData>) => {
export const ParallelNode = memo(({ data, selected }: NodeProps<Node<ParallelNodeData>>) => {
return (
<div
className={`

View File

@@ -4,11 +4,11 @@
* Node for executing skills.
*/
import React, { memo } from 'react';
import { Handle, Position, NodeProps } from '@xyflow/react';
import { memo } from 'react';
import { Handle, Position, NodeProps, Node } from '@xyflow/react';
import type { SkillNodeData } from '../../../lib/workflow-builder/types';
export const SkillNode = memo(({ data, selected }: NodeProps<SkillNodeData>) => {
export const SkillNode = memo(({ data, selected }: NodeProps<Node<SkillNodeData>>) => {
const hasSkill = Boolean(data.skillId);
return (