173 Commits

Author SHA1 Message Date
bobo.yang
cf6c6ac00a auto install devchat 2023-05-12 10:56:24 +08:00
bobo.yang
65294ceea9 Merge branch 'main' of https://github.com/covespace/devchat-vscode 2023-05-12 10:33:13 +08:00
Rankin Zheng
f583b57aac
Merge pull request #48 from covespace/fix-screen-shake
Limit displayed chat history to 5 messages
2023-05-12 10:11:12 +08:00
Rankin Zheng
52555699fd Limit displayed chat history to 5 messages
- Added a messageCount constant to limit the number of displayed messages
- Removed excess messages when the message length exceeds double the messageCount
- Ensured only the last 5 messages are loaded from the history
2023-05-12 10:08:38 +08:00
bobo.yang
344c50a82d package 0.0.29 2023-05-11 18:17:52 +08:00
bobo.yang
588420c41a support multi context 2023-05-11 18:16:47 +08:00
bobo.yang
459ec88c04 sett openai api key while openaiApiKey is invlaid 2023-05-11 16:55:15 +08:00
bobo.yang
2947722af4 update package data 2023-05-11 16:14:04 +08:00
Rankin Zheng
50c7a468c8
Merge pull request #46 from covespace/improve-user-experience
Improve user experience
2023-05-11 15:49:40 +08:00
Rankin Zheng
ad1ff0ed7f Fix chat panel content wrapping issue
Wrap chat panel content within a <pre> tag with overflowWrap set to 'normal' to prevent unintended line breaks.
2023-05-11 15:41:59 +08:00
Rankin Zheng
dcb0f3bced Add ScrollArea to Accordion.Panel in ChatPanel
- Wrapped the content inside Accordion.Panel with ScrollArea
- Set the height of ScrollArea to 300
- Changed 'mah' prop to 'h' for Accordion.Panel
2023-05-11 15:24:32 +08:00
Rankin Zheng
e7ccb132c9 Update Accordion styles in ChatPanel
- Adjust Accordion.Item and Accordion.Control styles for better layout
- Set max-height for Accordion.Panel to improve content display
2023-05-11 15:20:22 +08:00
Rankin Zheng
da14609a68 Improve chat scrolling and UI adjustments
- Add a setTimeout function to scrollToBottom in useEffect to ensure smooth scrolling when ChatPanel is mounted.
- Adjust the height of the ScrollArea based on the generating state.
- Move the "Stop generating" button to a more appropriate location in the UI.
- Update the display property of the blinking cursor for better visibility.
2023-05-11 15:10:05 +08:00
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