Inspiration
Most of the hackathons we have been to were crowded with AI code, this is expected because of the limited time that hackathons have. We saw tons of projects that used AI win but we were scared of using it because it would make us lose track of how the inner workings of the project. So we were like, "What Dat Mean?!" and made this to help us keep up. Also, we wanted to make something that we would actually use in our day-to-day lives and save people time.
What it does
This version allows you to hover over any line of code, ask "Wat Dat Mean?!" and get an explanation for that line in the context of your project. So far it only works with TypeScript It also lets you get examples and see what happens when you change the code. There is also a beginner mode that gives more verbose explanations. The non-beginner mode gives more concise explanations.
How we built it
We designed a VS Code extension that allows the user to hover over any line. We then had it fetch the line and divide it into keywords. For example: public score: number = 100; turns into [public, score, :, number, =, 100, ;] with each having its own explanation based on the type of keyword it is according to a stored schema*(This feature works offline)*. Then the sample gets fed into a lightweight model and it spits out explanations for the convention.
Challenges we ran into
*The API was easting up tokens like there was no tomorrow. So we optimized the prompt and created a limit to how many output tokens there can be. We ended up taking the tokens per API call from 1,500 down to 200-300.
*We wanted it to be for any language but only had to settle for TypeScript because of our time constraints.
Accomplishments that we're proud of
*How the UI/UX turned out.
*How we figured out how to optimize token use.
*How we were able to use our extension to explain our main codebase.
What we learned
-How to optimally use AI APIs and lower token usage to accomplish the same goal.
What's next for WatDatMean?!
-Add more support for other programming languages (Python, Java, C++, C#(Unity)) -Make this tool as powerful as it can be.