1810 Commits

Author SHA1 Message Date
bobo.yang
8c171400fd use relative path 2023-05-11 14:57:12 +08:00
bobo.yang
0056c3ce52 don't return error while user stop devchat 2023-05-11 14:51:18 +08:00
bobo.yang
82d043da20 sort log entries. 2023-05-11 14:19:25 +08:00
Rankin Zheng
344a95868c
Merge pull request #45 from covespace/stop-generating
Stop generating and load history messages
2023-05-11 14:06:49 +08:00
Rankin Zheng
7b8d9e2373 feat: Add history messages to ChatPanel
Add a new message handler to load history messages when the ChatPanel component is mounted. The handler receives a list of message entries and appends them to the messageHandlers state. Each entry contains a hash, user, date, request, response, and context. The context is an array of objects with a content and role property, which is parsed and added to the messageHandlers state as well.

Also, add a useEffect hook to the ChatPanel component to call the new message handler when the component is mounted.
2023-05-11 14:06:06 +08:00
Rankin Zheng
578e18044b feat: Add stop generating button
Add a button to stop generating messages during a dev chat session. The button is displayed when generating messages and stops the generation process when clicked. The button is represented by the IconPlayerStop icon from the Tabler Icons library. The button is disabled during message generation.
2023-05-11 14:06:06 +08:00
bobo.yang
537626b3c8 update devchat 2023-05-11 13:55:16 +08:00
bobo.yang
1d48df44a4 add icon for devchat 2023-05-11 13:30:42 +08:00
Rankin Zheng
fca693d85b
Merge pull request #44 from covespace/commit-message
feat: Add commit functionality to code blocks
2023-05-11 12:39:25 +08:00
Rankin Zheng
3e9f428a0b feat: Add commit functionality to code blocks
This commit adds the ability to commit code blocks with the commit message syntax highlighting. The commit button appears only when the code block is a commit message. The commit button sends the commit message content to the server. The commit button changes color to teal when the commit is successful.
2023-05-11 12:35:14 +08:00
bobo.yang
1bbe2a3e91 copy workflows to .chat even .chat exist 2023-05-11 10:48:52 +08:00
bobo.yang
eca629b4f3 check dependence only once 2023-05-11 10:27:54 +08:00
bobo.yang
93714a2255 filter ``\ncommitmsg to ``commitmsg 2023-05-11 10:26:13 +08:00
boob.yang
8ab29050e6
Merge pull request #43 from covespace/check_dependence
Check dependence
2023-05-10 21:31:04 +08:00
bobo.yang
a0efb9a200 Add OpenAI endpoint config 2023-05-10 21:28:41 +08:00
Rankin Zheng
9a1966008b
Merge pull request #42 from covespace/code-buttons
Code buttons
2023-05-10 20:49:54 +08:00
Rankin Zheng
a254f02824 feat: Add functionality to view, insert, and replace code in ChatPanel 2023-05-10 20:49:06 +08:00
Rankin Zheng
dd35eff4b4 feat: Add focus to input when chat menu is opened
Add focus to input when chat menu is opened to improve user experience. This commit modifies the onChange function in ChatPanel.tsx to set focus to the input field when the menu is opened.
2023-05-10 20:27:43 +08:00
bobo.yang
19ce45fdaf fix git diff HEAD 2023-05-10 19:48:16 +08:00
bobo.yang
fba9621c4a check devchat and openai key before chat 2023-05-10 19:25:11 +08:00
boob.yang
cfe6a4fa50
Merge pull request #41 from covespace/secret_branch
Secret branch
2023-05-10 18:31:03 +08:00
bobo.yang
da89e38ffa User utf8 as file code. Copy .chat . 2023-05-10 18:30:17 +08:00
bobo.yang
5c7c273b20 reg message type info for debug 2023-05-10 17:56:56 +08:00
Rankin Zheng
c43753bc67
Merge pull request #40 from covespace/context-support
Context support
2023-05-10 17:41:20 +08:00
Rankin Zheng
ea32ab6e24 Refactor ChatPanel to handle missing contexts
Refactored `ChatPanel` to handle missing contexts by adding conditional rendering for the `Accordion` and `contexts` map. Also, added `pre` tag styling to the message content.
2023-05-10 17:38:24 +08:00
Rankin Zheng
767933cf95 feat: add context to user messages
The user's message now includes a context object that contains the file and context information. This allows the extension to process the message more accurately. The context object is also displayed in the chat UI.
2023-05-10 17:38:24 +08:00
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