8 Commits

Author SHA1 Message Date
bobo.yang
716895045a Add temporary file handling for contextInfo in sendMessage
- Added createTempFile and deleteTempFiles functions in sendMessage.ts.
- Modified sendMessage function to handle contextInfo field in the message.
- If the file name is not present in the context, a temporary file is created.
- The file name is inserted into the text field of the message.
- All temporary files created are deleted after the message is sent.
- Modified handleSendClick function in InputMessage.tsx to process and send the message to the extension.
- Modified startGenerating reducer in chatSlice.ts to send the message with contextInfo.
2023-07-27 08:11:40 +08:00
Rankin Zheng
819fe9f302 Refactor InputContexts into a separate component
- Created a new file `InputContexts.tsx` and moved the `InputContexts` component from `InputMessage.tsx` to this new file.
- Imported `InputContexts` in `InputMessage.tsx` and removed the old `InputContexts` component definition.
- This change improves code organization and readability by separating concerns.
2023-07-18 18:10:55 +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
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
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
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