29 Commits

Author SHA1 Message Date
bobo.yang
16046ec517 remove unused configuration config 2023-09-13 10:08:16 +08:00
bobo.yang
1574253e85 Implement various enhancements and fixes across multiple files
- In runVSCodeCommand.ts, added a condition to convert the first argument to a Uri if the command is 'vscode.open'.
- In sendMessage.ts, added logic to prepend the previous command to the message text if the message starts with '/'.
- In commonUtil.ts, modified the spawnAsync function to replace arguments starting with '$' with their corresponding environment variable values.
- In handler.py, added code to create parent directories for a new file if they don't exist.
2023-08-31 15:15:12 +08:00
bobo.yang
b837365427 Add PythonVirtualEnv configuration and improve error handling
- Added PythonVirtualEnv configuration to customAction.ts.
- Improved error handling in doCommand.ts by using logger instead of console.error.
- Updated sendMessage.ts to handle askCode command and improved error handling.
- Added environment variables for OPENAI_API_KEY and OPENAI_API_BASE in commonUtil.ts.
- Created new action 'query_data' in _setting_.json and its handler in handler.py.
2023-08-21 11:52:00 +08:00
bobo.yang
1f7bd4ac03 Implemented AskCode Indexing Commands
- Added new functions to register AskCode Index start and stop commands in commands.ts.
- Implemented functions to install AskCode and index code.
- Added function to get configuration settings for Python virtual environment and supported file types.
- Updated sendMessage.ts to handle 'askCode' command and execute AskCode query.
2023-08-21 11:52:00 +08:00
bobo.yang
1f5cf7ebbe Clear contextInfo in sendMessage
- Modified the sendMessage function in the sendMessage.ts file.
- Added code to clear the message.contextInfo property before sending the message.
2023-08-21 08:31:52 +08:00
bobo.yang
63fa9b1bd2 Add tracking and deletion of temporary files in sendMessage function
- Added a new array `tempFiles` to store the names of temporary files created during the execution of the `sendMessage` function.
- When a new temporary file is created, its name is added to the `tempFiles` array.
- After the message is sent, the function iterates over the `tempFiles` array and deletes each file.
- This ensures that only the temporary files created during the execution of the function are deleted.
2023-07-27 12:47:56 +08:00
bobo.yang
716895045a Add temporary file handling for contextInfo in sendMessage
- Added createTempFile and deleteTempFiles functions in sendMessage.ts.
- Modified sendMessage function to handle contextInfo field in the message.
- If the file name is not present in the context, a temporary file is created.
- The file name is inserted into the text field of the message.
- All temporary files created are deleted after the message is sent.
- Modified handleSendClick function in InputMessage.tsx to process and send the message to the extension.
- Modified startGenerating reducer in chatSlice.ts to send the message with contextInfo.
2023-07-27 08:11:40 +08:00
bobo.yang
cda646f830 Support GPT-4-0613 function calls 2023-07-24 00:11:56 +08:00
bobo.yang
0ceab66eb6 Fix deleteChatMessage functionality
- Changed the deleteChatMessageBase function call to be awaited.
- Adjusted the condition to send a 'deletedChatMessage' command only when the message is successfully deleted.
2023-07-18 22:54:08 +08:00
bobo.yang
3819d7679c Refactor parent hash handling in sendMessageBase.ts
- Replaced the getParentHash function with direct access to message.parent_hash.
- Updated the handleTopic function to accept undefined parentHash.
- This simplifies the code and makes the parent hash handling more straightforward.
2023-07-17 20:31:01 +08:00
bobo.yang
1957ddd280 Add delete chat message functionality
- Removed 'Cancel' option from topicDeleteCallback in commands.ts.
- Imported deleteChatMessage in loadHandlers.ts and registered it as a handler.
- Added deleteChatMessage function in sendMessage.ts to prompt user for confirmation before deleting a message.
- Added deleteChatMessageBase function in sendMessageBase.ts to delete a message from messageHistory and by devchat.
- Added delete function in devchat.ts to delete a message by hash.
- Added delete function in messageHistory.ts to remove a message from history by hash.
2023-07-17 18:56:56 +08:00
bobo.yang
ba097eab26 add unit tests for src 2023-05-31 16:10:53 +08:00
bobo.yang
82faf14eb6 Separate VSCode from core logic for ISSUE #125
- Extract VSCode-related code from core logic.
- Improve modularity for easier unit testing.
2023-05-31 16:10:53 +08:00
bobo.yang
c2feaccc58 Improve handling of partial chat responses and topic creation
- Store partial chat response data in a separate variable.
- Concatenate partial data with responseText when chatResponse.isError is true.
- Comment out setCurrentTopic call in topicManager.ts.
2023-05-29 08:51:53 +08:00
bobo.yang
08d4eedaa9 Add topic management features to DevChat extension
- Implement Topic and TopicManager classes.
- Add TopicTreeDataProvider and TopicTreeItem classes.
- Register new commands for topic management.
- Update package.json with new commands and dependencies.
2023-05-24 13:04:15 +08:00
bobo.yang
daf106c629 add regeneration message 2023-05-23 11:20:23 +08:00
bobo.yang
42fec8a6cc update handler to user stop message 2023-05-23 11:20:17 +08:00
bobo.yang
2f7d3a99a2 open DevChat by sidebar 2023-05-16 14:35:01 +08:00
bobo.yang
0056c3ce52 don't return error while user stop devchat 2023-05-11 14:51:18 +08:00
bobo.yang
93714a2255 filter ``\ncommitmsg to ``commitmsg 2023-05-11 10:26:13 +08:00
bobo.yang
5c7c273b20 reg message type info for debug 2023-05-10 17:56:56 +08:00
bobo.yang
a59ee8f9fd fix instruction path error 2023-05-10 15:57:02 +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
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
bobo.yang
13c4453651 Refactor sendMessage and improve DevChat response handling
- Import ChatResponse from DevChat in sendMessage.ts
- Update sendMessage function to handle parent_hash and partial responses
- Refactor DevChat.chat to parse response data and handle partial stdout
- Remove unused lastPromptHash variable
2023-05-09 13:24:33 +08:00
bobo.yang
59d1a0eb3e add log 2023-05-09 10:34:33 +08:00
bobo.yang
93b1939bc3 fix parent hash error 2023-05-08 16:57:20 +08:00
bobo.yang
4465d75c5a filter invalid editor 2023-05-08 12:09:52 +08:00
bobo.yang
bac73dadb1 refactor code 2023-05-05 21:27:40 +08:00