You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(variable-extraction): streamline variable usage analysis and enhance language consistency in templates
- Removed the variable usage analysis logic from the buildAppPublishPrompt function, simplifying the process by directly using all variables from canvasData.
- Updated template generation guidelines to emphasize the importance of maintaining language consistency with Canvas Nodes.
- Enhanced the ShareSettings component to provide clearer tooltips based on skill response node availability.
- Improved the WorkflowRunForm to validate template variables and ensure all required fields are filled before running the workflow.
- Ensured compliance with coding standards, including the use of optional chaining and nullish coalescing for safer property access.
- Wrapped components with React.memo to optimize performance and prevent unnecessary re-renders.
The **"content"** field in the template object is the most important output - this is the **workflow publishing template string** that will be used by users. It must:
158
162
163
+
- **Language Consistency**: **CRITICAL** - Must use the same language as Canvas Nodes
159
164
- **Be Natural and Conversational**: Sound like a helpful assistant explaining what they'll do
160
165
- **Include Only Used Variables**: Only variables that are actually referenced in Canvas Nodes with {{variable_name}} format should be included
161
166
- **Maintain Original Intent**: Preserve the user's original goal and requirements
@@ -205,43 +210,10 @@ ${APP_PUBLISH_EXAMPLES}
205
210
- Only variables that are actually used in Canvas Nodes should be included
206
211
- Templates should maintain the original workflow intent
207
212
- Language should be professional yet approachable
213
+
- **Language Consistency**: **CRITICAL** - All template fields must match the language used in Canvas Nodes
208
214
- **Variable Usage Validation**: Verify that all {{variable_name}} placeholders in the template correspond to variables actually referenced in Canvas Nodes`;
209
215
}
210
216
211
-
/**
212
-
* Analyze which variables are actually used in canvas nodes
213
-
* Returns a set of variable names that are referenced in node content
0 commit comments