Skip to content

Claude's answers, rendered: Markdown, math, charts and diagrams drawn in the Claude Code terminal. Independent project, not affiliated with Anthropic.

TypeScript claude-code-mod

Paste preview: one empty row above the previews

razorback16f928fb8a7b85
diff --git a/hooks/lib/composer.tsx b/hooks/lib/composer.tsx
index b3d9e73..82ffa60 100644
--- a/hooks/lib/composer.tsx
+++ b/hooks/lib/composer.tsx
@@ -235,11 +235,11 @@ function previewLines($: EngineInterface, e: BandInput | RowInput, lines: readon
)
}
-// The previews, then the band beneath (another plugin's or the engine's).
+// The previews one row under the transcript, then the band beneath (another plugin's or the engine's).
export function drawPreviews($: EngineInterface, e: BandInput, lines: readonly Preview[][], below: RenderElement) {
const { Box } = uiResolve($, e)
return (
- <Box flexDirection="column">
+ <Box flexDirection="column" marginTop={1}>
{previewLines($, e, lines, true)}
{below}
</Box>
diff --git a/hooks/register.tsx b/hooks/register.tsx
index 6c9669b..6d30498 100644
--- a/hooks/register.tsx
+++ b/hooks/register.tsx
@@ -1278,7 +1278,7 @@ export const register: Register = on => {
else {
// The same numbers written again: only the band reads them.
const redraw = () => void update($, draft, ns => [...ns]).catch(() => undefined)
- const made = await previewsOf($, e.viewport, ready.env, numbers, { columns: e.props.bodyColumns, maxRows: e.props.maxRows, labelled: true, redraw })
+ const made = await previewsOf($, e.viewport, ready.env, numbers, { columns: e.props.bodyColumns, maxRows: e.props.maxRows - 1, labelled: true, redraw })
lines = made.lines
if (made.isWhole && made.isFinal) memoSet(drafts, 'draft', k, lines)
else drafts.delete('draft')