-
Notifications
You must be signed in to change notification settings - Fork 2.5k
feat: improve error display with custom titles and expandable UI #7794
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
Changes from 2 commits
47c21fb
eef6c03
7e65f6f
b34dc7c
daaf458
45a877d
b5d5268
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,113 @@ | ||||||
| # Implementation Plan: Improve Error Display in Webview | ||||||
|
|
||||||
| ## Overview | ||||||
|
|
||||||
| Currently, `cline.say("error", ...)` displays error text in red. We want to improve this to look more like the "Edit Unsuccessful" display with: | ||||||
|
||||||
| Currently, `cline.say("error", ...)` displays error text in red. We want to improve this to look more like the "Edit Unsuccessful" display with: | |
| Currently, `this.say("error", ...)` displays error text in red. We want to improve this to look more like the "Edit Unsuccessful" display with: |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1169,10 +1169,33 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike { | |
| `Roo tried to use ${toolName}${ | ||
| relPath ? ` for '${relPath.toPosix()}'` : "" | ||
| } without value for required parameter '${paramName}'. Retrying...`, | ||
| undefined, | ||
| undefined, | ||
| undefined, | ||
| undefined, | ||
| { | ||
| metadata: { | ||
| title: "Missing Parameter Error", | ||
| }, | ||
| }, | ||
| ) | ||
| return formatResponse.toolError(formatResponse.missingToolParameterError(paramName)) | ||
| } | ||
|
|
||
| /** | ||
| * Helper method to say an error with a custom title | ||
| * @param title - The title to display for the error | ||
| * @param text - The error message text | ||
| * @param images - Optional images to include | ||
| */ | ||
| async sayError(title: string, text: string, images?: string[]) { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The helper method is a nice addition! Consider adding a JSDoc example to make it more discoverable: |
||
| await this.say("error", text, images, undefined, undefined, undefined, { | ||
| metadata: { | ||
| title, | ||
| }, | ||
| }) | ||
| } | ||
|
|
||
| // Lifecycle | ||
| // Start / Resume / Abort / Dispose | ||
|
|
||
|
|
||
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.
This planning document was helpful during development but could be removed from the final PR to keep the repository clean. Consider moving it to a GitHub issue or discussion if you want to preserve the implementation details.