7 Commits

Author SHA1 Message Date
Rankin Zheng
5e78696e4f feat: Add message handling and display in chat panel
This commit adds message handling for sending and receiving messages between the chat panel and the extension. It also displays the messages in the chat panel. The messages are displayed as a list of messages, with each message containing an avatar and the message content. The message content is displayed using the `Remark` component from the `react-remark` library.
2023-05-07 00:50:03 +08:00
Rankin Zheng
12f4cfbd11 refactor: Create a singleton instance for MessageUtil
Create a singleton instance for MessageUtil to avoid multiple instances of the class. The instance is created only once and returned on subsequent calls. This commit also removes the creation of a new instance of MessageUtil in ChatPanel.tsx.
2023-05-06 17:03:25 +08:00
Rankin Zheng
dd3ac3dd7c feat: Add message sending and receiving functionality
Create a MessageUtil class to handle sending and receiving messages between the extension and the chat panel. Add a function to send messages to the extension and register message handlers to receive messages from the extension. When the user clicks the send button, send the message to the extension. When the extension sends a message, add it to the chat UI as a bot message.
2023-05-06 00:32:53 +08:00
Rankin Zheng
9fa3c8fba2 Add react-remark package and use it to render markdown in ChatPanel 2023-05-06 00:00:25 +08:00
Rankin Zheng
6f998ef956 feat: Add avatars and icons to chat panel
Add avatars and icons to the chat panel to improve the user interface. Also, add a demo code block to show how to use the Button component. The demo code block is currently commented out.
2023-05-05 09:48:05 +08:00
Rankin Zheng
6eef4b2a78 feat: Add command menu to ChatPanel
Add a command menu to ChatPanel that allows users to access DevChat bots and run context commands. The command menu is displayed when the user types a command that starts with '/'. The menu includes commands for generating or updating code, writing a commit message, and writing a doc for reference, wiki, or discussion. The menu is styled using the existing ChatPanel styles.
2023-05-05 07:41:56 +08:00
Rankin Zheng
4829b8d44d feat: Add chat panel and menu
Add a chat panel with a menu and input field for sending messages. The menu contains options for settings, messages, gallery, and search. The chat panel also includes a list of instructions and a button for adding new messages.
2023-05-05 01:10:02 +08:00