- Open the command palette
- type start Session
- copy the code from the course/Demo
- enjoy
remember to start the session in a blank folder or the git clone won't work
The Teachflow VS Code Extension is a powerful tool designed to enhance your development workflow within Visual Studio Code by allowing you to interact with a specific remote service. The extension integrates with the remote service hosted at https://teachflow.app, enabling you to perform various operations such as code insertion, code removal, file creation, and more directly from within VS Code.
- WebSocket Integration: Establish a WebSocket connection to receive real-time commands from the
https://teachflow.appservice. - Code Insertion: Automatically insert code into specified files at locations based on search strings.
- Code Removal: Remove specific code snippets from files, preserving indentation and surrounding content.
- File Creation: Create new files and folders with specified content.
- Code Highlighting: Highlight specific code segments and display tooltips.
- Command:
Teachflow.startSession - Description: the extension will connect to a WebSocket server with the browser.
- Once authenticated, the extension establishes a WebSocket connection with the browser
- gitClone: Clones a repository into the current workspace.
- insertCode: Inserts specified code at a location in a file based on a search string.
- removeCode: Removes specified code from a file, keeping the indentation intact.
- createFile: Creates a new file or directory with the given content.
- highlightCode: Highlights a specific code segment in a file and shows a tooltip.
- Command:
insertCode - Parameters:
file: The target file where the code will be inserted.searchString: A string is used to locate where the code should be inserted.code: The code snippet to insert.
- Behavior: The code is inserted immediately after the line containing the
searchString. The inserted code is highlighted temporarily.
- Command:
removeCode - Parameters:
file: The target file from which the code will be removed.code: The code snippet to remove.
- Behavior: The specified code is removed from the file, line by line, preserving the indentation and other content on those lines. The removed code is highlighted temporarily before deletion.
- Command:
createFile - Parameters:
file: The path of the file to be created.content: The content to write into the new file.
- Behavior: Creates the file at the specified location, including any necessary directories. If the file already exists, an error message is shown.
- Command:
highlightCode - Parameters:
file: The target file containing the code to highlight.code: The code snippet to highlight.tooltip: The text to display in the tooltip.
- Behavior: Highlights the specified code and shows a tooltip with the provided text.
To modify or extend the functionality of this extension:
- Open the project in VS Code.
- Modify the
src/functions.jsto add more function - add into the switch in
src/websocket.js - Press
F5to test your changes in a new VS Code window.
Contributions are welcome! Please submit a pull request or open an issue to suggest improvements or create new integration.
This project is licensed under the MIT License.