diff --git a/.pi/hooks/status-demo.ts b/.pi/hooks/status-demo.ts
new file mode 100644
index 00000000..a9720f80
--- /dev/null
+++ b/.pi/hooks/status-demo.ts
@@ -0,0 +1,11 @@
+import type { HookAPI } from "@mariozechner/pi-coding-agent";
+
+export default function (pi: HookAPI) {
+ pi.on("turn_start", async (_event, ctx) => {
+ ctx.ui.setStatus("demo", "๐ Thinking...");
+ });
+
+ pi.on("turn_end", async (_event, ctx) => {
+ ctx.ui.setStatus("demo", "โ Ready");
+ });
+}
diff --git a/out.html b/out.html
new file mode 100644
index 00000000..a48dacfa
--- /dev/null
+++ b/out.html
@@ -0,0 +1,3263 @@
+
+
+
+
+
+ Session Export
+
+
+
+
+
+
+
+
+
+
+
+
+
![]()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/coding-agent/src/core/export-html/template.js b/packages/coding-agent/src/core/export-html/template.js
index f0c1dd01..431ae495 100644
--- a/packages/coding-agent/src/core/export-html/template.js
+++ b/packages/coding-agent/src/core/export-html/template.js
@@ -1058,17 +1058,26 @@
return marked.parse(escaped);
}
- // Configure marked
- marked.setOptions({
+ // Configure marked with syntax highlighting
+ marked.use({
breaks: true,
gfm: true,
- highlight: function(code, lang) {
- if (lang && hljs.getLanguage(lang)) {
- try {
- return hljs.highlight(code, { language: lang }).value;
- } catch {}
+ renderer: {
+ code(token) {
+ const code = token.text;
+ const lang = token.lang;
+ let highlighted;
+ if (lang && hljs.getLanguage(lang)) {
+ try {
+ highlighted = hljs.highlight(code, { language: lang }).value;
+ } catch {
+ highlighted = escapeHtml(code);
+ }
+ } else {
+ highlighted = escapeHtml(code);
+ }
+ return `${highlighted}
`;
}
- return escapeHtml(code);
}
});