Generates the HTML content for the Agent Chat webview view, wiring up the
compiled dist/agentChat.js bundle with a strict CSP and a nonce.
The CSP connect-src directive is restricted to the webview's own
cspSource. The embedded <Chat> component never reaches the
Datalayer runtime ingress directly: webview/agentChat/networkBridge.ts
installs fetch / WebSocket overrides that tunnel every outbound
call through postMessage to the extension host, which opens the
real connection on the webview's behalf. Tightening connect-src
means a compromised script can't bypass the bridge and POST the
per-runtime token to an attacker-controlled HTTPS host directly.
Parameters
webview: Webview
Webview instance used to build secure resource URIs.
extensionUri: Uri
Extension root URI for resolving bundled script paths.
Returns string
Complete HTML string to assign to the webview's html property.
Generates the HTML content for the Agent Chat webview view, wiring up the compiled
dist/agentChat.jsbundle with a strict CSP and a nonce.The CSP
connect-srcdirective is restricted to the webview's owncspSource. The embedded<Chat>component never reaches the Datalayer runtime ingress directly:webview/agentChat/networkBridge.tsinstallsfetch/WebSocketoverrides that tunnel every outbound call throughpostMessageto the extension host, which opens the real connection on the webview's behalf. Tighteningconnect-srcmeans a compromised script can't bypass the bridge and POST the per-runtime token to an attacker-controlled HTTPS host directly.