mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-01 13:03:53 +08:00
refactor: unify node types into a single PromptTemplate model
- Removed individual node components (SlashCommandNode, FileOperationNode, etc.) and replaced them with a unified PromptTemplateNode. - Updated flow types and interfaces to reflect the new single node type system. - Refactored flow execution logic to handle the new unified model, simplifying node execution and context handling. - Adjusted UI components to support the new PromptTemplateNode, including instruction display and context references. - Cleaned up legacy code related to removed node types and ensured compatibility with the new structure.
This commit is contained in:
@@ -163,70 +163,27 @@
|
||||
"deleteNode": "Delete Node",
|
||||
"placeholders": {
|
||||
"nodeLabel": "Node label",
|
||||
"commandName": "/command-name",
|
||||
"commandArgs": "Command arguments",
|
||||
"timeout": "60000",
|
||||
"path": "/path/to/file",
|
||||
"content": "File content...",
|
||||
"destinationPath": "/path/to/destination",
|
||||
"variableName": "variableName",
|
||||
"condition": "e.g., result.success === true",
|
||||
"trueLabel": "True",
|
||||
"falseLabel": "False",
|
||||
"contextTemplate": "Template with {variable} placeholders",
|
||||
"promptText": "Enter your prompt here..."
|
||||
"instruction": "e.g., Execute /workflow:plan for login feature\nor: Analyze code architecture\nor: Save {{analysis}} to ./output/result.json",
|
||||
"outputName": "e.g., analysis, plan, result"
|
||||
},
|
||||
"labels": {
|
||||
"label": "Label",
|
||||
"command": "Command",
|
||||
"arguments": "Arguments",
|
||||
"executionMode": "Execution Mode",
|
||||
"onError": "On Error",
|
||||
"timeout": "Timeout (ms)",
|
||||
"operation": "Operation",
|
||||
"path": "Path",
|
||||
"content": "Content",
|
||||
"destinationPath": "Destination Path",
|
||||
"outputVariable": "Output Variable",
|
||||
"addToContext": "Add to context",
|
||||
"condition": "Condition",
|
||||
"trueLabel": "True Label",
|
||||
"falseLabel": "False Label",
|
||||
"joinMode": "Join Mode",
|
||||
"failFast": "Fail fast (stop all branches on first error)",
|
||||
"instruction": "Instruction",
|
||||
"outputName": "Output Name",
|
||||
"tool": "CLI Tool",
|
||||
"mode": "Mode",
|
||||
"promptType": "Prompt Type",
|
||||
"sourceNodes": "Source Nodes",
|
||||
"contextTemplate": "Context Template",
|
||||
"promptText": "Prompt Text"
|
||||
"mode": "Execution Mode",
|
||||
"contextRefs": "Context References"
|
||||
},
|
||||
"options": {
|
||||
"modeMainprocess": "Main Process",
|
||||
"modeAsync": "Async",
|
||||
"errorStop": "Stop execution",
|
||||
"errorContinue": "Continue",
|
||||
"errorRetry": "Retry",
|
||||
"operationRead": "Read",
|
||||
"operationWrite": "Write",
|
||||
"operationAppend": "Append",
|
||||
"operationDelete": "Delete",
|
||||
"operationCopy": "Copy",
|
||||
"operationMove": "Move",
|
||||
"joinModeAll": "Wait for all branches",
|
||||
"joinModeAny": "Complete when any branch finishes",
|
||||
"joinModeNone": "No synchronization",
|
||||
"toolNone": "None (auto-select)",
|
||||
"toolGemini": "Gemini",
|
||||
"toolQwen": "Qwen",
|
||||
"toolCodex": "Codex",
|
||||
"modeAnalysis": "Analysis",
|
||||
"modeWrite": "Write",
|
||||
"modeReview": "Review",
|
||||
"promptTypeOrganize": "Organize",
|
||||
"promptTypeRefine": "Refine",
|
||||
"promptTypeSummarize": "Summarize",
|
||||
"promptTypeTransform": "Transform",
|
||||
"promptTypeCustom": "Custom"
|
||||
"toolClaude": "Claude",
|
||||
"modeAnalysis": "Analysis (read-only)",
|
||||
"modeWrite": "Write (modify files)",
|
||||
"modeMainprocess": "Main Process (blocking)",
|
||||
"modeAsync": "Async (non-blocking)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,70 +162,27 @@
|
||||
"deleteNode": "删除节点",
|
||||
"placeholders": {
|
||||
"nodeLabel": "节点标签",
|
||||
"commandName": "/命令名称",
|
||||
"commandArgs": "命令参数",
|
||||
"timeout": "60000",
|
||||
"path": "/文件路径",
|
||||
"content": "文件内容...",
|
||||
"destinationPath": "/目标路径",
|
||||
"variableName": "变量名称",
|
||||
"condition": "例如: result.success === true",
|
||||
"trueLabel": "真",
|
||||
"falseLabel": "假",
|
||||
"contextTemplate": "带有 {variable} 占位符的模板",
|
||||
"promptText": "在此输入您的提示词..."
|
||||
"instruction": "例如: 执行 /workflow:plan 用于登录功能\n或: 分析代码架构\n或: 将 {{analysis}} 保存到 ./output/result.json",
|
||||
"outputName": "例如: analysis, plan, result"
|
||||
},
|
||||
"labels": {
|
||||
"label": "标签",
|
||||
"command": "命令",
|
||||
"arguments": "参数",
|
||||
"executionMode": "执行模式",
|
||||
"onError": "出错时",
|
||||
"timeout": "超时 (毫秒)",
|
||||
"operation": "操作",
|
||||
"path": "路径",
|
||||
"content": "内容",
|
||||
"destinationPath": "目标路径",
|
||||
"outputVariable": "输出变量",
|
||||
"addToContext": "添加到上下文",
|
||||
"condition": "条件",
|
||||
"trueLabel": "真标签",
|
||||
"falseLabel": "假标签",
|
||||
"joinMode": "加入模式",
|
||||
"failFast": "快速失败 (首次错误时停止所有分支)",
|
||||
"instruction": "指令",
|
||||
"outputName": "输出名称",
|
||||
"tool": "CLI 工具",
|
||||
"mode": "模式",
|
||||
"promptType": "提示词类型",
|
||||
"sourceNodes": "源节点",
|
||||
"contextTemplate": "上下文模板",
|
||||
"promptText": "提示词文本"
|
||||
"mode": "执行模式",
|
||||
"contextRefs": "上下文引用"
|
||||
},
|
||||
"options": {
|
||||
"modeMainprocess": "主进程",
|
||||
"modeAsync": "异步",
|
||||
"errorStop": "停止执行",
|
||||
"errorContinue": "继续",
|
||||
"errorRetry": "重试",
|
||||
"operationRead": "读取",
|
||||
"operationWrite": "写入",
|
||||
"operationAppend": "追加",
|
||||
"operationDelete": "删除",
|
||||
"operationCopy": "复制",
|
||||
"operationMove": "移动",
|
||||
"joinModeAll": "等待所有分支",
|
||||
"joinModeAny": "任一分支完成时完成",
|
||||
"joinModeNone": "无同步",
|
||||
"toolNone": "无 (自动选择)",
|
||||
"toolGemini": "Gemini",
|
||||
"toolQwen": "Qwen",
|
||||
"toolCodex": "Codex",
|
||||
"modeAnalysis": "分析",
|
||||
"modeWrite": "写入",
|
||||
"modeReview": "审查",
|
||||
"promptTypeOrganize": "组织",
|
||||
"promptTypeRefine": "精炼",
|
||||
"promptTypeSummarize": "总结",
|
||||
"promptTypeTransform": "转换",
|
||||
"promptTypeCustom": "自定义"
|
||||
"toolClaude": "Claude",
|
||||
"modeAnalysis": "分析 (只读)",
|
||||
"modeWrite": "写入 (修改文件)",
|
||||
"modeMainprocess": "主进程 (阻塞)",
|
||||
"modeAsync": "异步 (非阻塞)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user