1810 Commits

Author SHA1 Message Date
bobo.yang
13c4453651 Refactor sendMessage and improve DevChat response handling
- Import ChatResponse from DevChat in sendMessage.ts
- Update sendMessage function to handle parent_hash and partial responses
- Refactor DevChat.chat to parse response data and handle partial stdout
- Remove unused lastPromptHash variable
2023-05-09 13:24:33 +08:00
Rankin Zheng
d7622abe28 Merge branch 'main' of https://github.com/covespace/devchat-vscode into input-multiline 2023-05-09 12:46:42 +08:00
Rankin Zheng
3d34a364bc feat: Add padding to chat container and focus on input on mount
Add a padding to the top of the chat container to prevent the first message from being hidden behind the input field. Also, focus on the input field when the chat panel mounts for better user experience.
2023-05-09 12:27:35 +08:00
Rankin Zheng
5bcd1fa42f Refactor chat panel to improve user experience
- Remove unused CSS class
- Add dynamic height to chat container
- Add smooth scrolling to bottom when new messages are received
- Fix input field width to match container width
- Use Mantine's useResizeObserver hook to get input field width
- Remove console.log statements
2023-05-09 12:13:22 +08:00
Rankin Zheng
f7c93f35a9 feat: Refactor ChatPanel component to show typing indicator 2023-05-09 10:38:28 +08:00
boob.yang
259d93a3fe
Merge pull request #32 from covespace/log_to_vscode
Log to vscode
2023-05-09 10:35:26 +08:00
bobo.yang
59d1a0eb3e add log 2023-05-09 10:34:33 +08:00
Rankin Zheng
8e59f2bc6b feat: Add functionality to display received messages in chat UI
Add useEffect hooks to display received messages in the chat UI as bot messages. Also, update the Input component to use Textarea and add the ability to send messages using Ctrl + Enter
2023-05-09 09:44:51 +08:00
bobo.yang
2eca8ee438 create log channel 2023-05-09 08:52:07 +08:00
boob.yang
925e871dce
Merge pull request #31 from covespace/add_parent_hash_config
add useHistoryPrompts config
2023-05-08 20:32:03 +08:00
bobo.yang
ac4f9d6802 add useHistoryPrompts config 2023-05-08 20:21:57 +08:00
boob.yang
bbb93a5fda
Merge pull request #30 from covespace/handle_dtm_exception
handle exception in dtm
2023-05-08 17:19:50 +08:00
bobo.yang
e3a94d1f76 handle exception in dtm 2023-05-08 17:18:48 +08:00
boob.yang
3f040b2c2c
Merge pull request #29 from covespace/fix_parent_hash_error
fix parent hash error
2023-05-08 17:04:28 +08:00
bobo.yang
93b1939bc3 fix parent hash error 2023-05-08 16:57:20 +08:00
boob.yang
da1f12a214
Merge pull request #28 from covespace/apply_code_to_file
apply code to specified file
2023-05-08 14:30:16 +08:00
bobo.yang
84c9852167 apply code to specified file 2023-05-08 14:03:29 +08:00
boob.yang
8ac8c72ac3
Merge pull request #27 from covespace/fix_context_miss_field
add file field for contextDetailResponse message
2023-05-08 13:17:14 +08:00
bobo.yang
5ed230a071 add file field for contextDetailResponse message 2023-05-08 13:16:34 +08:00
boob.yang
b267bacbfd
Merge pull request #26 from covespace/show_context
save context as json
2023-05-08 12:50:25 +08:00
bobo.yang
22e334e1f6 save context as json 2023-05-08 12:48:59 +08:00
boob.yang
736ede2114
Merge pull request #25 from covespace/filter_invliad_editor
Filter invliad editor
2023-05-08 12:17:12 +08:00
bobo.yang
e2d0290ff8 update tokens-per-prompt config 2023-05-08 12:15:46 +08:00
bobo.yang
4465d75c5a filter invalid editor 2023-05-08 12:09:52 +08:00
boob.yang
90c75f4d46
Merge pull request #24 from covespace/update_devchat
update to lastest devchat
2023-05-08 09:52:22 +08:00
bobo.yang
6f0dca9788 update to lastest devchat 2023-05-08 09:51:10 +08:00
Rankin Zheng
7cb39f1263
Merge pull request #23 from runjinz/main
Add react-syntax-highlighter and copy button to code blocks
2023-05-07 20:07:44 +08:00
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