283 Commits

Author SHA1 Message Date
Rankin Zheng
6328b868c8 feat: Add copy button to code blocks
Add a copy button to code blocks in ChatPanel.tsx. The copy button allows users to easily copy code snippets to their clipboard. The button is implemented using the CopyButton component from @mantine/core and the IconCopy and IconCheck components from @tabler/icons-react.
2023-05-07 20:00:51 +08:00
Rankin Zheng
9712d9a976 feat: Add react-syntax-highlighter and react-markdown to package.json
Add react-syntax-highlighter and react-markdown to package.json to enable syntax highlighting and markdown rendering in the chat panel.

Also, update ChatPanel.tsx to use ReactMarkdown instead of Remark for markdown rendering. Additionally, add SyntaxHighlighter from react-syntax-highlighter to render code blocks with syntax highlighting.
2023-05-07 18:27:01 +08:00
Rankin Zheng
b84603633d
Merge pull request #22 from runjinz/command-support
feat: Add focus to input on load and new commands to command menu
2023-05-07 01:23:56 +08:00
Rankin Zheng
287c4f1762 feat: Add focus to input on load and new commands to command menu
Add focus to input on load and new commands to command menu. Also, added new icons to the plus menu.
2023-05-07 01:19:48 +08:00
Rankin Zheng
67bdf57d2d
Merge pull request #21 from runjinz/message-handler
Message handler
2023-05-07 00:54:09 +08:00
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
63630ef5e7 Refactor file structure
Rename src/views to src and move index.html and index.tsx to the root directory.
2023-05-06 17:32:01 +08:00
Rankin Zheng
d2c0ee9d02
Merge branch 'covespace:main' into message-handler 2023-05-06 17:19:47 +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
1847e100d2
Merge pull request #20 from runjinz/chat-messages
Chat messages
2023-05-06 00:43:04 +08:00
Rankin Zheng
0630da3b09
Merge branch 'main' into chat-messages 2023-05-06 00:42:49 +08:00
Rankin Zheng
7352fb6fc7 Merge branch 'runjinz-chat-messages' 2023-05-06 00:41:05 +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
b405e41ebf Merge branch 'chat-messages' of https://github.com/runjinz/devchat-vscode into chat-messages 2023-05-06 00:00:38 +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
f87525da78 Add webpack configuration for webview
This commit adds a new webpack configuration for the webview part of the project. It includes the necessary rules for transpiling and bundling the TypeScript and React code, as well as the CSS and image files. The new configuration is added to the existing configuration for the extension. The devtool option is changed to 'source-map' for better debugging experience.
2023-05-05 23:08:48 +08:00
boob.yang
24dd004f47
Merge pull request #19 from covespace/diff_with_selection
refactor code
2023-05-05 21:28:53 +08:00
bobo.yang
bac73dadb1 refactor code 2023-05-05 21:27:40 +08:00
Rankin Zheng
fa52479a3f
Merge branch 'covespace:main' into chat-messages 2023-05-05 19:34:16 +08:00
boob.yang
ebbd1b624e
Merge pull request #18 from covespace/diff_with_selection
add diff with selection
2023-05-05 17:01:44 +08:00
bobo.yang
2c86cbbb4e add diff with selection 2023-05-05 16:52:25 +08:00
boob.yang
1802b2c085
Merge pull request #17 from covespace/set_code_command_as_default
add default instructions
2023-05-05 15:35:45 +08:00
bobo.yang
9580250bb0 add default instructions 2023-05-05 15:34:22 +08:00
boob.yang
2b7752608e
Merge pull request #16 from covespace/add_config
Add config
2023-05-05 15:02:59 +08:00
bobo.yang
ac98b9674f use value in config 2023-05-05 15:00:46 +08:00
bobo.yang
e586c1d500 add config 2023-05-05 14:58:38 +08:00
boob.yang
6be0b72253
Merge pull request #15 from covespace/diff_view
support diff view action
2023-05-05 12:38:30 +08:00
bobo.yang
91876443ac support diff view action 2023-05-05 12:28:11 +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
Rankin Zheng
3288c82d5e refactor: move media to assets folder 2023-05-04 18:05:49 +08:00
Rankin Zheng
31161a7880 Merge branch 'main' of https://github.com/covespace/devchat-vscode 2023-05-04 18:02:38 +08:00
bobo.yang
0d59445cef add context implementation 2023-05-04 17:47:57 +08:00
bobo.yang
4b842048a8 add context by menu 2023-05-04 17:47:57 +08:00
bobo.yang
2799d30c08 don't copy instructions again 2023-05-04 17:46:06 +08:00
bobo.yang
06215450ad support user definded instructions 2023-05-04 17:46:06 +08:00
bobo.yang
101638b161 add doCommit message 2023-05-04 17:38:07 +08:00
bobo.yang
ed4b55a8f3 support commitmsg code block 2023-05-04 17:38:07 +08:00
bobo.yang
05bee3880b add commit message command 2023-05-04 17:38:07 +08:00
bobo.yang
7f6a423045 update devchat options 2023-05-04 17:38:07 +08:00
Rankin Zheng
0988effe3e
Merge pull request #7 from runjinz/type_a_request
Add auto-resizing functionality and Ctrl+Enter support to message input
2023-05-04 17:27:01 +08:00
boob.yang
a94a9850d3
Merge pull request #13 from covespace/git_diff_context
add context implementation
2023-05-04 17:03:57 +08:00
bobo.yang
e08350d546 add context implementation 2023-05-04 16:55:40 +08:00
Rankin Zheng
84222db4cc refactor: Refactor VSCode extension using React. 2023-05-04 16:09:19 +08:00
boob.yang
8fb99b0bf7
Merge pull request #12 from covespace/add_context_by_menu
add context by menu
2023-05-04 13:52:40 +08:00
bobo.yang
ff840476cc add context by menu 2023-05-04 13:50:06 +08:00
boob.yang
fec639ad3c
Merge pull request #11 from covespace/support_user_instruction_define
support user definded instructions
2023-05-04 12:01:37 +08:00
bobo.yang
b193dda852 don't copy instructions again 2023-05-04 12:00:41 +08:00
bobo.yang
f553719ba2 support user definded instructions 2023-05-04 11:50:45 +08:00