63 Commits

Author SHA1 Message Date
bobo.yang
05cf0f2c71 refactor: Improve requirements.txt search & install checks
- Update search logic for requirements.txt prioritizing usr, org, sys directories
- Introduce check to prevent redundant python environment installations
- Add variables for controlling multiple installations in workflows
2023-12-08 10:27:27 +08:00
bobo.yang
74e849e483 Fix path to requirements.txt file 2023-12-07 09:11:21 +08:00
bobo.yang
571a89ec5b don't show error while requirements.txt not exist 2023-12-07 09:11:21 +08:00
bobo.yang
0ee31f1721 fix #51 2023-12-07 09:11:21 +08:00
bobo.yang
381dbea026 Update slash command information message 2023-12-07 09:11:21 +08:00
bobo.yang
1ac83d4d79 check DevChat key whether is valid 2023-12-07 09:11:21 +08:00
bobo.yang
7dac46b0be first check workflow path 2023-11-30 08:13:26 +08:00
bobo.yang
dc1836510d remove command and action extension 2023-11-29 23:34:15 +08:00
bobo.yang
40e6efef8a clear Command python install functions 2023-11-23 13:02:02 +08:00
bobo.yang
407f5d46dd output cost by /ask-code 2023-11-14 17:28:20 +08:00
bobo.yang
60906f9509 fix invalid key error 2023-10-26 22:45:31 +08:00
bobo.yang
3adf655540 update devchat-ask version to 0.1.3 2023-10-14 07:19:50 +08:00
bobo.yang
64bc3b7a26 update devchat-ask version 2023-10-12 08:45:57 +08:00
bobo.yang
0886826da7 call smartqa 2023-10-11 23:51:57 +08:00
bobo.yang
331b72f09f show devchat view before set api key 2023-09-23 09:12:03 +08:00
bobo.yang
b2422b1694 don't clear api key when escape 2023-09-23 08:16:45 +08:00
Jinglei Ren
7a4382a9d1 Update key setting instruction 2023-09-23 08:13:00 +08:00
Jinglei Ren
826b98d1b2
Update text in commands.ts 2023-09-23 07:39:19 +08:00
bobo.yang
547796a54b update key setting flow 2023-09-23 07:22:17 +08:00
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