1172 Commits

Author SHA1 Message Date
Rankin Zheng
c51c8189d0 Refactor MessageList component
- Updated the styles in the MessageList component including the button font family and font size.
- Modified the Card component to always be displayed for 'bot' messages.
- Updated the text description of the cost range to approximately $0.1 - $0.5.
- Modified the size and color of the buttons for user interaction.
2023-10-11 23:51:57 +08:00
Rankin Zheng
96b811fc3f Update cost range in MessageList component
- Updated the cost range displayed in the MessageList component from approximately $1.2 - $2.2 to approximately $0.1 - $0.5.
2023-10-11 23:51:57 +08:00
Rankin Zheng
6c07272bf2 Update bot message in ChatStore.ts
- Updated the message in the ChatStore.ts file to improve clarity and provide assistance to the user.
2023-10-11 23:51:57 +08:00
Rankin Zheng
386ab58631 Update MessageList component
- Add conditional rendering for confirm button based on 'confirm' prop value
- Update onClick event handlers for 'Yes' and 'No' buttons to call appropriate functions
2023-10-11 23:51:57 +08:00
Rankin Zheng
7c8da398ae Refactor message generation and handling in CurrentMessage and InputMessage components
- Remove the useEffect hook in CurrentMessage that creates a bot message when `generating` is true. This logic is now handled elsewhere.
- Update the onSubmit handler in InputMessage to distinguish between different types of user input and call the appropriate methods in the ChatStore.
- Add the `startGenerating`, `commonMessage`, `goScrollBottom`, `sendLastUserMessage`, `cancelDevchatAsk` methods to the ChatStore to handle message generation and display.
- Extract the `contextInfo` function to convert chat contexts to the required format for sending to the extension.
2023-10-11 23:51:57 +08:00
Rankin Zheng
230f7cc872 Add confirm property to Message model and devchatAsk method
- Add a `confirm` property to the `Message` model in the `ChatStore.ts` file.
- Add a `devchatAsk` method to create a user message followed by a bot message with the `confirm` property set to `true`.
2023-10-11 23:51:57 +08:00
Rankin Zheng
d509382538 Refactor MessageMarkdown, MessageBody, CurrentMessage, and MessageList components
MessageMarkdown:
- Removed unused imports.
- Modified useEffect() to analyze steps using mdast-util-from-markdown instead of splitting children directly.
- Modified code component to set the 'index' property based on the order of 'code' nodes in the tree.

MessageBody:
- Removed the messageText prop and replaced it with children prop to allow more flexibility in passing content.
- Updated the usage of MessageMarkdown to pass the temp prop as needed.

CurrentMessage:
- Removed unused import for 'mdast'.
- Modified marginTop value to always be '1em' instead of conditionally set based on chat.responsed.

MessageList:
- Updated the usage of MessageBody to pass the messageText as children prop.

MessageMarkdown:
- Updated the code component to determine the 'done' prop based on the index and the presence of 'code' nodes.

Note: The changes in the components involve refactoring and improving the code structure and functionality.
2023-10-11 23:51:57 +08:00
Rankin Zheng
46e3e1edfc Add mdast-related dependencies and update code to use mdast
- Update package.json to include mdast dependencies
- Import necessary functions and types from mdast-util
- Update logic to use mdast functions and types
- Update rendering logic to work with new mdast structure
2023-10-11 23:51:57 +08:00
Rankin Zheng
b214ddfc71 Refactor Step component in MessageMarkdown
- Removed unnecessary empty fragment tags (<></>) surrounding the Accordion component.
- Updated the return statement to directly return the Accordion component.
- Removed unnecessary closing tag (</>) at the end of the return statement.
- Removed unused imports.
2023-10-11 23:51:57 +08:00
Rankin Zheng
962f8ca161 Refactor query function in askcode_index_query.py
- Updated the query function in askcode_index_query.py to include additional parameters for controlling the DFS algorithm.
- Changed the verbose parameter to False in the call to smart_qa.run() to reduce console output.
2023-10-11 23:51:57 +08:00
bobo.yang
822ea8f18a support stop while ask-code 2023-10-11 23:51:57 +08:00
bobo.yang
0886826da7 call smartqa 2023-10-11 23:51:57 +08:00
Rankin Zheng
cb2ea1deb6 Add step component for tutorial content
- Split markdown content by ```step blocks
- Pass step content to Step component
- Step component handles collapsing and highlighting
- Support Step and step case insensitive
- Extract first line starting with # as step title
- Use last line with # Done to show step completed
2023-10-11 23:51:57 +08:00
Rankin Zheng
b35ee9ef8c Display check icon for completed step
- Check if last line is '# Done' to determine step completion
- Extract step contents, omitting first and last line
- Show check icon if step is completed, else show loader
- Remove closed prop which is no longer needed
2023-10-11 23:51:57 +08:00
Rankin Zheng
960b0294bc Add collapsible section for each step
- Add Accordion component from Mantine to wrap each step content
- Extract first line starting with '#' as section title
- Show chevron icon when section is collapsed
- Show check icon when code block is expanded
- Style Accordion to match VSCode theme
- Remove original toggle button and collapse component
2023-10-11 23:51:57 +08:00
Rankin Zheng
3afd42c9d6 Add collapsible code step component
- Create Step component to wrap code snippets in collapsible box
- Render Step instead of default code block for 'step' language
- Pass code snippet as children prop to Step
- Step renders language tag and toggle button
2023-10-11 23:51:57 +08:00
Rankin Zheng
950a1328a0 Add language tag component
- Create LanguageCorner component to display language tag
- Update MessageMarkdown to render LanguageCorner
- Pass language prop from Message to LanguageCorner
2023-10-11 23:51:57 +08:00
bobo.yang
e6d5e410fc remove pre-release flag 2023-10-11 23:51:57 +08:00
boob.yang
29c092c1b6
Merge pull request #323 from devchat-ai/code_llama_support
Code llama support
2023-10-11 23:50:56 +08:00
bobo.yang
a9500ba30f handle code block without language flag 2023-10-11 12:43:12 +08:00
bobo.yang
b4e3f24fdb support code llama model 2023-10-09 08:42:55 +08:00
bobo.yang
f0abddb55c ignore settings.json 2023-10-09 08:42:55 +08:00
bobo.yang
d26a446547 support code llama model and starcoder model 2023-10-09 08:42:55 +08:00
boob.yang
727d534458
Merge pull request #321 from devchat-ai/fix_key_not_found_issue
Fix key not found issue
2023-10-09 08:14:33 +08:00
bobo.yang
5a25cefbe1 Fix key not found issue 2023-10-09 08:12:51 +08:00
boob.yang
67544c37ae
Merge pull request #320 from devchat-ai/update_devchat_2_8
update devchat, remove anthropic provider
2023-10-01 17:05:21 +08:00
bobo.yang
676f3aef1c fix bug 2023-10-01 17:03:56 +08:00
bobo.yang
ec7de83529 update devchat, remove anthropic provider 2023-10-01 16:58:08 +08:00
Jinglei Ren
c70364ba3c
Update README.md 2023-09-28 06:41:31 +08:00
Jinglei Ren
5d53c11328
Update README.md 2023-09-28 06:36:15 +08:00
Jinglei Ren
813f1054e3
Update README.md 2023-09-28 00:21:14 +08:00
boob.yang
56c4e9aca0
Merge pull request #319 from devchat-ai/new_llm_model
New llm model
2023-09-26 22:25:39 +08:00
bobo.yang
63a2d2f7dd update devchat version 2023-09-26 22:23:32 +08:00
bobo.yang
86f21ef03e support more llm models 2023-09-26 14:46:14 +08:00
boob.yang
73d56a21c6
Merge pull request #318 from devchat-ai/update_new_topic
Update new topic
2023-09-23 09:24:01 +08:00
bobo.yang
331b72f09f show devchat view before set api key 2023-09-23 09:12:03 +08:00
bobo.yang
4e0df6d6b8 update tip text 2023-09-23 08:57:44 +08:00
bobo.yang
f6cd8e7697 don't need open git repo 2023-09-23 08:53:58 +08:00
boob.yang
02b485343f
Merge pull request #317 from devchat-ai/update_new_topic
don't clear api key when escape
2023-09-23 08:18:41 +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
boob.yang
16a59476a0
Merge pull request #316 from devchat-ai/update-wording
Update wording
2023-09-23 07:43:21 +08:00
Jinglei Ren
826b98d1b2
Update text in commands.ts 2023-09-23 07:39:19 +08:00
Jinglei Ren
58a35685c0
Update text in historyMessagesBase.ts 2023-09-23 07:33:04 +08:00
Jinglei Ren
4b424f3ac5
Remove "(default)" from text in ChatStore.ts 2023-09-23 07:31:10 +08:00
Jinglei Ren
e991f0afcd
Update text in statusBarView.ts 2023-09-23 07:29:26 +08:00
boob.yang
47c8aff9e2
Merge pull request #315 from devchat-ai/update_key_setting_flow
update key setting flow
2023-09-23 07:25:01 +08:00
bobo.yang
547796a54b update key setting flow 2023-09-23 07:22:17 +08:00
boob.yang
20e02f042e
Merge pull request #314 from devchat-ai/update_key_setting
update api key setting
2023-09-22 23:13:54 +08:00
bobo.yang
21b07f44db update api key setting 2023-09-22 23:08:19 +08:00