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 / file-key-of / file-key-of.ts
9 lines · 281 BRaw
1import Layout from '../../layout'
2
3/**
4 * A file row's Button address: the path made printable, under `file:`.
5 *
6 * @param path the file's path as git or the transcript gave it
7 * @returns the key
8 */
9export const fileKeyOf = (path: string) => `file:${Layout.sanitizeName(path)}`