mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 03:03:44 +00:00
Make openArtifact public and remove type cast in ArtifactPill
This commit is contained in:
parent
58b9c36268
commit
3adc8357b1
2 changed files with 2 additions and 2 deletions
|
|
@ -6,7 +6,7 @@ export function ArtifactPill(filename: string, artifactsPanel?: ArtifactsPanel):
|
||||||
const handleClick = () => {
|
const handleClick = () => {
|
||||||
if (!artifactsPanel) return;
|
if (!artifactsPanel) return;
|
||||||
// openArtifact will show the artifact and call onOpen() to open the panel if needed
|
// openArtifact will show the artifact and call onOpen() to open the panel if needed
|
||||||
(artifactsPanel as any).openArtifact(filename);
|
artifactsPanel.openArtifact(filename);
|
||||||
};
|
};
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ export class ArtifactsPanel extends LitElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Open panel and focus an artifact tab by filename
|
// Open panel and focus an artifact tab by filename
|
||||||
private openArtifact(filename: string) {
|
public openArtifact(filename: string) {
|
||||||
if (this._artifacts.has(filename)) {
|
if (this._artifacts.has(filename)) {
|
||||||
this.showArtifact(filename);
|
this.showArtifact(filename);
|
||||||
// Ask host to open panel (AgentInterface demo listens to onOpen)
|
// Ask host to open panel (AgentInterface demo listens to onOpen)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue