mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-09-27 05:36:39 +08:00
This commit introduces a feature that allows you to paste questions and responses directly into the chat application. Key changes: - Added new icons for pasting questions and responses. - Modified `app/components/chat.tsx`: - Imported new icons. - Added `ChatAction` buttons for paste actions. - Implemented `handlePasteQuestion` and `handlePasteResponse` to take content from the main input area. - Your pasted messages are marked with `isPasted: true`. - Edit button visibility is maintained for all messages, including pasted ones. - Modified `app/store/chat.ts`: - Added `isPasted` field to the `ChatMessage` interface. - Ensured `onUserInput` does not make API calls for pasted messages. - Verified that `summarizeSession` (for auto title generation) correctly includes pasted content. The feature allows you to input content into the main text area and then click one of the new paste buttons. This will add the content to the chat as either a user question or an assistant response, styled like other messages but without sending an API request. Note: I was unable to perform manual UI testing of the latest input method (using the main input area) due to environment limitations. However, I previously confirmed that the core paste functionality (using a prompt) was successfully tested. |
||
---|---|---|
.. | ||
api | ||
client | ||
components | ||
config | ||
icons | ||
lib | ||
locales | ||
masks | ||
mcp | ||
store | ||
styles | ||
utils | ||
command.ts | ||
constant.ts | ||
global.d.ts | ||
layout.tsx | ||
page.tsx | ||
polyfill.ts | ||
typing.ts | ||
utils.ts |