Skip to content

Latest commit

 

History

History
121 lines (87 loc) · 4.41 KB

README.md

File metadata and controls

121 lines (87 loc) · 4.41 KB

Rasa Flow VSCode Extension

Early Prototype!

The Rasa Flow VSCode Extension is a powerful tool designed to enhance the development experience for Rasa chatbot creators. This extension provides intelligent autocompletion, hover information, validation, and visualization features for Rasa flow YAML files, making it easier and faster to create and manage complex conversational flows.

Key features include:

  • Context-aware autocompletion for Rasa flow structures
  • Hover information for Rasa-specific keywords and concepts
  • Document outline for easy navigation of flows and steps
  • Real-time validation of Rasa flow YAML structure
  • Basic visualization of Rasa flows

Installation

Prerequisites

Building and Installing Locally

  1. Clone the repository:

    git clone https://github.com/your-username/rasa-flow-vscode-extension.git
    cd rasa-flow-vscode-extension
    
  2. Install dependencies:

    npm install
    
  3. Install the vsce package globally:

    npm install -g vsce
    
  4. Compile the extension:

    npm run compile
    
  5. Package the extension:

    vsce package
    

    This will create a .vsix file in your project directory.

  6. Install the extension in VS Code:

    • Open VS Code
    • Go to the Extensions view (Ctrl+Shift+X)
    • Click on the "..." at the top of the Extensions view
    • Choose "Install from VSIX..."
    • Select the .vsix file you created in step 5
  7. Restart VS Code to activate the extension.

Usage

  1. Open a Rasa flow YAML file in VS Code.
  2. Start typing to see context-aware autocompletion suggestions.
  3. Hover over Rasa-specific keywords to see additional information.
  4. Use the outline view to navigate through your flows and steps.
  5. The extension will automatically validate your YAML structure and show any errors.
  6. To visualize your Rasa flow, open the Command Palette (Ctrl+Shift+P) and run the "Visualize Rasa Flow" command.

Contributing

Contributions to the Rasa Flow VSCode Extension are welcome! Please feel free to submit pull requests, create issues or spread the word.

Ideas for Future Improvements

  1. Enhanced Visualization:

    • Implement a more graphical representation of flows using a library like D3.js or mermaid.
    • Add interactivity to the visualization, allowing users to click on elements for more details.
  2. Advanced Validation:

    • Implement more sophisticated validation rules based on Rasa best practices.
    • Add quick-fix suggestions for common issues.
  3. Integration with Rasa Open Source:

    • Allow users to run Rasa commands directly from VS Code.
    • Provide real-time feedback on Rasa model training and testing.
  4. Snippets and Templates:

    • Add a library of common Rasa flow patterns that users can easily insert.
    • Create a feature to save custom snippets for reuse across projects.
  5. Configuration and Customization:

    • Allow users to customize the extension's behavior through settings.
    • Implement project-specific configurations for team consistency.
  6. Performance Optimization:

    • Improve the efficiency of YAML parsing and validation for larger projects.
    • Implement incremental parsing to reduce CPU usage during editing.
  7. Cross-File Intelligence:

    • Provide autocompletion and validation that takes into account multiple files in a Rasa project.
    • Implement "Go to Definition" and "Find All References" features for actions, intents, and entities across the project.
  8. Integration with Version Control:

    • Add features to visualize changes in flows between git commits.
    • Implement conflict resolution helpers for merging changes in flow files.
  9. Internationalization:

    • Add support for multiple languages in the UI and documentation.
  10. Testing Tools:

    • Implement features to generate test conversations based on the defined flows.
    • Provide tools for running and visualizing test results within VS Code.

These improvements would significantly enhance the functionality and user experience of the Rasa Flow VSCode Extension, making it an even more powerful tool for Rasa developers.

Support

If you encounter any problems or have any suggestions, please open an issue in the GitHub repository.

Happy bot building!