Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

feat(settings): mark HTML/SVG artifact rendering experimental

Akarshan Biswasd1cafcf4f8d0
diff --git a/web-app/src/locales/en/settings.json b/web-app/src/locales/en/settings.json
index c7838bb41..7cb420e4c 100644
--- a/web-app/src/locales/en/settings.json
+++ b/web-app/src/locales/en/settings.json
@@ -98,8 +98,8 @@
"showTokenSpeedDesc": "Display tokens/sec and token count inline below assistant messages. When off, a compact icon shows the details on click.",
"coloredUserBubble": "Colored user message bubble",
"coloredUserBubbleDesc": "Use the accent color as the background of your messages. When off, they match assistant messages with plain text on a neutral background.",
- "renderHtmlArtifacts": "Render interactive HTML",
- "renderHtmlArtifactsDesc": "Add a Preview tab to HTML code blocks that runs the model-generated page in a sandboxed frame. The page executes its own scripts but cannot access Jan, your files, or the network. Off by default.",
+ "renderHtmlArtifacts": "Render HTML & SVG artifacts",
+ "renderHtmlArtifactsDesc": "Add a Preview tab to HTML and SVG code blocks. HTML runs the model-generated page in a sandboxed frame that executes its own scripts but cannot access Jan, your files, or the network; SVG renders statically with scripts disabled. Off by default.",
"windowBackground": "Window Background",
"windowBackgroundDesc": "Set the app window's background color.",
"appMainView": "App Main View",
diff --git a/web-app/src/routes/settings/interface.tsx b/web-app/src/routes/settings/interface.tsx
index 5a26c9dcc..81d1791d8 100644
--- a/web-app/src/routes/settings/interface.tsx
+++ b/web-app/src/routes/settings/interface.tsx
@@ -85,7 +85,14 @@ function InterfaceSettings() {
}
/>
<CardItem
- title={t('settings:interface.renderHtmlArtifacts')}
+ title={
+ <span className="inline-flex items-center gap-2">
+ <span>{t('settings:interface.renderHtmlArtifacts')}</span>
+ <span className="text-xs bg-secondary border text-muted-foreground rounded-full py-0.5 px-2">
+ {t('common:experimental')}
+ </span>
+ </span>
+ }
description={t('settings:interface.renderHtmlArtifactsDesc')}
actions={
<Switch