HTML artifacts: render agent-sent HTML/CSS/JS code blocks in an in-app WebView (Android platform WebView, desktop JCEF/KCEF) via a full-screen preview; artifact card with Preview button + code toggle, shown only once the message stops streaming; webview-multiplatform 1.9.40 + KCEF deps, detection + unit tests
This commit is contained in:
1 parent
8100730cba
commit
a8c4418aff
11 files changed
+479
-3
No files matched your search
@@ -28,6 +28,16 @@ compose.desktop {
|
||||
}
|
||||
}
|
||||
|
||||
// M9: KCEF (JCEF/Chromium) for HTML artifact previews needs AWT reflection
|
||||
// access on modern JDKs. Applied to the `run` task (JavaExec) and, below, to
|
||||
// the jpackage `--java-options`.
|
||||
afterEvaluate {
|
||||
tasks.withType<JavaExec> {
|
||||
jvmArgs("--add-opens", "java.desktop/sun.awt=ALL-UNNAMED")
|
||||
jvmArgs("--add-opens", "java.desktop/java.awt.peer=ALL-UNNAMED")
|
||||
}
|
||||
}
|
||||
|
||||
// ── M6: native packaging (docs/11 §11.4) ─────────────────────────────────
|
||||
// `./gradlew :desktopApp:jpackage` builds a self-contained app image under
|
||||
// build/jpackage (JRE bundled). `./gradlew :desktopApp:jpackage
|
||||
@@ -78,5 +88,8 @@ tasks.register<Exec>("jpackage") {
|
||||
"--icon", file("src/main/resources/icon.png").absolutePath,
|
||||
"--dest", destDir.absolutePath,
|
||||
"--java-options", "-Xmx1g",
|
||||
// M9: KCEF (JCEF) AWT reflection access (see the JavaExec block above).
|
||||
"--java-options", "--add-opens=java.desktop/sun.awt=ALL-UNNAMED",
|
||||
"--java-options", "--add-opens=java.desktop/java.awt.peer=ALL-UNNAMED",
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user