agentscope-ai / agentscope-ai/QwenPaw
[Feature]: Live artifact canvas - render agent-generated HTML in a side panel
- Lingua principale
- Python
- Stelle
- 34.9k
- Fork
- 3.1k
- Merge medio
- 1g 15h
- PR unite (30g)
- 225
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
Valutazione
Questa issue non è ancora stata valutata.