Skip to content

[feature] allow images to be displayed in output view and copilot view #1355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sinedied opened this issue Mar 24, 2025 · 2 comments
Open
Labels
bug Something isn't working

Comments

@sinedied
Copy link

When using the generateImage() function, if you have the model to create markdown links to display the images, it will be blocked and not displayed.

In the output view, I once got a security prompt asking me if I wanted to show the blocked content, but despite allowing it images are never displayed. I noticed the URLs gets prefixed by sandbox: which may be related.

The same occurs in the Copilot output, though I got it working by adding manually the image link to the output like this:

env.output.appendContent(`![](${image.filename})`

Using this method the images gets displayed in Copilot window, but still not in the output view. When using this, I don't get the sandbox: prefix.

Copy link

This issue highlights a key inconsistency in how images are handled across the Output and Copilot views. The blocking of markdown links prefixed with sandbox: in the Output view, despite successfully displaying images by manually inserting the link as ![](${image.filename}) in the Copilot view, warrants further investigation. It’s crucial to understand why the sandbox: prefix causes blocking in one context but not the other. Further investigation should focus on the underlying mechanisms governing content display and security restrictions within the GenAIScript environment.

AI-generated content by issue-reviewer may be incorrect

@pelikhan pelikhan added the bug Something isn't working label Mar 24, 2025
@pelikhan
Copy link
Member

pelikhan commented Apr 1, 2025

I've been chasing this one... the preferred method should be

await output.image(...)

because I create a cached copy of the image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants