Inspiration
The inspiration behind FILE CHAT came from the frustration of repeatedly copying and pasting strings and commands from chat-based AI assistants like ChatGPT. I wanted to create an AI assistant capable of not only understanding code and making the necessary changes but also executing commands directly in the terminal. This tool aims to bridge the gap between environments where a code editor might not be available, providing seamless functionality for both file management and coding assistance.
What it does
FILE CHAT takes the content of the current directory, parses it, and sends it to an AI assistant. The AI then processes the data, enabling users to:
- Ask questions about their code or files.
- Retrieve relevant information about the directory and its contents.
How we built it
FILE CHAT was built in Go, leveraging the Google Gemini API for AI capabilities. The development process included:
- Writing functions to parse the directory structure and file contents into a suitable format for the AI.
- Sending this parsed data to the AI API and interpreting responses.
- Implementing a manual
updatecommand to refresh the context when files or directories change.
Challenges we ran into
- Content Parsing: Converting directory structures and file contents into a format optimized for sending to the AI server.
- Dynamic Context Updates: Maintaining an up-to-date context was tricky. Currently, users must manually run the
updatecommand after making changes to ensure the AI works with the latest state.
Accomplishments that we're proud of
- The tool is functional and achieves its core purpose within a short development window.
- Successfully integrated Go programming and AI APIs, despite being new to the language.
- Created a robust framework for interacting with both files and directories in terminal-based environments.
What we learned
- This project was my first experience with Go, and I gained significant insights into its syntax, libraries, and capabilities.
- Learned how to manage and maintain state efficiently in a terminal-based AI project.
- Understood the challenges and opportunities of integrating natural language processing into command-line environments.
What's next for FILE CHAT
- Dynamic Context Updates: Automate context refreshing, so file changes are tracked in real-time without manual intervention.
- Terminal Command Execution: Integrate functionality to execute commands directly in the terminal based on user input.
- File Management: Allow the AI to create, delete, and update files or directories as per user requirements.
- Enhanced Usability: Build a more intuitive user interface for seamless operation.
- Time Permitting: Complete all these features and expand the tool's capabilities further in future iterations.
Log in or sign up for Devpost to join the conversation.