-
Notifications
You must be signed in to change notification settings - Fork 2.5k
feat: Show LLM request and response data in API request items #9124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Added request and response fields to ClineApiReqInfo interface - Store request data when initiating API calls in Task.ts - Accumulate and store response data during streaming in Task.ts - Updated ChatRow component to display request/response in expandable UI - Added click handler to API request items to toggle visibility - Display request as formatted JSON and response as markdown Fixes #9119
Reviewed the latest commit (8ba9a6e). The raw/formatted response toggle implementation looks good - no issues found. Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
|
@roomote: Can you let the user toggle to see the raw response from the server please? Markdown is not useful to debug interaction issues |
Added a toggle button to switch between raw and formatted views of the LLM response. All local checks passed. |
| setShowRawResponse(!showRawResponse) | ||
| }} | ||
| title={showRawResponse ? "Show formatted" : "Show raw"}> | ||
| {showRawResponse ? "Formatted" : "Raw"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User-facing strings in the API response toggle (e.g. 'Response from LLM:', 'Raw', 'Formatted') are hardcoded. Please use the i18n translation function (e.g. t(...)) to support localization.
| {showRawResponse ? "Formatted" : "Raw"} | |
| {showRawResponse ? t("chat:apiRequest.formatted") : t("chat:apiRequest.raw")} |
This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.
|
@roomote: raw should include the entire answer from the llm including headers etc |
Working on enhancing the raw response view to include the entire LLM response with headers, metadata, and thinking traces. |
This PR attempts to address Issue #9119. Feedback and guidance are welcome.
Changes
How it works
When a user clicks on an API request item in the chat, they can now see:
This provides transparency into what is being exchanged between Roo and the LLM, which is especially helpful for understanding model behaviors and debugging.
Fixes #9119
Important
Enhance API request items to display LLM request and response data in an expandable UI for better transparency and debugging.
Task.ts: Stores LLM request data when initiating API calls and accumulates response data during streaming.ChatRow.tsx: Displays request/response data in an expandable UI when an API request item is clicked.ChatRow.tsx: Adds click handler to toggle visibility of request/response data.ClineApiReqInfoinExtensionMessage.ts: Addsresponsefield to store response data.This description was created by
for 8ba9a6e. You can customize this summary. It will automatically update as commits are pushed.