feat(chat): add request info button and debug payload for stream requests

- Introduced a new `ChatRequestInfoButton` component to display detailed request information for chat sessions.
- Enhanced the `useStream` function to track the last stream request, including request ID, URL, method, and sanitized body.
- Updated localization files to include new strings for request information in both English and Chinese.
- Integrated the request info button into the chat interface, allowing users to easily access and copy request details.
- Improved handling of stream requests by attaching debug information to messages for better tracking and debugging.
This commit is contained in:
wizardchen
2026-06-03 15:23:34 +08:00
committed by lyingbug
parent 362bc7f6e5
commit bd1a764a91
8 changed files with 333 additions and 4 deletions
+7
View File
@@ -2682,6 +2682,13 @@ export default {
referencesDocAndWebCount: 'Referenced {docCount} document(s) and {webCount} web page(s)',
referenceChunkCount: '{count} chunk(s)',
fallbackHint: 'No relevant content found in knowledge base. Above is a direct response from the model.',
requestInfoTitle: 'Request info',
requestInfoRequestId: 'Request ID',
requestInfoMessageId: 'Message ID',
requestInfoSessionId: 'Session ID',
requestInfoUrl: 'Request',
requestInfoSentAt: 'Sent at',
requestInfoEmpty: 'No request info available',
channelWeb: 'Web',
channelApi: 'API',
channelIm: 'IM',