agentscope-ai / agentscope-ai/QwenPaw

[Feature]: Live artifact canvas - render agent-generated HTML in a side panel

Aperta
#6,730 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
TypeScript
Stelle
35k
Fork
3.1k
Merge medio
1g 13h
PR unite (30g)
228

Descrizione

## Summary

When an agent produces a deliverable like a dashboard, report, or interactive demo (typically a self-contained HTML file in the workspace), the user currently has to leave the chat to view it. I'd like to propose an "artifact canvas": a side panel in the Console that renders agent-generated HTML artifacts live, with per-turn versioning so the user can iterate on the same artifact across the conversation - similar to the artifacts experience in Claude Cowork / Claude Artifacts.

## Problem / Motivation

Today, a request like "make me a sales dashboard" goes: agent writes an HTML file to the workspace -> user hunts down the file and opens it in a browser -> to iterate ("add a weekly view"), the user describes changes blind and re-opens the file after every turn.

The deliverable is the point of the task, yet it stays invisible inside the app. The in-flight artifact cards work (#6719) solves *discovery* of generated files; this proposal is the next layer: *rendering* the generated content in-place, where the user can see and steer it.

## Proposed Solution

- Collapsible right-side panel in Console chat ("Canvas").
- When a turn creates/modifies a renderable artifact (e.g. `.html`), the panel shows a live preview in a sandboxed iframe (sandbox attribute, no top navigation, isolated origin).
- Per-conversation artifact versioning: each agent iteration produces v2, v3... with a switcher, so the user can step back.
- The "preview" action on artifact cards (#6719) opens the artifact in the canvas panel.
- MVP scope: HTML preview + versioning + open/download. Later candidates: markdown docs, CSV-as-table, share links.

## Why feasible now

- The pawapp SDK (#6150, merged) already provides embedded-view infrastructure in the Console.
- #6719 provides the artifact detection/manifest layer this would build on.

## Security note

Rendered content is agent-generated, not user-curated - sandboxing is a first-class design constraint, not an afterthought. Happy to discuss the approach.

## Alternatives Considered

- Coding Mode preview: editor/file-tree context, not conversational; switching modes breaks the chat flow.
- Opening files in an external browser: exactly the friction #6083 describes.

## Willing to Contribute

I can help scope this and open a PR for the minimal slice (sandboxed HTML preview + versioning) if maintainers agree with the direction.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by reading the embedded-view infrastructure from #6150 and the artifact detection/manifest work in #6719, then trace how Console chat and artifact-card preview actions connect. Done means a collapsible Canvas panel renders self-contained HTML in a sandboxed iframe, supports per-conversation version switching, and provides open/download actions for the MVP.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
html, python
Ambito
frontend, security, web-dev
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.