333 Commits

Author SHA1 Message Date
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
bobo.yang
934bae9cc0 Update package.json and devchat.ts
- Add @types/uuid dependency to package-lock.json.
- Update API key description in package.json.
- Rename API_BASE to API_ENDPOINT in package.json and devchat.ts.
2023-05-28 13:28:41 +08:00
bobo.yang
67ce9a91bd update setting item name 2023-05-28 13:28:41 +08:00
boob.yang
23277e2b85
Merge pull request #118 from covespace/Change-access-key-prefix-'dc-'-to-'DC.'
Change access key prefix 'dc ' to 'dc.'
2023-05-28 13:13:30 +08:00
bobo.yang
15230c80a3 Refactor messageHandler to check OpenAI API key
- Import checkOpenaiApiKey function from contributes/commands.
- Update sendMessage condition to include checkOpenaiApiKey.
2023-05-28 13:12:05 +08:00
boob.yang
84e41ab54f
Merge pull request #119 from covespace/fix_devchat_install_error
Improve secretStorage usage and pipx installation
2023-05-28 10:11:19 +08:00
bobo.yang
a9fa1c7abb Improve secretStorage usage and pipx installation
- Add await keyword to secretStorage.store call in extension.ts.
- Set statusBarItem.command to undefined instead of an empty string.
- Force pipx installation in install.py by adding --force flag.
2023-05-28 09:58:53 +08:00
Jinglei Ren
50b8ae8185 Unify naming convension ('openai'/'Openai', no 'openAi'/'openAI') 2023-05-28 08:32:12 +08:00
Jinglei Ren
fdc65c998c Refine comments 2023-05-28 08:18:14 +08:00
Jinglei Ren
6ccfa14824 Rename 'Setted' to 'Set' 2023-05-28 07:54:53 +08:00
Jinglei Ren
5f438c0b6c
Replace 'dc-' with 'DC.' in historyMessages.ts
Update related message text as well.
2023-05-28 07:43:41 +08:00
boob.yang
88b16d53c3
Merge pull request #114 from covespace/add_path_property
Improve showDiff.ts functionality and readability
2023-05-25 14:19:27 +08:00
bobo.yang
dbc0b46bd1 Improve showDiff.ts functionality and readability
- Add fs and util imports for file handling.
- Refactor diffView function to support tarFile parameter.
- Implement getFileContent function for reading file content.
- Update getNewCode function to handle message.fileName.
- Adjust showDiff and blockApply functions to use message.fileName.
2023-05-25 14:13:30 +08:00
boob.yang
16c9e2ae26
Merge pull request #112 from covespace/support_multi_topic
Add topic management features to DevChat extension
2023-05-24 13:12:23 +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
Jinglei Ren
bab7594eab
Update README.md 2023-05-23 23:59:36 +08:00
Jinglei Ren
145b65f47b
Update README.md 2023-05-23 23:56:25 +08:00
Rankin Zheng
97ad0dc5a4
Merge pull request #111 from covespace/regeneration
Add error handling and regeneration button to ChatPanel
2023-05-23 21:14:25 +08:00
Rankin Zheng
022218d425 Add error handling and regeneration button to ChatPanel
- Import IconRotateDot from @tabler/icons-react
- Add hasError state to track if an error occurred
- Update receiveMessage handler to set hasError state if message.isError is true
- Add regeneration button with IconRotateDot when hasError is true
- Add onClick handler for regeneration button to clear error and request regeneration
2023-05-23 21:13:49 +08:00
boob.yang
5dfc11dba9
Merge pull request #110 from covespace/support_regeneration
Support regeneration
2023-05-23 11:21:27 +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
boob.yang
6d7bd793da
Merge pull request #108 from covespace/refactor_code
Refactor code
2023-05-23 10:58:21 +08:00
bobo.yang
a3ee988167 add modify_actions command to test diff 2023-05-23 10:55:53 +08:00
bobo.yang
25915cec29 update apply diff logic 2023-05-23 08:59:42 +08:00
boob.yang
1ea353cfd9
Merge pull request #107 from covespace/replace_dtm_with_git
replace dtm with git
2023-05-22 13:18:35 +08:00
bobo.yang
58b5e2f45b replace dtm with git 2023-05-22 13:14:51 +08:00
boob.yang
ccddfbe82e
Merge pull request #106 from covespace/ci
Fix The Publish Workflow
2023-05-21 22:58:02 +08:00
Daniel Hu
fb5a17b888 skip confirm step in publish process 2023-05-21 22:44:01 +08:00
Daniel Hu
c8223faa51 fix npm dependency error 2023-05-21 22:18:19 +08:00
Daniel Hu
7539780245 fix publish ci workflow 2023-05-21 22:01:04 +08:00