Repository navigation
feat(artifacts): render agent HTML files inline in the session chat - #420
Merged
Merged
Conversation
Contributor
chriswritescode-dev
force-pushed
the
feat/sandboxed-html-artifacts
branch
from
October 12, 2026 14:24
fe49878 to
2d26338
Compare
…files once - show_artifact returns the validated path as tool metadata; the chat card renders from it and maps repo paths with getWorkspaceFilePath, so local repos and moved sessions load the right file - serve .htm as text/html - raw file route stats and reads once and adds ETag/Last-Modified with 304 - reuse isPathWithinRoot from utils/fs-safe - move readShowArtifactCall to frontend/src/lib/artifactTool
chriswritescode-dev
force-pushed
the
feat/sandboxed-html-artifacts
branch
from
October 12, 2026 20:45
2d26338 to
5e24521
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
show_artifactaction to theocmmanager tool: the agent writes a self-contained HTML file and passes its path instead of resending the document on every fix..html/.htmonly, 5 MB cap) so a bad path fails the tool call immediately.Cache-Control: no-cacheandX-Content-Type-Options: nosniffso previews and artifacts reload the current file.Validation
files,internal-session-artifacts,opencode-manager-tool-plugin).pnpm lintpassed with 41 existing backend warnings.git diff --checkpassed.Summary by CodeRabbit