19 Commits

Author SHA1 Message Date
Rankin Zheng
f7a56ba97d Update ChatPanel button style
- Add 'xs' size to the button
- Set fontSize to 'var(--vscode-editor-font-size)'
2023-05-19 09:11:41 +08:00
Rankin Zheng
a46b69a2ab feat(chatpanel): add default command menu icon
Add a default command menu icon for patterns other than 'code' and 'commit_message' in the ChatPanel component.
2023-05-19 08:15:24 +08:00
Rankin Zheng
64ba8612c6 Improve chat panel keyboard navigation
- Focus input field when plus button is clicked
- Close menu when 'Escape' key is pressed
- Refactor menu navigation for better readability
2023-05-19 07:51:28 +08:00
Rankin Zheng
039a6d0b22 Improve chat panel tip message layout
- Add overflow hidden to the container
- Add text truncation and width limit to the tip message
2023-05-19 07:41:44 +08:00
Rankin Zheng
466e664ba3 refactor: Add border radius to Accordion and Menu components
Add border radius to Accordion and Menu components to improve the UI. Also, add specific styles to the active and expanded states of the components. The changes were made in src/views/ChatPanel/index.tsx.
2023-05-19 07:04:06 +08:00
Rankin Zheng
9d98b05ef5 Refactor ChatPanel Flex margin
Changed the margin of the Flex component in ChatPanel to use shorthand CSS properties.
2023-05-19 00:30:33 +08:00
Rankin Zheng
d269eb91b8 refactor(chatpanel): improve message display
- Change Flex to Stack for better message layout
- Add avatar and name to each message
- Increase padding and change background color for better readability
2023-05-19 00:21:53 +08:00
Rankin Zheng
21f3e375b8 feat: Add new avatar image and adjust chat panel layout
Added a new avatar image and adjusted the layout of the chat panel to accommodate the new image. The new avatar image is now displayed for user messages. The layout of the chat panel has been adjusted to ensure that the new image is displayed correctly. The width of the chat panel has been set to the width of the container. The padding and margin of the chat panel have been adjusted to ensure that the new image is displayed correctly.
2023-05-18 23:07:36 +08:00
Rankin Zheng
4fd3a80cb6 feat: Add spacing and height to chat panel controls
Add spacing of 5 between the chat panel controls and set the height of the controls to 30. Also, reduce the size of the action icon from lg to sm. Finally, change the shadow of the command menu from xs to sm.
2023-05-18 19:58:29 +08:00
Rankin Zheng
d692a24bc5 fix(chatpanel): Fix context menu icons for git diff commands
Change the context menu icons for the git diff commands to match the correct command names. Replaced IconGitBranch with IconGitBranchChecked for 'git diff --cached' and replaced IconGitBranchChecked with IconGitBranch for 'git diff HEAD'.
2023-05-18 19:40:14 +08:00
Rankin Zheng
79cb2fd8d2 feat: Add commandMenuIcon function to ChatPanel
This commit adds the `commandMenuIcon` function to the `ChatPanel` component in `index.tsx`. This function returns an icon based on the given pattern. The function is used to display different icons for different patterns in the command menu.
2023-05-18 16:55:41 +08:00
Rankin Zheng
b79e69e5af feat: Add context menu icons
Add icons to the context menu items based on their names. The function contextMenuIcon() was added to the code to handle this. The function returns an icon based on the name of the context menu item.

The following icons were added: IconMouseRightClick, IconBook, IconGitBranch, IconGitBranchChecked, and IconShellCommand.

The code was also refactored to use the contextMenuIcon() function instead of the IconMessagePlus component.
2023-05-18 16:53:09 +08:00
Rankin Zheng
dc5c5f091e Refactor SVG imports in ChatPanel
The commit refactors the SVG imports in ChatPanel to remove the unnecessary `assets` folder from the import path.
2023-05-18 14:01:19 +08:00
Rankin Zheng
a780474c2b feat: Update ChatPanel UI
- Update the avatar images to use SVG format
- Use file-loader instead of url-loader to load image assets

The commit updates the ChatPanel UI by replacing the avatar images with SVG format and using file-loader instead of url-loader to load image assets.
2023-05-18 13:58:17 +08:00
Rankin Zheng
795b0a2f4a refactor(chatpanel): update avatar size and margin
- Update avatar size to 'sm' and margin to {marginTop: 10, marginLeft: 3}
- Replace IconRobot and IconUser with avatarDevChat and avatarUser respectively
- Update gap between messages to 'xs'
- Update Divider margin to {my: 3}
2023-05-18 13:09:19 +08:00
Rankin Zheng
05b9379df1 feat: Add command menu filtering and keyboard navigation
This commit adds the ability to filter command menus based on user input and navigate through them using the up and down arrow keys. When a command is selected, it is inserted into the input field. The commit also removes the command menu rendering from the initial render and moves it to a useEffect hook.
2023-05-18 11:34:00 +08:00
Rankin Zheng
1aaf8a6ec9 feat: Add popover to ChatPanel
This commit adds a popover to ChatPanel that contains a dropdown menu for commands and contexts. The dropdown menu can be opened by clicking on the ChatPanel's textarea. The dropdown menu contains a list of commands and contexts that can be clicked to insert them into the textarea. The popover also contains a tooltip that provides instructions on how to select code or file and right-click to access the context menu.
2023-05-18 10:31:22 +08:00
Rankin Zheng
c205c5f2a2 feat: Add scroll position tracking and stop scrolling when user scrolls up
This commit adds the ability to track the scroll position of the chat panel and stop scrolling when the user scrolls up. It also includes a timer to automatically scroll to the bottom of the chat panel after a certain amount of time.
2023-05-18 08:27:04 +08:00
Rankin Zheng
572513126e refactor: Move ChatPanel.tsx to ChatPanel/index.tsx
The ChatPanel.tsx file was moved to ChatPanel/index.tsx to better organize the project structure. The import statement for MessageUtil was also updated to reflect the new file path.
2023-05-17 20:41:31 +08:00