/** * chatRenderer — produces the full self-contained HTML document for the chat * webview. All CSS and JS are inlined (no external bundles). * * The webview JS communicates with the extension host via postMessage. * Incoming messages update the DOM incrementally so streaming feels fluid. */ function escapeHtml(value) { return String(value) .replace(/&/g, '&') .replace(//g, '>') .replace(/"/g, '"') .replace(/'/g, '''); } function renderChatHtml({ nonce, platform }) { const modKey = platform === 'darwin' ? 'Cmd' : 'Ctrl'; return `
OpenClaude
Ready
OpenClaude
Ask a question, request a code change, or start a new task.
Press ${escapeHtml(modKey)}+L to focus input
Thinking...

Session History

No sessions found
`; } module.exports = { renderChatHtml };