[feat] canvas: render model-generated interactive HTML with a controlled action bridge

Abierto
#443 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
18/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
css, html, javascript, typescript

Línea de trabajo

The request centers on a sandboxed iframe that renders model-generated HTML on the canvas node, plus a controlled postMessage-style bridge to the host; the payload names no specific files, so start by locating the existing HTML canvas node and the project asset storage in the TypeScript codebase. Done means a generated page renders in isolation, a submitted interaction is validated and saved to project state, and it persists after reopening. The protocol itself is still open for discussion, so confirm the design with maintainers before writing code.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

area:agent area:canvas

中文总结:支持文本模型生成通用交互式 HTML,在画布内隔离运行,并通过受控接口保存交互结果或填入对话草稿。

Request

Allow text models to generate interactive HTML/CSS/JS and render the result directly in an HTML canvas node, rather than opening it in an external browser.

This should support general interactions—forms, candidate selection, sliders, quizzes, interactive charts, and custom interfaces—not a fixed card layout.

Proposed scope

  • Store generated HTML as a project asset and render it in a sandboxed iframe with configurable dimensions.
  • Allow page-local JavaScript interactions. Block network access and direct access to the filesystem, CLI, and host APIs.
  • Provide a controlled bridge for submitting structured interaction results to the host, for example:
await opendirector.request({
  action: "submit",
  payload: { selectedIds: ["candidate-b"], values: { durationSeconds: 15 } }
});

The host validates the source, allowed action, target scope, and payload, executes supported project operations, and returns success or failure. The API above is illustrative; the exact protocol is open for discussion.

Initial milestone

Generate an interactive HTML interface, use it on the canvas, and save its submitted results to project state or populate a visible assistant draft. Persist submitted state across reopening.

Candidate adoption and generation can be added later as explicitly authorized actions through existing business services.

Lenguaje dominante
TypeScript
Estrellas
119
Forks
16
Merge medio
16 h 13 min
PR fusionados (30 d)
195

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ThinkFlowLab/OpenDirector

Todos los issues de ThinkFlowLab/OpenDirector

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.