1148 Commits

Author SHA1 Message Date
Rankin Zheng
8e84acab08
Merge pull request #73 from covespace/57-dont-drag-me-to-the-end-of-the-response-being-generated
57 dont drag me to the end of the response being generated
2023-05-18 08:27:46 +08:00
Rankin Zheng
c205c5f2a2 feat: Add scroll position tracking and stop scrolling when user scrolls up
This commit adds the ability to track the scroll position of the chat panel and stop scrolling when the user scrolls up. It also includes a timer to automatically scroll to the bottom of the chat panel after a certain amount of time.
2023-05-18 08:27:04 +08:00
Rankin Zheng
572513126e refactor: Move ChatPanel.tsx to ChatPanel/index.tsx
The ChatPanel.tsx file was moved to ChatPanel/index.tsx to better organize the project structure. The import statement for MessageUtil was also updated to reflect the new file path.
2023-05-17 20:41:31 +08:00
boob.yang
ff0de40013
Merge pull request #72 from covespace/set_api_key_in_chat
Set api key in chat
2023-05-17 17:12:13 +08:00
bobo.yang
ec700c710d Improve handling of missing or invalid OPENAI_API_KEY
This commit enhances the handling of missing or invalid OPENAI_API_KEY
by adding validation checks and providing clear error messages to the
user. It also stores the valid API key in the secret storage and
displays a welcome message when the key is set correctly.
2023-05-17 16:52:52 +08:00
bobo.yang
87e044e396 save 2023-05-17 16:18:04 +08:00
boob.yang
a285c957d5
Merge pull request #71 from covespace/multi_topics
Open DevChat view in sidebar view
2023-05-16 22:13:04 +08:00
bobo.yang
0742e54f98 Add welcome.html for displaying when no Git repo is open
This commit adds a new welcome.html file to display a message to the
user when no Git repository is open. The message informs the user that
DevChat is designed for answering questions about Git repositories and
asks them to open a Git repository folder to start using DevChat.
2023-05-16 22:06:43 +08:00
Rankin Zheng
50c3a4a08c
Merge pull request #70 from covespace/ui-enhancement
UI enhancement
2023-05-16 21:36:31 +08:00
Rankin Zheng
335db745cc Update styles to match VSCode theme
- Use VSCode theme variables for colors and fonts in App.tsx and ChatPanel.tsx
- Update background, foreground, and border colors for various components
- Update hover and disabled states for buttons and icons
2023-05-16 21:25:37 +08:00
bobo.yang
0b6d783fb1 Update DevChat commands and webview options
- Change DevChat.OPENAI_API_KEY title and add category
- Replace devchat.openChatPanel command with devchat-view.focus
- Update statusBarItem.command to devcaht.onStatusBarClick
- Set webviewOptions with retainContextWhenHidden: true for DevChatViewProvider
2023-05-16 17:49:13 +08:00
Rankin Zheng
8e4b010197 Update chat message sending shortcut and placeholder text
- Change the keyboard shortcut for sending a message from Ctrl+Enter to Enter without Shift
- Update the placeholder text to remove the reference to the old shortcut
2023-05-16 16:57:20 +08:00
Rankin Zheng
07bf5d2fe0 feat: adjust font size in App component
- Set font size to small in App component to improve readability
- Add `fontSize` property to `styles` object in `App.tsx`
2023-05-16 16:55:14 +08:00
bobo.yang
6695bf1ae7 save work 2023-05-16 14:35:37 +08:00
bobo.yang
2f7d3a99a2 open DevChat by sidebar 2023-05-16 14:35:01 +08:00
boob.yang
8fc5498691
Merge pull request #69 from covespace/status_item
Support status item action
2023-05-16 14:32:11 +08:00
bobo.yang
fa3c0a38be Support status item action 2023-05-16 14:24:24 +08:00
boob.yang
05498ce113
Merge pull request #68 from covespace/confgi_proxy
Fix Issues
2023-05-16 10:43:04 +08:00
bobo.yang
9f9cd52d5c Use secret storage for OpenAI API key and configurable DevChat path
- Import ExtensionContextHolder for secret storage access
- Retrieve OpenAI API key from secret storage, fallback to workspace config
- Make DevChat executable path configurable via workspace settings
- Replace hardcoded 'devchat' with configurable path in spawnAsync calls
2023-05-16 10:40:57 +08:00
bobo.yang
7fcf57772e Update package.json and commands for Chinese support
- Add activationEvents to package.json for better extension activation
- Add Chinese commands for addConext, askForCode, and askForFile
- Register Chinese commands in contributes/commands.ts
- Set isChineseLocale context based on the user's locale
2023-05-16 10:40:57 +08:00
Rankin Zheng
0337bd8c27
Merge pull request #67 from covespace/60-width-not-adjusting
feat: Adjust width of chat panel messages and scroll area
2023-05-15 19:12:29 +08:00
Rankin Zheng
ba27e80ac1 feat: Adjust width of chat panel messages and scroll area
- Set message width to the width of the scroll viewport
- Set scroll area width to the width of the chat panel minus 2rem
2023-05-15 19:11:58 +08:00
boob.yang
189309fdc6
Merge pull request #56 from covespace/fix_custom_command_error
fix custom command handler error
2023-05-12 17:34:35 +08:00
bobo.yang
5b42773273 fix custom command handler error 2023-05-12 17:33:46 +08:00
Jinglei Ren
b5bc6e892a
Update header of README.md 2023-05-12 12:02:08 +08:00
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