Inspiration
As busy programmers, we are very well acquainted with copy and pasting error output into google and hoping stack overflow has an answer for us. With the advent and sudden popularity of generative AI, the potential to level-up our debugging game was apparent. However, it is extremely inconvenient to have to open a new tab (log in if necessary), and prompt Chat-GPT with repetitive commands to understand our error.
This is where HAL comes in.
What it does
What HAL does is - with no intended malice - is to prompt the ubiquitous generative AI from OpenAI from the command line and extension to explain the error output of a program if there is one. What makes HAL so special is that it can tell when an output is an error or not - not through LLM inferences - but rather through rigorous programming. HAL comes in two forms, a Command-Line-Interface and a Visual Studio Code Extension. Both perform the same analysis with varying degrees of knowledge. When you use HAL from the command line as a CLI, it spawns a new terminal where the input gets executed as any command from the terminal would. The file's content and error output (if any) gets send to the AI to get interpreted - and displayed to the user. Alternately the VSCode extension - when activated - will spawn a web view that allows you to input the debug error and see the interpreted response. Currently HAL only knows Node.js (JS) but his capabilities can be expanded to include other languages.
How we built it
npm iin
dir"server"npm inpm i expressnpm i nodemonnpm i openainpm i httpnpm i corsnpm i path
in
dir"cli"- create
.envfile withOPENAI_API_KEYvalue npm i readlinenpm i child_processnpm i fsnpm i expressnpm i cors
- create
Challenges we ran into
We ran into challenges where we didn't know how to handle so many asynchronous calls. We kept console logging pending promises. This was definitely an experience to learn much about APIs, JavaScript, and promises.
Accomplishments that we're proud of
Our project earned us a referral from a JPMC employee.
What we learned
More about promises in JS and asynchronous API calls as well as how to build VSCode applications - and the limitations of the API provided.
What's next for HAL
- Word Domination
- Support more languages
- Clean up the web view extension a little
- Integrate web view into activity bar
Built With
- express.js
- openai
- vscode
- yeoman

Log in or sign up for Devpost to join the conversation.