We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a7428ef + f78f519 commit ee63e6dCopy full SHA for ee63e6d
1 file changed
scripts/static/js/sidebar.js
@@ -405,6 +405,19 @@ export function showSidebarContent(d, fromHover = false) {
405
}
406
// Show only the selected prompt
407
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
421
let promptHtml = `<pre class="sidebar-pre">${promptVal ?? ''}</pre>`;
422
return selectHtml + promptHtml;
423
0 commit comments