1784 Commits

Author SHA1 Message Date
Rankin Zheng
26fb027c6c feat: Add context menu to DevChat
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.
2023-05-10 17:38:24 +08:00
Rankin Zheng
dd3e6a9fea feat: Add view-diff and insert icons to code block
Add view-diff and insert icons to code block for better user experience.
2023-05-10 17:38:24 +08:00
bobo.yang
780a890d08 fix instruction path error 2023-05-10 17:38:24 +08:00
bobo.yang
63022655f3 Update .gitignore and refactor code
- 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
2023-05-10 17:38:24 +08:00
bobo.yang
782bafa2f3 commitmsg
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
2023-05-10 17:38:24 +08:00
boob.yang
96b5eebbf3
Merge pull request #39 from covespace/fix_instruction_copy_logic
fix instruction path error
2023-05-10 15:57:46 +08:00
bobo.yang
a59ee8f9fd fix instruction path error 2023-05-10 15:57:02 +08:00
boob.yang
13617e4ffb
Merge pull request #38 from covespace/fix_instruction_copy_logic
Update .gitignore and refactor code
2023-05-10 14:35:00 +08:00
bobo.yang
7f2a869f3f Update .gitignore and refactor code
- 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
2023-05-10 14:31:17 +08:00
boob.yang
a11b38c5a3
Merge pull request #37 from covespace/history_message_handler
handle devchat log
2023-05-09 20:49:21 +08:00
bobo.yang
08be9a52dc commitmsg
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
2023-05-09 20:46:57 +08:00
Rankin Zheng
e7634c442f feat: Add context menu to ChatPanel
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.
2023-05-09 19:15:28 +08:00
Rankin Zheng
106b77d6de refactor: Add context and command registration to MessageUtil 2023-05-09 19:10:46 +08:00
boob.yang
f799de7ad3
Merge pull request #36 from covespace/package_dtm
Package dtm
2023-05-09 18:23:26 +08:00
bobo.yang
438a858c39 commitmsg
Check file existence using fs.existsSync

- Replace fs.accessSync with fs.existsSync for simplicity
- Update fileExists function in the TypeScript script
2023-05-09 18:22:11 +08:00
bobo.yang
9b51d3e24b commitmsg
Add binaryPath to DtmWrapper class

- Initialize binaryPath with default value 'dtm'
- This change is in src/toolwrapper/dtm.ts
2023-05-09 18:13:51 +08:00
bobo.yang
ed2f645eb4 package dtm 2023-05-09 18:04:08 +08:00
bobo.yang
2624d2f77c Merge branch 'main' of https://github.com/covespace/devchat-vscode 2023-05-09 17:23:38 +08:00
bobo.yang
4154af657b commitmsg
Enhance loadHandlers.ts with detailed comments

- Add comments to describe the purpose of each registered handler
- Explain the response messages for each handler
2023-05-09 17:17:31 +08:00
boob.yang
671f192e89
Merge pull request #35 from covespace/store_history_messages
Add message history to chat panel
2023-05-09 16:06:42 +08:00
bobo.yang
36bef1c8ea Add message history to chat panel
- 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
2023-05-09 16:05:49 +08:00
boob.yang
6fe67255dc
Merge pull request #34 from covespace/add_chat_stop
Add stopDevChat function and move spawnAsync to DevChat class
2023-05-09 14:12:47 +08:00
bobo.yang
95bb1161f1 Add stopDevChat function and move spawnAsync to DevChat class
- 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
2023-05-09 14:08:18 +08:00
boob.yang
da9883f7f2
Merge pull request #33 from covespace/add_message_hash
Refactor sendMessage and improve DevChat response handling
2023-05-09 13:29:04 +08:00
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