948 Commits

Author SHA1 Message Date
bobo.yang
e3a94d1f76 handle exception in dtm 2023-05-08 17:18:48 +08:00
bobo.yang
93b1939bc3 fix parent hash error 2023-05-08 16:57:20 +08:00
bobo.yang
84c9852167 apply code to specified file 2023-05-08 14:03:29 +08:00
bobo.yang
5ed230a071 add file field for contextDetailResponse message 2023-05-08 13:16:34 +08:00
bobo.yang
22e334e1f6 save context as json 2023-05-08 12:48:59 +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
bobo.yang
6f0dca9788 update to lastest devchat 2023-05-08 09:51:10 +08:00
Rankin Zheng
6328b868c8 feat: Add copy button to code blocks
Add a copy button to code blocks in ChatPanel.tsx. The copy button allows users to easily copy code snippets to their clipboard. The button is implemented using the CopyButton component from @mantine/core and the IconCopy and IconCheck components from @tabler/icons-react.
2023-05-07 20:00:51 +08:00
Rankin Zheng
9712d9a976 feat: Add react-syntax-highlighter and react-markdown to package.json
Add react-syntax-highlighter and react-markdown to package.json to enable syntax highlighting and markdown rendering in the chat panel.

Also, update ChatPanel.tsx to use ReactMarkdown instead of Remark for markdown rendering. Additionally, add SyntaxHighlighter from react-syntax-highlighter to render code blocks with syntax highlighting.
2023-05-07 18:27:01 +08:00
Rankin Zheng
287c4f1762 feat: Add focus to input on load and new commands to command menu
Add focus to input on load and new commands to command menu. Also, added new icons to the plus menu.
2023-05-07 01:19:48 +08:00
Rankin Zheng
5e78696e4f feat: Add message handling and display in chat panel
This commit adds message handling for sending and receiving messages between the chat panel and the extension. It also displays the messages in the chat panel. The messages are displayed as a list of messages, with each message containing an avatar and the message content. The message content is displayed using the `Remark` component from the `react-remark` library.
2023-05-07 00:50:03 +08:00
Rankin Zheng
63630ef5e7 Refactor file structure
Rename src/views to src and move index.html and index.tsx to the root directory.
2023-05-06 17:32:01 +08:00
Rankin Zheng
d2c0ee9d02
Merge branch 'covespace:main' into message-handler 2023-05-06 17:19:47 +08:00
Rankin Zheng
12f4cfbd11 refactor: Create a singleton instance for MessageUtil
Create a singleton instance for MessageUtil to avoid multiple instances of the class. The instance is created only once and returned on subsequent calls. This commit also removes the creation of a new instance of MessageUtil in ChatPanel.tsx.
2023-05-06 17:03:25 +08:00
Rankin Zheng
0630da3b09
Merge branch 'main' into chat-messages 2023-05-06 00:42:49 +08:00
Rankin Zheng
dd3ac3dd7c feat: Add message sending and receiving functionality
Create a MessageUtil class to handle sending and receiving messages between the extension and the chat panel. Add a function to send messages to the extension and register message handlers to receive messages from the extension. When the user clicks the send button, send the message to the extension. When the extension sends a message, add it to the chat UI as a bot message.
2023-05-06 00:32:53 +08:00
Rankin Zheng
b405e41ebf Merge branch 'chat-messages' of https://github.com/runjinz/devchat-vscode into chat-messages 2023-05-06 00:00:38 +08:00
Rankin Zheng
9fa3c8fba2 Add react-remark package and use it to render markdown in ChatPanel 2023-05-06 00:00:25 +08:00
bobo.yang
bac73dadb1 refactor code 2023-05-05 21:27:40 +08:00
Rankin Zheng
fa52479a3f
Merge branch 'covespace:main' into chat-messages 2023-05-05 19:34:16 +08:00
bobo.yang
2c86cbbb4e add diff with selection 2023-05-05 16:52:25 +08:00
bobo.yang
9580250bb0 add default instructions 2023-05-05 15:34:22 +08:00
boob.yang
2b7752608e
Merge pull request #16 from covespace/add_config
Add config
2023-05-05 15:02:59 +08:00
bobo.yang
ac98b9674f use value in config 2023-05-05 15:00:46 +08:00
bobo.yang
91876443ac support diff view action 2023-05-05 12:28:11 +08:00
Rankin Zheng
6f998ef956 feat: Add avatars and icons to chat panel
Add avatars and icons to the chat panel to improve the user interface. Also, add a demo code block to show how to use the Button component. The demo code block is currently commented out.
2023-05-05 09:48:05 +08:00
Rankin Zheng
6eef4b2a78 feat: Add command menu to ChatPanel
Add a command menu to ChatPanel that allows users to access DevChat bots and run context commands. The command menu is displayed when the user types a command that starts with '/'. The menu includes commands for generating or updating code, writing a commit message, and writing a doc for reference, wiki, or discussion. The menu is styled using the existing ChatPanel styles.
2023-05-05 07:41:56 +08:00
Rankin Zheng
4829b8d44d feat: Add chat panel and menu
Add a chat panel with a menu and input field for sending messages. The menu contains options for settings, messages, gallery, and search. The chat panel also includes a list of instructions and a button for adding new messages.
2023-05-05 01:10:02 +08:00
bobo.yang
0d59445cef add context implementation 2023-05-04 17:47:57 +08:00
bobo.yang
4b842048a8 add context by menu 2023-05-04 17:47:57 +08:00
bobo.yang
2799d30c08 don't copy instructions again 2023-05-04 17:46:06 +08:00
bobo.yang
06215450ad support user definded instructions 2023-05-04 17:46:06 +08:00
bobo.yang
101638b161 add doCommit message 2023-05-04 17:38:07 +08:00
bobo.yang
ed4b55a8f3 support commitmsg code block 2023-05-04 17:38:07 +08:00
bobo.yang
05bee3880b add commit message command 2023-05-04 17:38:07 +08:00
bobo.yang
7f6a423045 update devchat options 2023-05-04 17:38:07 +08:00
Rankin Zheng
84222db4cc refactor: Refactor VSCode extension using React. 2023-05-04 16:09:19 +08:00
bobo.yang
9abcf1f28a Support commands extension 2023-05-03 19:27:06 +08:00
bobo.yang
5f154777f6 release 0.0.1 2023-04-27 14:07:46 +08:00
bobo.yang
ce4634767c replace GTP call with devchat 2023-04-26 06:48:39 +08:00
bobo.yang
f03b2574d1 update chat style, and support edit history msg 2023-04-25 08:08:40 +08:00
bobo.yang
1cf84e5f71 handle different panel with unique name 2023-04-22 21:15:08 +08:00
bobo.yang
3a3d6ee400 store api key in .env 2023-04-22 08:37:27 +08:00
bobo.yang
0ba5c6c377 Updated the ChatPanel class, connected to the GPT model using the openai package, and modified the chatWithGPT function to accept conversation history and user roles for better context-aware responses. 2023-04-22 07:53:20 +08:00
admin
4075819c79 Implement chat UI in VSCode extension with improved styling 2023-04-21 06:51:57 +08:00
Jinglei Ren
0d15c4550c Add prompt command 2023-04-14 09:29:10 +08:00
Jinglei Ren
561ec4b505 Scaffold the VS Code extension 2023-04-14 08:11:05 +08:00