Code Generation and Editing
D.Hub's code editor (Template Wizard, Pipeline Code Node, etc.) includes a built-in AI coding assistant, making it easy for users unfamiliar with programming to implement logic.
AI Code Generation
[Screenshot] AI code generation prompt screen
Useful when writing new code from scratch.
- Click the AI button in the code editor toolbar or press the shortcut
Cmd+I(Mac) /Ctrl+I(Windows). - Describe the desired logic in natural language in the prompt window.
- Example: "Filter only rows where 'status' is 'active' from the input data, and count by date."
- Click the Generate button and AI will write the code and show a preview.
- If you're satisfied with the code, click Accept to apply it to the editor.
Supported Languages and Guidelines
- Python: Optimized for data frame processing using the
polarslibrary. Automatically follows the input (inputs) and output (output) dictionary structure. - SQL: Supports standard SQL syntax and appropriately maps input table names.
Inline AI Edit
[Screenshot] AI inline edit screen
Use this when modifying or improving existing code.
- Drag to select the code area you want to modify in the editor.
- Click the AI Edit button that appears near the selection or press the shortcut
Cmd+I/Ctrl+I. - Enter your modification request.
- Example: "Change the variable names to be more intuitive", "Add error handling to this section"
- Review the changes suggested by AI (Diff View) and apply them.

