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 / hooks / views / sections / body-key-of / body-key-of.ts
10 lines · 340 BRaw
1import Layout from '../../layout'
2
3/**
4 * The key of a file's block in the docked body, under `body:`: what a row's
5 * press scrolls to (`$.ui.scroll({ to: { key } })`).
6 *
7 * @param path the file's path as git or the transcript gave it
8 * @returns the key
9 */
10export const bodyKeyOf = (path: string) => `body:${Layout.sanitizeName(path)}`