aminghadersohi commented on PR #40124:
URL: https://github.com/apache/superset/pull/40124#issuecomment-4549465591

   Thanks for the review, @richardfogaca!
   
   Addressed the sanitization concern (the main one) in 
`4c24c3d8a67557824f7fe526d5b8e155b7e51269`.
   
   Chose **Option B** — added a `@field_validator("error")` on 
`AddChartToDashboardResponse`, consistent with the existing 
`DashboardError.error` validator pattern. This wraps the entire error string 
(which may contain user-supplied `target_tab` and dashboard-controlled tab 
labels) in `UNTRUSTED-CONTENT` delimiters before it reaches the LLM.
   
   The component-ID-in-error-list suggestion (the second one) was already 
addressed in a prior commit (`bce85f8fa1`) — `_collect_available_tab_names` now 
always includes the component ID alongside the label (e.g. `Sales 
(TAB-abc123)`), so the LLM can retry with the unambiguous ID even when labels 
are blank or duplicated.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to