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
19 lines · 469 BRaw
1import type { RenderInput } from 'claude-code'
2
3import { HINT } from './hint.js'
4
5/**
6 * The prompt's hint on a fullscreen terminal so many columns wide: drawing
7 * it is how 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: {
15 columns,
16 rows: HINT.viewport?.rows ?? columns,
17 isFullscreen: true,
18 },
19})