957 Commits

Author SHA1 Message Date
Rankin Zheng
778ba44124 Refactor InputMessage component
- Adjust the styling of the rightSection in the InputMessage component
- Remove duplicate Indicator and ActionIcon for the context menus
- Add marginLeft to the send button for proper spacing
2023-09-13 20:47:22 +08:00
Rankin Zheng
b5a0cb60f9 Update InputMessage component and ChatStore
- Update InputMessage component to include modelMenus in the input object
- Add fetchModelMenus action to InputStore to fetch model menus
- Update ChatStore to set the default chatModel to 'GPT-3.5'
2023-09-13 20:47:22 +08:00
Rankin Zheng
4004f83fbe Update Header component styling
- Remove commented out borderBottom and boxShadow styles.
- Update borderBottom style to use a solid line with color #ced4da.
- Adjust padding of the Flex component for better alignment.
2023-09-13 20:47:22 +08:00
Rankin Zheng
c640a4b4f1 Refactor CurrentMessage component
- Import Box component from "@mantine/core".
- Remove unused imports and dependencies.
- Update the returned JSX structure and layout.
- Adjust styling and spacing of components.
- Remove unused code and dependencies.
2023-09-13 20:47:22 +08:00
Rankin Zheng
b5ab675d80 Refactor ChatPanel component
- Import necessary components from @mantine/core and @tabler/icons-react.
- Remove unused imports and dependencies.
- Update the returned JSX structure and layout.
- Adjust styling and spacing of components.
- Remove unused code and dependencies.
2023-09-13 20:47:22 +08:00
Rankin Zheng
2e122c772b Update MessageList component
- Import CurrentMessage component from "@/views/components/CurrentMessage".
- Remove unused chatPanelWidth prop.
- Wrap the returned JSX in a Stack component for spacing and margin.
- Add CurrentMessage component at the end of the Stack.
- Adjust styling and layout of components.
- Remove unused code and dependencies.
2023-09-13 20:47:22 +08:00
Rankin Zheng
daaef43d73 Add missing Mantine components and remove unused code
- Import Chip, Group, Button, UnstyledButton, and Menu components from Mantine/core.
- Import IconDatabase, IconTextPlus, and IconRobot from @tabler/icons-react.
- Remove handlePlusClick function and its usage.
- Remove contextMenusNode and its usage.
- Remove unused onClose and onOpen props from Popover component.
- Update placeholder text in Textarea component.
- Adjust styling and layout of components.
- Add changeModel function to handle chat model selection.
- Update return statement to use Stack and Group components for layout.
- Update ActionIcon and Button components with new props and styling.
- Remove unused code and dependencies.
2023-09-13 20:47:22 +08:00
bobo.yang
ae2f977df7 update devchat version 2023-09-13 16:59:20 +08:00
bobo.yang
78804f3386 add sample config to guide how to config devchat 2023-09-13 10:08:16 +08:00
bobo.yang
dd1bef5539 Add function to update configuration for version 0.9.12
- Added a new function `configUpdateTo_0912` to update the configuration for the 'devchat' extension.
- The function retrieves the 'DevChat', 'Api_Key_OpenAI', and 'API_ENDPOINT' configurations and creates a new configuration object.
- If the 'Model.gpt-4' configuration does not exist and the new configuration object is not empty, it updates the 'Model.gpt-3-5', 'Model.gpt-3-5-16k', and 'Model.gpt-4' configurations.
- The function is called during the activation of the extension.
2023-09-13 10:08:16 +08:00
bobo.yang
40803aa635 update to new config format 2023-09-13 10:08:16 +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
5e995ea4ee use full name model name 2023-09-13 10:08:16 +08:00
bobo.yang
89b25f7790 add message to get valid model list 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
0ff9870cf6 Support multi llm model 2023-09-13 10:08:16 +08:00
smallstone
60468af2b2 feat: add header 2023-09-08 17:08:38 +08:00
bobo.yang
c291f20b73 Added support for configurable OpenAI model in DevChat
- Introduced a new variable 'llmModel' to fetch the OpenAI model configuration from 'DevChat'.
- If 'llmModel' is present, it is added to the arguments list.
2023-09-05 09:22:14 +08:00
bobo.yang
3a0d390c83 remove default command 2023-09-04 16:45:53 +08:00
bobo.yang
1f802404fd while mamba fails, use conda replace. 2023-09-04 13:58:21 +08:00
Rankin Zheng
e425d75664 Adjust chat panel height when not generating
- Changed the height of the chat panel from '6rem' to '7rem' when not generating in ChatPanel.tsx.
2023-09-01 14:43:04 +08:00
Rankin Zheng
50462e38ef Add '/help' command handling in chat input
- Modified the handleSendClick function in InputMessage/index.tsx to handle '/help' command.
- If the user types '/help', a help message is displayed and the input field is cleared.
- If the input is not '/help', the existing functionality of sending and displaying the user's message is executed.
2023-09-01 14:39:58 +08:00
smallstone
0657899f7a feat: delete useless code 2023-09-01 13:54:03 +08:00
smallstone
ef8d86385b feat: refresh tokens 2023-09-01 13:52:06 +08:00
Rankin Zheng
3b313a6769 Update rechargeSite URL in ChatStore
- Changed the rechargeSite URL from 'https://test.devchat.ai/pricing/' to 'https://devchat.ai/pricing/' in ChatStore.ts.
2023-09-01 12:23:47 +08:00
smallstone
1251a9a487 feat: update endpoint judge 2023-09-01 11:42:07 +08:00
Rankin Zheng
348823f871 Update InputMessage component width
- Adjusted the width of the Stack component within the InputMessage component to "calc(100% - 60px)" to ensure proper spacing.
2023-09-01 10:45:39 +08:00
smallstone
7a805729a0 feat: modify link 2023-09-01 10:39:18 +08:00
smallstone
53142092b4 feat: update balance tip 2023-09-01 10:37:50 +08:00
Rankin Zheng
7df9ad421d Reorder chat panel chips
- Removed the GPT-4 chip from its original position.
- Added the GPT-4 chip after the GPT-3.5-16K chip.
2023-09-01 08:54:47 +08:00
bobo.yang
2b8da08d11 Change conda installation directory from .devchat to .chat
- Updated the conda installation directory from .devchat to .chat in conda_install.ts.
- Updated the mamba installation directory from .devchat to .chat in python_install.ts.
- Updated the installation directory in the readme.md file.
2023-08-31 21:54:31 +08:00
boob.yang
552cf20008
Merge pull request #287 from devchat-ai/disable_devask_summary
Refactor ask-code-summary feature and remove redundant commands
2023-08-31 17:55:10 +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
smallstone
8c957e687b feat: update name and icon 2023-08-31 17:20:58 +08:00
smallstone
0e88fdd553 feat: update witdh 2023-08-31 16:37:42 +08:00
smallstone
5bcd525b9a feat: add wechat tip 2023-08-31 16:33:29 +08:00
smallstone
88e0963aec feat: add wechat tip 2023-08-31 16:33:27 +08:00
bobo.yang
1574253e85 Implement various enhancements and fixes across multiple files
- In runVSCodeCommand.ts, added a condition to convert the first argument to a Uri if the command is 'vscode.open'.
- In sendMessage.ts, added logic to prepend the previous command to the message text if the message starts with '/'.
- In commonUtil.ts, modified the spawnAsync function to replace arguments starting with '$' with their corresponding environment variable values.
- In handler.py, added code to create parent directories for a new file if they don't exist.
2023-08-31 15:15:12 +08:00
Rankin Zheng
f6c6f92167
Merge pull request #283 from devchat-ai/112-initial-default-to-gpt-35
Update default AI model and rearrange model selection
2023-08-30 22:06:37 -05:00
boob.yang
1e31b62383
Merge pull request #284 from devchat-ai/update_commands_after_devchat_update
Update commands after devchat update
2023-08-31 10:40:49 +08:00
bobo.yang
c35de16bb2 Refactor getSetting and getUserAccessKey handlers
- Modified the getSetting function in updateConfig.ts to include key1 and key2 in the outgoing message.
- Adjusted the registration of the incoming message for getUserAccessKey in userAccessKey.ts to not expect key1 and key2.
2023-08-31 10:39:01 +08:00
bobo.yang
95c1d53edc update commands list after devchat installed. 2023-08-31 10:23:10 +08:00
Rankin Zheng
70887c471d
Merge pull request #274 from devchat-ai/update-ui-text
Refine context command descriptions
2023-08-30 21:18:54 -05:00
Rankin Zheng
0b6f1e2ba3 Update default AI model and rearrange model selection
- Changed the default AI model from 'gpt-4' to 'gpt-3.5-turbo' in package.json.
- Rearranged the model selection order in ChatPanel.tsx, moving 'gpt-4' to the end.
2023-08-31 10:10:11 +08:00
bobo.yang
5bcce2a2cf Add getUserAccessKey handler and related functionality
- Imported getUserAccessKey in loadHandlers.ts and registered it as a message handler.
- Created a new file userAccessKey.ts to handle getting user access keys.
- The getUserAccessKey function retrieves the API key, determines its type (DevChat or OpenAI), and gets the endpoint.
- If no API key is found, a message is sent with empty values.
2023-08-31 09:12:58 +08:00
bobo.yang
6c15fb49c8 Refactor symbol selection and chat content in context handlers
- In defRefsContext, replaced getSelectedSymbol with direct text selection.
- Added error handling for empty selection in defRefsContext.
- Updated logging to include selected text details in defRefsContext.
- In getUndefinedSymbols, modified chat content to include the code snippet.
2023-08-30 22:57:51 +08:00
bobo.yang
51a4c454c3 Add more log 2023-08-30 22:57:51 +08:00
bobo.yang
f1c6a7290a Move logger display to start of refDefsContext handler
- Moved logger.channel()?.show() to the beginning of the handler function in refDefsContext.
- This ensures that the logger display is shown before any other operations are performed.
2023-08-30 22:57:51 +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