494 Commits

Author SHA1 Message Date
bobo.yang
f63f88e7f6 Add updateConfiguration method to UiUtil
- Added a new method updateConfiguration to the UiUtil interface.
- Implemented the updateConfiguration method in the UiUtilWrapper and UiUtilVscode classes.
- This method updates a given configuration key with a new value.
2023-07-06 07:42:44 +08:00
bobo.yang
a947651d85 Update install.py to use sys.executable for pipx commands
- Replaced direct 'pipx' calls with 'sys.executable -m pipx' to ensure the same Python environment is used.
- Added a print statement to display the Python command being used.
2023-07-06 07:42:44 +08:00
Rankin Zheng
7ee2b02dda
Merge pull request #201 from devchat-ai/194-split-rendering-of-markdown-in-message-body
194 split rendering of markdown in message body
2023-07-06 07:40:01 +08:00
Rankin Zheng
b573dff2cf Enhance message copying and refilling in MessageContainer
- Imported CopyButton and Icon360 from respective libraries for improved functionality.
- Replaced the refill prompt icon with a 360 icon for better user understanding.
- Added a copy message functionality for bot messages with a tooltip indicating the copy status.
- Changed the state variable name from 'refilled' to 'done' for better context understanding.
2023-07-06 06:22:04 +08:00
Rankin Zheng
f58e2fe333 Improve text formatting in CodeBlock component
- Imported Container from "@mantine/core" for better layout control in CodeBlock.
- Wrapped the preformatted text in a Container to apply additional styles.
- Added 'whiteSpace: 'pre-wrap'' and 'wordBreak: 'break-word'' to preserve white spaces, line breaks and ensure long words do not overflow the container.
2023-07-06 06:12:55 +08:00
Rankin Zheng
2d12c8978d Enhance CurrentMessage component with dynamic width and improved styling
- Passed dynamic width from ChatPanel to CurrentMessage component.
- Imported Container from "@mantine/core" for better layout control in CurrentMessage.
- Added styling to the CurrentMessage component to handle dynamic width and improve text display.
- Added 'whiteSpace: 'break-spaces'' to preserve white spaces and line breaks in the preformatted text.
2023-07-06 05:56:36 +08:00
Rankin Zheng
8773633d44 Update chat message handling and state management
- Modified the stopGenerating action to accept a payload indicating if the task has been completed.
- Added a new state property 'hasDone' to track if a task has been completed.
- Updated the CurrentMessage component to handle the new 'hasDone' state and update the last message accordingly.
- Introduced a new action 'updateLastMessage' to update the last message in the state.
- Added a new state property 'lastMessage' to keep track of the last message.
- Refactored the CurrentMessage component to split the message into blocks for better rendering.
2023-07-06 05:51:03 +08:00
Rankin Zheng
cb3a2cbc29 Refactor chat message handling and UI components
- Extracted current message handling logic into a new component, CurrentMessage.tsx.
- Removed redundant code and imports from ChatPanel.tsx.
- Removed MessageBlink component from MessageContainer.tsx as it's now part of CurrentMessage.tsx.
- Added import for CurrentMessage in ChatPanel.tsx.
- Removed unused selectors from ChatPanel.tsx.
- Simplified useEffect hooks in ChatPanel.tsx by moving some logic to CurrentMessage.tsx.
2023-07-05 15:00:20 +08:00
Rankin Zheng
7308f17be7
Merge pull request #199 from devchat-ai/193-change-replace-to-replace-file-in-the-code-box
Update tooltip label in CodeBlock component
2023-07-03 15:40:40 +08:00
Rankin Zheng
9f222f7d1a Update tooltip label in CodeBlock component
- Changed the tooltip label from 'Replace' to 'Replace File' in CodeBlock.tsx.
- This provides a clearer indication of the button's functionality.
2023-07-03 15:40:13 +08:00
Jinglei Ren
b54c425f7b
Update README.md 2023-07-01 11:02:32 +08:00
Rankin Zheng
257021cba7
Merge pull request #198 from devchat-ai/195-formatting-restoration-for-input-box-text
Differentiate code block rendering based on message type
2023-06-28 17:10:45 +08:00
Rankin Zheng
767afa4278 Differentiate code block rendering based on message type
- Added messageType prop to CodeBlock component in CodeBlock.tsx.
- CodeBlock now renders differently for 'bot' and other message types.
- Updated MessageContainer.tsx to pass messageType to CodeBlock.
2023-06-28 17:09:27 +08:00
Rankin Zheng
56be79ff6e
Merge pull request #197 from devchat-ai/196-pressing-enter-in-input-box-with-chinese-input-method-does-not-trigger-send-event
Prevent sending message on Enter key press during IME composition
2023-06-28 16:44:15 +08:00
Rankin Zheng
0f58038998 Prevent sending message on Enter key press during IME composition
- Modified the condition in InputMessage.tsx to check if the IME composition is in progress.
- This prevents the message from being sent when the Enter key is pressed during IME composition.
2023-06-28 16:42:23 +08:00
boob.yang
1722286323
Merge pull request #190 from devchat-ai/update_devchat_check2
Update devchat check2
2023-06-16 09:16:42 +08:00
bobo.yang
35215a7fb6 Prevent duplicate binPath in PATH environment variable
- Check if binPath is already in PATH before adding it.
- Add binPath to PATH only if it's not already present.
- Log a message when binPath is added to PATH.
2023-06-16 09:08:51 +08:00
bobo.yang
1bb215f51b Improve error handling in DevChat dependency check
- Add a catch block to handle errors when checking pipx environment path.
- Log detailed error message when DevChat dependency check fails.
- Move DevChat installation check to a separate try-catch block.
- Update logger error message to info when pipx environment path is not found.
2023-06-16 09:05:10 +08:00
boob.yang
f07296ea60
Merge pull request #189 from devchat-ai/update_devchat_check2
Improve DevChat dependency check and logging
2023-06-15 21:38:47 +08:00
bobo.yang
9820571783 Improve DevChat dependency check and logging
- Remove redundant DevChat installation check.
- Change logger error message to info when pipx environment path is not found.
- Move DevChat installation check outside of the if-else block.
- Return true after running 'devchat --help' command.
2023-06-15 21:20:52 +08:00
boob.yang
d5fdd4e901
Merge pull request #188 from devchat-ai/fix_historylog_mismatch
Refactor historyMessagesBase to accept topicId as parameter
2023-06-15 21:11:47 +08:00
bobo.yang
1feb9ddd9a Refactor historyMessagesBase to accept topicId as parameter
- Modify loadTopicHistoryLogs to accept topicId as a parameter.
- Update updateCurrentMessageHistory to accept topicId as a parameter.
- Pass topicId to loadTopicHistoryLogs and updateCurrentMessageHistory in historyMessagesBase.
- Add a check for topicId change before updating message history.
2023-06-15 21:00:01 +08:00
Rankin Zheng
f409365833
Merge pull request #187 from devchat-ai/180-adding-tab-completion-functionality-to-pop-up-menu-for-contexts-and-commands
Allow Tab key to select command in InputMessage
2023-06-15 20:56:45 +08:00
Rankin Zheng
76ec8c0019 Allow Tab key to select command in InputMessage
- Modify event condition to include Tab key along with Enter key.
2023-06-15 20:56:17 +08:00
Rankin Zheng
5f519538d7
Merge pull request #184 from devchat-ai/171-dynamic-loading-and-disposal-of-chat-history-for-improved-frontend-performance
171 dynamic loading and disposal of chat history for improved frontend performance
2023-06-15 20:53:06 +08:00
Rankin Zheng
fdbe1d0565 Temporarily disable message loading logic
- Comment out dispatch(fetchHistoryMessages) in ChatPanel.tsx.
- Add TODO comment explaining the reason for disabling the logic.
2023-06-15 20:52:33 +08:00
Rankin Zheng
799c87abcf Remove default message and simplify MessageContainer
- Remove DefaultMessage component and its usage.
- Simplify MessageContainer by directly mapping messages to components.
- Adjust styling and layout for better readability.
2023-06-15 20:43:52 +08:00
boob.yang
7258a414b7
Merge pull request #186 from devchat-ai/fix_encodeing_error_on_windows
Add PYTHONUTF8 environment variable to DevChat
2023-06-14 19:47:03 +08:00
bobo.yang
baaaafa240 Handle secretStorageGet errors
- Wrap secretStorageGet in a try-catch block.
- Log errors to the logger channel.
- Return undefined in case of an error.
2023-06-14 19:44:31 +08:00
bobo.yang
f50e2118b0 Add PYTHONUTF8 environment variable to DevChat
- Set PYTHONUTF8 to 1 in the DevChat class.
- Ensures proper handling of UTF-8 encoding.
2023-06-14 15:57:32 +08:00
Rankin Zheng
439838bb21 Improve chat history pagination and fetching
- Remove selectMessageCount, selectIsMiddle, and related useEffect in ChatPanel.tsx.
- Add selectPageIndex and selectIsLastPage to chatSlice.ts.
- Update fetchHistoryMessages to accept pageIndex parameter.
- Modify chatSlice to handle pageIndex and isLastPage states.
2023-06-13 17:53:05 +08:00
Rankin Zheng
bcdc78d65f Update import paths with alias
- Replace relative import paths with '@/...' alias in multiple files.
- Update tsconfig.json to include paths configuration.
- Add alias configuration to webpack.config.js.
2023-06-13 17:03:48 +08:00
boob.yang
403ed325b0
Merge pull request #182 from devchat-ai/optimize_devchat_install
add devchatStatus checking
2023-06-13 12:49:33 +08:00
bobo.yang
c7a891e00d add devchatStatus checking 2023-06-13 12:48:58 +08:00
boob.yang
2d5f413746
Merge pull request #181 from devchat-ai/optimize_devchat_install
Optimize devchat install
2023-06-13 12:45:35 +08:00
bobo.yang
5fc21c1982 Refactor checkDevChatDependency to accept pythonCommand
- Update checkDevChatDependency to take pythonCommand as an argument.
- Modify getPipxEnvironmentPath to use pythonCommand.
- Adjust statusBarViewBase.ts to pass pythonCommand.
- Update test cases in commandsBase.test.ts accordingly.
2023-06-13 11:56:03 +08:00
Rankin Zheng
9a906a1c0f Update ChatPanel to handle scroll position and message fetching
- Added selectors for isTop, isBottom, and isMiddle in chatSlice.
- Removed scrollPosition and stopScrolling states from ChatPanel.
- Added onScrollPositionChange function to handle scroll events.
- Dispatch onMessagesTop, onMessagesBottom, and onMessagesMiddle actions based on scroll position.
2023-06-13 11:54:31 +08:00
bobo.yang
8ccf73b9bb Update welcome message to include SVN repositories
- Modify welcome.html to mention both Git and SVN repository folders.
2023-06-13 11:26:32 +08:00
bobo.yang
e65bef0633 load topics even no folder is opened. 2023-06-13 11:15:02 +08:00
Rankin Zheng
ec440be005 Refactor history messages fetching
- Add fetchHistoryMessages async thunk in chatSlice.
- Replace messageUtil.sendMessage with dispatch(fetchHistoryMessages()) in ChatPanel.tsx.
- Remove redundant message handler registration in ChatPanel.tsx.
2023-06-13 11:11:29 +08:00
bobo.yang
bd248f1127 replace covespace with devchat-ai 2023-06-13 11:09:26 +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
3fc21b920e update log text 2023-06-13 10:45:11 +08:00
Rankin Zheng
b4a8839313 Refactor command menu fetching
- Remove messageUtil.sendMessage from ChatPanel.tsx.
- Add fetchCommandMenus to inputSlice using createAsyncThunk.
- Replace local commandMenus state with Redux store in InputMessage.tsx.
2023-06-13 10:12:13 +08:00
Rankin Zheng
e594ef75c5 Refactor context menu fetching
- Move context menu fetching to inputSlice using createAsyncThunk.
- Remove redundant message handler registration in InputMessage.tsx.
- Use fetched context menus from the Redux store.
2023-06-13 10:00:27 +08:00
Rankin Zheng
7f25e426b2 Refactor directory structure 2023-06-13 09:20:12 +08:00
bobo.yang
eba9fa9782 Load topics only when a workspace is open
- Update dependencyCheck in statusBarViewBase.ts.
- Add a condition to check if a workspace is open before loading topics.
2023-06-13 08:52:44 +08:00
bobo.yang
659e35edf8 don't focus on output while devchat check fail. 2023-06-13 08:46:53 +08:00
bobo.yang
4e249441db update logger output 2023-06-13 08:45:42 +08:00
bobo.yang
abba2c7df3 Add getValidPythonCommand function and improve dependency check
- Implement getValidPythonCommand in commandsBase.ts to detect Python 3.
- Update dependencyCheck in statusBarViewBase.ts to use getValidPythonCommand.
- Modify install.py to use sys.executable instead of hardcoded 'python3'.
2023-06-13 08:32:22 +08:00