Download mods/diff/hooks/views/sections/title-row.tsx from SaylorTwift/claude-code: direct link, hf CLI and curl.
- Browser
- Download file 824 Bytes
-
https://huggingface.co/SaylorTwift/claude-code/resolve/main/mods/diff/hooks/views/sections/title-row.tsx
- Command line
-
hf download hf://SaylorTwift/claude-code/mods/diff/hooks/views/sections/title-row.tsx
-
curl -L -o title-row.tsx https://huggingface.co/SaylorTwift/claude-code/resolve/main/mods/diff/hooks/views/sections/title-row.tsx
824 Bytes
| /* @jsxRuntime classic */ | |
| /* @jsx h */ | |
| /* @jsxFrag Fragment */ | |
| import type { RenderElement } from 'claude-code' | |
| import type PaneState from '../../pane-state' | |
| import type { Kit } from '../kit' | |
| import Layout from '../layout' | |
| /** | |
| * The inline pane's heading (DiffDialog's title line): the title, then | |
| * its subtitle in dim after a space. | |
| * | |
| * @param kit the elements and the width | |
| * @param heading the title and subtitle | |
| * @returns the row | |
| */ | |
| export function titleRow( | |
| kit: Kit, | |
| heading: PaneState.DialogTitle, | |
| ): RenderElement { | |
| const { Text } = kit.ui | |
| const hasSubtitle = heading.subtitle !== '' | |
| return ( | |
| <Text wrap="truncate-end"> | |
| {Layout.sanitizeName(heading.title)} | |
| <Text dimColor> | |
| {hasSubtitle ? ` ${Layout.sanitizeName(heading.subtitle)}` : ''} | |
| </Text> | |
| </Text> | |
| ) | |
| } | |