Skip to content

A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.

Make the screenshot repair hook optional in bare contexts

Fei2411b4aaab26330a
diff --git a/ds-bot/src/host/browser/mount.js b/ds-bot/src/host/browser/mount.js
index 01ab0f90..c1fc6d2d 100644
--- a/ds-bot/src/host/browser/mount.js
+++ b/ds-bot/src/host/browser/mount.js
@@ -73,7 +73,7 @@ export function mountBrowserPlugin(ctx, { toolDefs, defineTool, keyOf, profileRo
// Tool results persist their rendered blocks, so changing render() cannot fix
// old screenshots. Replace only this plugin's malformed image blocks through
// DSH's public surface API, keeping the original log for the transcript.
- ctx.on('agent/pre-step', async ({ agent }, next) => {
+ ctx.on?.('agent/pre-step', async ({ agent }, next) => {
const session = agent.session
let changed = false
for (const seq of session.surface?.nodes ?? []) {