613 Commits

Author SHA1 Message Date
Rankin Zheng
b170623bce Refactor: Extract CodeButtons component in ChatPanel
Extracted the CodeButtons component from the chatPanel function in the ChatPanel/index.tsx file.
Replaced the previous inline implementation with the new CodeButtons component.
CodeButtons component includes CommitButton, DiffButton, CodeApplyButton, FileApplyButton, and CodeCopyButton.
2023-06-05 17:25:47 +08:00
Rankin Zheng
3bda063a2e Refactor: Extract LanguageCorner component in CodeBlock
Extracted the LanguageCorner component from the CodeBlock function in the ChatPanel/index.tsx file.
Replaced the previous inline implementation with the new LanguageCorner component.
2023-06-05 17:15:28 +08:00
Rankin Zheng
32af336585 Refactor: Extract CodeBlock component in ChatPanel
Extracted the CodeBlock component from the chatPanel function in the ChatPanel/index.tsx file.
Replaced the previous inline implementation with the new CodeBlock component.
2023-06-05 17:09:40 +08:00
boob.yang
f7bc5d08fc
Merge pull request #153 from covespace/log_history_load_error
Add logger to TopicManager for better error handling
2023-06-05 14:07:42 +08:00
bobo.yang
34066c5597 Add logger to TopicManager for better error handling
- Imported logger from '../util/logger' in topicManager.ts.
- Added logger.channel()?.info() for "Topic not found" cases.
2023-06-05 14:05:55 +08:00
boob.yang
f82512f63c
Merge pull request #151 from covespace/fix_topic_error
Fix topic error
2023-06-05 12:37:15 +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
3c63fb4c61 Fix history message repeat 2023-06-05 11:25:04 +08:00
bobo.yang
2aca2d3db5 don't append partial response before error 2023-06-05 09:17:58 +08:00
boob.yang
ac8992f4f6
Merge pull request #146 from covespace/optimize_command_show
fix log miss in history messages
2023-06-02 14:08:55 +08:00
bobo.yang
f91abd1002 fix log miss in history messages 2023-06-02 14:07:20 +08:00
boob.yang
f5576c9c28
Merge pull request #145 from covespace/optimize_command_show
Add args property to Command interface and update regCommandList
2023-06-02 13:46:36 +08:00
bobo.yang
1c6e002373 Add args property to Command interface and update regCommandList
- Added args property to Command interface in commandManager.ts and customCommand.ts.
- Updated regCommandList handler to convert command patterns with args.
- Replaced {{prompt}} with an array of empty strings based on the args count.
2023-06-02 13:45:12 +08:00
boob.yang
17b1d547fd
Merge pull request #143 from covespace/add_filter_tree_context
add tree context
2023-06-02 13:13:13 +08:00
bobo.yang
6d57aaeb1f add tree context 2023-06-02 13:12:23 +08:00
boob.yang
5c4e13d6ac
Merge pull request #141 from covespace/devchat_extension
Devchat extension
2023-06-02 12:55:41 +08:00
bobo.yang
f7b26755db Update chatConfig.ts to prevent overwriting existing files
- Modified copyFileSync() to check if the target file exists before writing.
- Commented out the return statement in createChatDirectoryAndCopyInstructionsSync() to allow copying workflows.
2023-06-02 12:34:57 +08:00
boob.yang
8678183865
Merge pull request #139 from covespace/history_in_page
Refactor historyMessages and historyMessagesBase
2023-06-02 11:16:20 +08:00
bobo.yang
cd6c091d68 Refactor historyMessages and historyMessagesBase
- Updated historyMessages to handle pagination with skip and maxCount.
- Exported LoadHistoryMessages interface from historyMessagesBase.
- Added setTopic and getTopic methods to messageHistory class.
- Implemented loadTopicHistoryFromCurrentMessageHistory function.
2023-06-02 11:15:04 +08:00
bobo.yang
3c5e44273a Implement ActionManager and CustomActions classes
- Added ActionManager class to manage and apply actions.
- Implemented CustomActions class to parse and handle custom actions.
- Created applyAction and regActionList handlers for action execution and registration.
2023-06-02 09:58:44 +08:00
bobo.yang
a66127ffc9 Add CustomContexts class and related test cases
- Implemented CustomContexts class to handle custom contexts.
- Added methods to parse, get, and handle custom context commands.
- Created test cases for CustomContexts class in customContext.test.ts.
2023-06-02 09:58:44 +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
7e7f7e6a91 Add methods for active file path, selected range, and selected text
- Added activeFilePath() method to get the current active file path.
- Added selectRange() method to get the current selected range as an offset from the file start.
- Added selectText() method to get the current selected text.
2023-06-02 09:58:44 +08:00
bobo.yang
b2ba9e148d Support env var and prompt input for command 2023-06-02 09:58:44 +08:00
boob.yang
e06e35f8f9
Merge pull request #134 from covespace/fix_unit_test
fix test cases
2023-05-31 17:01:33 +08:00
bobo.yang
a349d8dd29 fix test cases 2023-05-31 16:57:39 +08:00
boob.yang
9a4840c514
Merge pull request #133 from covespace/refactor_code2
Refactor code2
2023-05-31 16:32:49 +08:00
bobo.yang
c46d29bf20 Improve history message handling and topic view
- Add check for current topic change during history load.
- Return undefined if no log entries found.
- Add check/uncheck icons for topic view items.
- Update TopicTreeDataProvider to handle item selection.
2023-05-31 16:10:53 +08:00
bobo.yang
23409abd0c Update title and placeholder for API key input
- Change title from "DEVCHAT_API_KEY" to "Input Access Key".
- Add placeholder text "Set OPENAI_API_KEY (or DevChat Access Key)".
2023-05-31 16:10:53 +08:00
bobo.yang
3136748f72 Update ESLint rules and error handling
- Remove "no-unused-vars" and "no-unused-expressions" from .eslintrc.json.
- Simplify error handling in devchat.ts by returning stderr directly.
- Remove "noUnusedLocals" and "noUnusedParameters" from tsconfig.json.
2023-05-31 16:10:53 +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
bobo.yang
562a125902 handle vscode 2023-05-31 16:10:53 +08:00
bobo.yang
cad2bbb69d refactor code 2023-05-31 16:10:53 +08:00
Jinglei Ren
b658fcbc17
Update README.md 2023-05-31 13:15:28 +08:00
Jinglei Ren
623b5b2e2b
Update README.md 2023-05-31 13:14:02 +08:00
boob.yang
2adb1b4e6a
Merge pull request #124 from covespace/keep_response_while_error
Improve handling of partial chat responses and topic creation
2023-05-29 08:53:12 +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
boob.yang
3768c9f97c
Merge pull request #123 from covespace/confirm_delete_topic
Confirm delete topic
2023-05-28 22:09:26 +08:00
bobo.yang
44f3db43b2 Truncate topic label to 20 characters in delete confirmation dialog
- Check if item.label exists and use item.label.label or 'Unknown Topic'.
- Truncate the label to 20 characters and add ellipsis if needed.
- Update the confirmation message to display the truncated label.
2023-05-28 22:01:32 +08:00
bobo.yang
ceafac1362 Add confirmation dialog before deleting a topic
- Replace the previous deleteTopic command with a new callback function.
- Use vscode.window.showWarningMessage to display a confirmation dialog.
- Execute the delete operation only if the user confirms.
2023-05-28 21:46:44 +08:00
boob.yang
8d39250133
Merge pull request #122 from covespace/update_devchat_check_condition
Add isVersionChangeCompare flag to extension.ts
2023-05-28 14:31:21 +08:00
bobo.yang
2393091dc1 Add isVersionChangeCompare flag to extension.ts
- Added a new flag isVersionChangeCompare to prevent duplicate version checks.
- Updated the condition to check for version changes only when the flag is false.
2023-05-28 14:30:39 +08:00
boob.yang
e32fede416
Merge pull request #121 from covespace/replace_version_key
Update key names in secretStorage
2023-05-28 14:10:05 +08:00
bobo.yang
f326cf9ef3 Update key names in secretStorage
- Replace "devchat_version_old" with "DevChatVersionOld".
- Update related variable names and function calls.
2023-05-28 14:03:03 +08:00
boob.yang
52ae15bf4c
Merge pull request #120 from covespace/use_devchat_token
Use devchat token
2023-05-28 13:47:07 +08:00
bobo.yang
dc1cab2bac Fix function name and API key prefix check
- Rename checkOpenAIKey to checkOpenaiKey in contributes/commands.ts.
- Update apiKey.startsWith condition to check for "DC." instead of "dc-" in toolwrapper/devchat.ts.
2023-05-28 13:45:29 +08:00
bobo.yang
f86992aec1 set default devchat proxy url 2023-05-28 13:28:41 +08:00