spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / mods / diff / tests / fixtures / hint-at.ts
15 lines · 423 BRaw
1import type { RenderInput } from 'claude-code'
2
3import { HINT } from './hint.js'
4
5/**
6 * The prompt's hint on a terminal so many columns wide: drawing it is how
7 * the plugin learns the width.
8 *
9 * @param columns the terminal's width
10 * @returns the `ui.render` input
11 */
12export const hintAt = (columns: number): RenderInput<'PromptHint'> => ({
13 ...HINT,
14 viewport: { columns, rows: HINT.viewport?.rows ?? columns },
15})