21 Commits

Author SHA1 Message Date
bobo.yang
9964a1891e fix timestampt while insert log 2023-10-11 23:51:58 +08:00
bobo.yang
c9f01f7373 Insert ask-code result to devchat 2023-10-11 23:51:57 +08:00
bobo.yang
e6c7d4c73b Fix variable naming inconsistency
- Corrected the variable name from 'WaitCreateTopic' to 'waitCreateTopic' for consistency.
2023-07-24 08:18:48 +08:00
bobo.yang
035952e688 Remove function_call handling from sendMessageBase.ts
- Removed the specific handling for chatResponse.finish_reason === "function_call" in handlerResponseText and sendMessageBase functions.
- This specific handling was unnecessary and was causing confusion.
2023-07-24 00:11:56 +08:00
bobo.yang
cda646f830 Support GPT-4-0613 function calls 2023-07-24 00:11:56 +08:00
bobo.yang
3462248cb8 update unit test 2023-07-24 00:11:56 +08:00
bobo.yang
1a75347bd1 Refactor variable names and improve condition checks
- Rename WaitCreateTopic to waitCreateTopic for consistency.
- Update condition check to use parsedMessage.instruction.
2023-07-24 00:11:56 +08:00
bobo.yang
c1b8ee2f88 Update message deletion and topic management
- Added a check in deleteChatMessageBase to remove the message from the current topic if deletion is successful.
- Modified updateFirstMessageHashAndName in Topic class to accept undefined values.
- Added a new method deleteMessage in TopicManager to update the topic when a message is deleted.
2023-07-21 17:17:43 +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
01c2fc545b let userStop to false before sendMessage 2023-06-09 12:09:18 +08:00
bobo.yang
f510d1de62 Explicitly define array types in sendMessageBase.ts
- Change contextPaths, instructionPaths, and referencePaths to explicitly define string[] type.
2023-06-09 10:45:17 +08:00
bobo.yang
568c7d1255 Refactor handlerResponseText condition check
- Remove unnecessary empty string check in sendMessageBase.ts.
- Simplify condition to only check for chatResponse.isError.
2023-06-06 11:14:36 +08:00
bobo.yang
af3038dbd1 Add parseDateStringToTimestamp function
- Update sendMessageBase.ts with the new function.
- Replace Date.parse with parseDateStringToTimestamp.
- Fix string comparison with strict equality.
2023-06-06 10:51:38 +08:00
bobo.yang
06afafb937 Fix message header assignment condition
- Changed condition in parseMessageAndSetOptions function.
- Now correctly assigns chatOptions.header based on message.text.
2023-06-05 11:37:14 +08:00
bobo.yang
9546cfb7ba Add wait flag for topic creation and update UI
- Added WaitCreateTopic flag to prevent UI updates during topic creation.
- Updated DevChatViewProvider to check for WaitCreateTopic flag.
- Added onSelectChanged method in TopicTreeDataProvider.
- Enabled setCurrentTopic in TopicManager.
2023-06-05 11:36:45 +08:00
bobo.yang
2aca2d3db5 don't append partial response before error 2023-06-05 09:17:58 +08:00
bobo.yang
cbd3b8fc77 Update unspecified changes
- This commit message is a placeholder for unspecified changes.
- Please provide more context or specific changes to create a more accurate commit message.
2023-06-02 09:58:44 +08:00
bobo.yang
ba097eab26 add unit tests for src 2023-05-31 16:10:53 +08:00
bobo.yang
7a72ebcabe append error to response text 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