1810 Commits

Author SHA1 Message Date
boob.yang
61c0ab048d
Merge pull request #77 from covespace/support_diff_apply
Support diff apply
2023-05-18 15:55:39 +08:00
bobo.yang
72b0822e9f Add devchat_apply.svg and escape special characters in commandManager
- Add new devchat_apply.svg file to assets
- Update commandManager.ts to escape special characters in command patterns
2023-05-18 15:51:52 +08:00
bobo.yang
5d74f87528 Update pattern values in workflow settings
- Change pattern value in _setting_.json for code workflow
- Update pattern value in _setting_.json for code_actions workflow
- Modify pattern value in _setting_.json for commit_message workflow
2023-05-18 15:38:59 +08:00
bobo.yang
219a69015e apply diff actions to source file 2023-05-18 15:25:46 +08:00
Rankin Zheng
49e84dea42
Merge pull request #76 from covespace/refactor-ui
Refactor UI
2023-05-18 14:04:52 +08:00
Rankin Zheng
dc5c5f091e Refactor SVG imports in ChatPanel
The commit refactors the SVG imports in ChatPanel to remove the unnecessary `assets` folder from the import path.
2023-05-18 14:01:19 +08:00
Rankin Zheng
a780474c2b feat: Update ChatPanel UI
- Update the avatar images to use SVG format
- Use file-loader instead of url-loader to load image assets

The commit updates the ChatPanel UI by replacing the avatar images with SVG format and using file-loader instead of url-loader to load image assets.
2023-05-18 13:58:17 +08:00
Rankin Zheng
795b0a2f4a refactor(chatpanel): update avatar size and margin
- Update avatar size to 'sm' and margin to {marginTop: 10, marginLeft: 3}
- Replace IconRobot and IconUser with avatarDevChat and avatarUser respectively
- Update gap between messages to 'xs'
- Update Divider margin to {my: 3}
2023-05-18 13:09:19 +08:00
Rankin Zheng
89eab11479
Merge pull request #75 from covespace/58-suggesting-commands-while-typing
58 suggesting commands while typing
2023-05-18 11:34:34 +08:00
Rankin Zheng
05b9379df1 feat: Add command menu filtering and keyboard navigation
This commit adds the ability to filter command menus based on user input and navigate through them using the up and down arrow keys. When a command is selected, it is inserted into the input field. The commit also removes the command menu rendering from the initial render and moves it to a useEffect hook.
2023-05-18 11:34:00 +08:00
Rankin Zheng
1aaf8a6ec9 feat: Add popover to ChatPanel
This commit adds a popover to ChatPanel that contains a dropdown menu for commands and contexts. The dropdown menu can be opened by clicking on the ChatPanel's textarea. The dropdown menu contains a list of commands and contexts that can be clicked to insert them into the textarea. The popover also contains a tooltip that provides instructions on how to select code or file and right-click to access the context menu.
2023-05-18 10:31:22 +08:00
bobo.yang
0a8873333c Add diff view and apply code changes functionality
- Implement getDocumentText function to retrieve text from the editor
- Update diffView function to handle temp files and diff view
- Add getNewCode function to handle code changes
- Implement applyCodeChanges and isValidActionString functions
2023-05-18 08:57:13 +08:00
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