mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
feat: surface the run_code program in the ACP tool-call card
The generated program rode only rawInput — the detail/expanded slot many ACP clients never open — so the code a run executed was invisible in the UI stream. presentCall now also carries it as a fenced ts block in the card's content, which the bridge already forwards as tool_call content. The two code-mode snapshot goldens are re-recorded live and replay green; the presentation unit test pins the fenced block.
This commit is contained in:
@@ -289,7 +289,17 @@ export function createRunCodeTool(registry: ToolRegistry, requireRuntime: () =>
|
||||
exec.signal?.removeEventListener('abort', onOuterAbort)
|
||||
}
|
||||
},
|
||||
presentCall: args => ({ card: 'generic', title: 'Run code', kind: 'execute', rawInput: args.code }),
|
||||
// The program IS the call: surface it as an always-visible fenced block in
|
||||
// the card body (rawInput alone lands in detail/expanded views many
|
||||
// clients never open). Fence collisions are impossible to break rendering
|
||||
// — a backtick run inside the program at worst ends the block early.
|
||||
presentCall: args => ({
|
||||
card: 'generic',
|
||||
title: 'Run code',
|
||||
kind: 'execute',
|
||||
rawInput: args.code,
|
||||
content: [{ type: 'text', text: `\`\`\`ts\n${args.code}\n\`\`\`` }],
|
||||
}),
|
||||
presentResult: (_args, result) => {
|
||||
const meta = asRunCodeMeta(result.meta)
|
||||
if (!meta) return undefined
|
||||
|
||||
Reference in New Issue
Block a user