44 Commits

Author SHA1 Message Date
bobo.yang
650281059c reg command to update valid chat models 2023-09-13 10:08:16 +08:00
bobo.yang
16046ec517 remove unused configuration config 2023-09-13 10:08:16 +08:00
bobo.yang
a7bb815df5 Use access key set by command while no valid key 2023-09-13 10:08:16 +08:00
bobo.yang
4d465a3613 Refactor ask-code-summary feature and remove redundant commands
- Removed redundant commands related to ask-code-summary from package.json.
- Created a new file contextSummary.ts to handle the ask-code-summary context.
- Registered the ask-code-summary context in loadContexts.ts.
- Refactored the ask-code-summary related functions in commands.ts for better code organization and readability.
- Updated the askcode_summary_index.py script to handle target directory for indexing.
2023-08-31 17:52:06 +08:00
bobo.yang
9eee3f1c36 Refactor getUndefinedSymbols and getSymbolDefine functions
- Replaced Chinese comments with English in getUndefinedSymbols function.
- Added new functions matchSymbolInline and getMatchedSymbolPositions to find symbol positions.
- Refactored getSymbolDefine function to use the new functions for finding symbol positions.
- Added a check to avoid pushing the same symbol definition multiple times.
- Moved logger.channel()?.show() to the beginning of registerAskCodeIndexStartCommand and registerAskCodeSummaryIndexStartCommand functions.
2023-08-30 22:57:51 +08:00
bobo.yang
9261a07589 clone commands by run --update-sys 2023-08-30 17:03:22 +08:00
bobo.yang
63fbb1289d Add InstallCommands functionality to DevChat
- Added a new command "InstallCommands" to the package.json file.
- Created a new function "registerInstallCommandsCommand" in commands.ts to handle the execution of the new command.
- The function checks for a directory in the user's home directory, if it exists it performs a git pull, if not it clones a git repository.
- The function is registered in the extension.ts file.
- Added a function "sendCommandListByDevChatRun" in regCommandList.ts to send the command list.
- The new command is executed in the statusBarView.ts file.
- Updated the InputMessage component to register a handler for the 'regCommandList' message.
- Updated the InputStore to handle the new commands and removed the old "regCommandMenus" function.
2023-08-30 16:39:47 +08:00
bobo.yang
427398704b fix #97, update tip text and show output 2023-08-29 15:29:27 +08:00
bobo.yang
48a9f0cb28 Add version check for devchat-ask package
- Added a version check for the devchat-ask package in commands.ts.
- Updated appInstall function in app_install.ts to accept package version.
- Modified installAskCode function in install_askcode.ts to pass package version to appInstall.
- Updated installDevchat function in install_devchat.ts to pass empty string as package version to appInstall.
- Added a new utility function getPackageVersion in pip_package_version.ts to get the installed version of a package.
2023-08-24 10:45:51 +08:00
bobo.yang
9c16bced23 Implement feature toggles for beta commands
- Added feature toggles for beta commands in the package.json file.
- Implemented dynamic registration of commands based on feature toggles.
- Added error messages for users trying to access beta commands without the correct permissions.
- Updated the version of the devchat-ask package based on the feature toggles.
- Created a new featureToggle handler to manage feature toggles.
2023-08-24 10:45:51 +08:00
bobo.yang
6713a98df9 Add commands for DevChat
- Added commands for adding context and summary to DevChat.
- Updated the package.json file to include the new commands.
- Added command handlers for indexing and describing codebase summaries.
- Created a new file, askcode_summary_index.py, for indexing and describing codebase summaries.
- Added a new setting file, _setting_.json, for the summary action in the auto_command workflow.
- Added a new handler file, handler.py, for the summary action in the auto_command workflow.
2023-08-21 11:52:00 +08:00
bobo.yang
3bf09924d7 Refactor commands.ts
- Update the registerAskCodeIndexStartCommand function to pass the progressBar object to the installAskCode and indexCode functions.
- Update the installAskCode function to accept the progressBar object as a parameter.
- Update the indexCode function to accept the progressBar object as a parameter.
- Update the progress bar messages in the registerAskCodeIndexStartCommand function.
2023-08-21 11:52:00 +08:00
bobo.yang
9a6a8ea8db Add ProgressBar class
- Create a new ProgressBar class to handle progress reporting.
- Initialize the progress bar with a title and location.
- Implement the init() method to start the progress bar.
- Implement the update() method to update the progress message.
- Implement the end() method to end the progress bar.
- Implement the endWithError() method to end the progress bar with an error message.
2023-08-21 11:52:00 +08:00
bobo.yang
986848fea9 install askcode by conda 2023-08-21 11:52:00 +08:00
bobo.yang
6b96d911f0 Implement updateLastModifyTime function and status bar item
- Added a new function updateLastModifyTime in askCodeUtil.ts to update the last modification time of files.
- The function ignores hidden files and directories (those starting with '.').
- The function creates the directory if it does not exist before writing the file.
- Added a new status bar item for AskCode in statusBarView.ts.
- The status bar item checks the indexing status every 10 seconds and updates its tooltip and command accordingly.
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
e2e761fd16 Separate handling for OpenAI and DevChat API keys
- Renamed and split the API key settings in package.json into DevChat and OpenAI specific keys.
- Updated the commands for setting API keys to handle OpenAI and DevChat keys separately.
- Modified the ApiKeyManager to handle and validate OpenAI and DevChat keys separately.
- Updated the status bar view to use the DevChat access key command.
- Adjusted the tests to reflect the new handling of API keys.
2023-08-03 15:09:34 +08:00
bobo.yang
bef66fb80e Update API key validation and handling
- Modified the API key validation logic to check for non-empty strings before validating.
- Updated the API key prefix from 'sk.' to 'sk-' in the ApiKeyManager and corresponding tests.
- Adjusted the test cases to reflect the new API key format.
2023-08-03 10:58:18 +08:00
bobo.yang
7fe536f9d8 Include start line in code selection context
- Added start line parameter to handleCodeSelected function.
- Updated all calls to handleCodeSelected to include the start line.
- The start line is now included in the context data for symbol references and definitions.
2023-07-24 08:16:47 +08:00
bobo.yang
6650a5f253 save work 2023-07-24 00:11:56 +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
8bc7f63c09 Add API key validation and pip installation check
- Added a check in commands.ts to validate the API key when setting it.
- If the API key is invalid, an error message is displayed to the user.
- Added a function in install.py to ensure pip is installed.
- This function attempts to install and upgrade pip using the ensurepip module.
- The function is called at the beginning of the main function in install.py.
2023-07-06 07:42:44 +08:00
bobo.yang
892c3638cc Add command to set Python Path in DevChat configuration
- Added a new command 'devchat.PythonPath' in commands.ts.
- This command prompts the user to input a Python Path and updates the DevChat configuration with the provided path.
- The new command is registered in the extension.ts file.
2023-07-06 07:42:44 +08:00
bobo.yang
ae15158fe5 Replace 'path' with 'fsPath' in registerAddContextCommand
- Update callback function to use 'fsPath' instead of 'path'.
- Modify sendFileSelectMessage call to pass 'uri.fsPath'.
2023-06-13 11:05:42 +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
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
562a125902 handle vscode 2023-05-31 16:10:53 +08:00
bobo.yang
cad2bbb69d refactor code 2023-05-31 16:10:53 +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
67ce9a91bd update setting item name 2023-05-28 13:28:41 +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
bobo.yang
94413e6f1f install by pipx 2023-05-19 13:09:58 +08:00
bobo.yang
e3c9f69822 Update package version and improve installation process
- Bump package version from 0.0.34 to 0.0.38.
- Change pip3 install command to include --upgrade flag.
- Add check for DevChatPath configuration before setting status to ready.
2023-05-18 22:25:29 +08:00
bobo.yang
0b6d783fb1 Update DevChat commands and webview options
- Change DevChat.OPENAI_API_KEY title and add category
- Replace devchat.openChatPanel command with devchat-view.focus
- Update statusBarItem.command to devcaht.onStatusBarClick
- Set webviewOptions with retainContextWhenHidden: true for DevChatViewProvider
2023-05-16 17:49:13 +08:00
bobo.yang
6695bf1ae7 save work 2023-05-16 14:35:37 +08:00
bobo.yang
fa3c0a38be Support status item action 2023-05-16 14:24:24 +08:00
bobo.yang
7fcf57772e Update package.json and commands for Chinese support
- Add activationEvents to package.json for better extension activation
- Add Chinese commands for addConext, askForCode, and askForFile
- Register Chinese commands in contributes/commands.ts
- Set isChineseLocale context based on the user's locale
2023-05-16 10:40:57 +08:00
bobo.yang
cf6c6ac00a auto install devchat 2023-05-12 10:56:24 +08:00
bobo.yang
459ec88c04 sett openai api key while openaiApiKey is invlaid 2023-05-11 16:55:15 +08:00
bobo.yang
eca629b4f3 check dependence only once 2023-05-11 10:27:54 +08:00
bobo.yang
fba9621c4a check devchat and openai key before chat 2023-05-10 19:25:11 +08:00
bobo.yang
bac73dadb1 refactor code 2023-05-05 21:27:40 +08:00