From 3db2a6fe2ca178dfc3e690cebec72e2d96330a57 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Fri, 10 Oct 2025 11:40:07 +0200 Subject: [PATCH] Expose agent, agentInterface, and artifactsPanel as public in ChatPanel Make these properties public so they can be accessed externally for test automation and other programmatic control. Changes: - Change agent, agentInterface, artifactsPanel from private to public --- packages/web-ui/src/ChatPanel.ts | 6 +++--- packages/web-ui/src/prompts/tool-prompts.ts | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/web-ui/src/ChatPanel.ts b/packages/web-ui/src/ChatPanel.ts index e3edc0a5..12b44c9c 100644 --- a/packages/web-ui/src/ChatPanel.ts +++ b/packages/web-ui/src/ChatPanel.ts @@ -18,9 +18,9 @@ const BREAKPOINT = 800; // px - switch between overlay and side-by-side @customElement("pi-chat-panel") export class ChatPanel extends LitElement { - @state() private agent?: Agent; - @state() private agentInterface?: AgentInterface; - @state() private artifactsPanel?: ArtifactsPanel; + @state() public agent?: Agent; + @state() public agentInterface?: AgentInterface; + @state() public artifactsPanel?: ArtifactsPanel; @state() private hasArtifacts = false; @state() private artifactCount = 0; @state() private showArtifactsPanel = false; diff --git a/packages/web-ui/src/prompts/tool-prompts.ts b/packages/web-ui/src/prompts/tool-prompts.ts index d94e14ea..ca252fa4 100644 --- a/packages/web-ui/src/prompts/tool-prompts.ts +++ b/packages/web-ui/src/prompts/tool-prompts.ts @@ -28,8 +28,6 @@ Execute JavaScript code in a sandboxed browser environment with full Web APIs. - CSV: const Papa = (await import('https://esm.run/papaparse')).default; - Chart.js: const Chart = (await import('https://esm.run/chart.js/auto')).default; - Three.js: const THREE = await import('https://esm.run/three'); -- Lodash: const _ = await import('https://esm.run/lodash-es'); -- D3.js: const d3 = await import('https://esm.run/d3'); ## Important Notes - Graphics: Use fixed dimensions (800x600), NOT window.innerWidth/Height