File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -405,6 +405,19 @@ export function showSidebarContent(d, fromHover = false) {
405405 }
406406 // Show only the selected prompt
407407 let promptVal = promptMap [ lastPromptKey ] ;
408+
409+ // Handle unicode escape for artifacts JSON display
410+ if ( lastPromptKey === 'artifacts' && typeof promptVal === 'string' ) {
411+ try {
412+ // Parse and stringify to properly escape unicode
413+ const parsed = JSON . parse ( promptVal ) ;
414+ promptVal = JSON . stringify ( parsed , null , 2 ) ;
415+ } catch ( e ) {
416+ // If parsing fails, use original value
417+ console . warn ( 'Failed to parse artifacts JSON for unicode escape:' , e ) ;
418+ }
419+ }
420+
408421 let promptHtml = `<pre class="sidebar-pre">${ promptVal ?? '' } </pre>` ;
409422 return selectHtml + promptHtml ;
410423 }
You can’t perform that action at this time.
0 commit comments