With the release of RunJS version 3 comes AI Chat, a new feature powered by OpenAI that brings AI-assisted coding into RunJS. AI Chat is an on-demand coding assistant ready to help with everything from generating code snippets to answering programming questions and explaining complex code.
You can access AI Chat within a chat interface that can be opened by clicking the chat icon in the activity bar or by pressing Control
+Command
+i
(Mac) / Ctrl
+Alt
+i
(Windows/Linux).
AI Chat is context-aware, so you can ask questions related to the code in your current tab without needing to provide code samples. For example, if you're trying to run some code and getting an error message, you could ask, "why is my code returning an error?". AI Chat will then explain why you're seeing an error and how to fix it.
An even easier way of achieving this is by clicking the explain output button, which you will find on the right side of the output panel.
Clicking this will prompt AI Chat to provide you with an explanation of what your code is doing without you needing to type anything.
AI Chat is also very handy for generating code snippets. For example, if you need a quick function to filter an array of numbers based on certain conditions, you could simply type, "Generate a function to filter an array for numbers greater than 10." AI Chat will quickly provide a code snippet for you to use, saving you the time of writing out the code from scratch. This feature is especially helpful for tasks that may be repetitive or when you need a reminder of specific syntax.
In addition to helping with code generation and error explanations, AI Chat can clarify complex concepts. If you're working with an unfamiliar method or struggling to understand a particular algorithm, simply ask, "What does this function do?" or "Can you explain this algorithm step-by-step?" AI Chat will break down the logic and provide a detailed explanation to help you understand the code in context.
With these capabilities, AI Chat is designed to be an essential coding companion, supporting users at every step, from learning new concepts to building and debugging code efficiently.
RunJS version 3 introduces powerful new capabilities, with AI Chat as a key feature designed to make coding more interactive and intuitive. This release builds on RunJS's core strengths, enhancing its usability and making it an even more valuable tool for developers. If you've tried out AI Chat and have feedback, please get in touch and share your thoughts, report any issues, or suggest improvements. Every insight helps shape future updates and ensures RunJS continues to meet the needs of its community.