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:
catlog22
2026-02-04 22:22:27 +08:00
parent 113c14970f
commit 4ee165119b
17 changed files with 647 additions and 2017 deletions

View File

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