Add a new message handler to load history messages when the ChatPanel component is mounted. The handler receives a list of message entries and appends them to the messageHandlers state. Each entry contains a hash, user, date, request, response, and context. The context is an array of objects with a content and role property, which is parsed and added to the messageHandlers state as well.
Also, add a useEffect hook to the ChatPanel component to call the new message handler when the component is mounted.
Add a button to stop generating messages during a dev chat session. The button is displayed when generating messages and stops the generation process when clicked. The button is represented by the IconPlayerStop icon from the Tabler Icons library. The button is disabled during message generation.
This commit adds the ability to commit code blocks with the commit message syntax highlighting. The commit button appears only when the code block is a commit message. The commit button sends the commit message content to the server. The commit button changes color to teal when the commit is successful.
Add focus to input when chat menu is opened to improve user experience. This commit modifies the onChange function in ChatPanel.tsx to set focus to the input field when the menu is opened.
Refactored `ChatPanel` to handle missing contexts by adding conditional rendering for the `Accordion` and `contexts` map. Also, added `pre` tag styling to the message content.
The user's message now includes a context object that contains the file and context information. This allows the extension to process the message more accurately. The context object is also displayed in the chat UI.
Added a context menu to DevChat that allows users to select code or file and right-click to add it as a context. The context is then added to the list of contexts in the chat panel.
- Add DevChat related files to .gitignore
- Refactor package.json and settings
- Update commandManager.ts and remove example commands
- Implement customCommand.ts for handling custom commands
- Remove commitMessageCommand.ts and example commands
- Update chatConfig.ts and chatPanel.ts for new command handling
- Add new workflows for code and commit_message
Add configuration options for log count and skip
- Added new configuration options in package.json for maxLogCount and logSkip
- Updated historyMessages.ts to handle the new configuration options
- Modified devchat.ts to use the new configuration options when fetching logs
- Add DevChat related files to .gitignore
- Refactor package.json and settings
- Update commandManager.ts and remove example commands
- Implement customCommand.ts for handling custom commands
- Remove commitMessageCommand.ts and example commands
- Update chatConfig.ts and chatPanel.ts for new command handling
- Add new workflows for code and commit_message
Add configuration options for log count and skip
- Added new configuration options in package.json for maxLogCount and logSkip
- Updated historyMessages.ts to handle the new configuration options
- Modified devchat.ts to use the new configuration options when fetching logs
Added a context menu to the ChatPanel component that allows users to quickly insert context-specific commands. The context menu is populated with items based on the `contexts` array.
Check file existence using fs.existsSync
- Replace fs.accessSync with fs.existsSync for simplicity
- Update fileExists function in the TypeScript script
Enhance loadHandlers.ts with detailed comments
- Add comments to describe the purpose of each registered handler
- Explain the response messages for each handler
- Create MessageHistory class in src/util/messageHistory.ts
- Add message history to sendMessage function in src/handler/sendMessage.ts
- Add message history to ChatPanel class in src/panel/chatPanel.ts
- Update parent hash handling in sendMessage function
- Import stopDevChat in loadHandlers.ts and register it as a handler
- Move spawnAsync function from devchat.ts to DevChat class as a method
- Add stop method to DevChat class to kill the child process
- Update sendMessage.ts to use a single instance of DevChat