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 / pane-view / bodies-of.ts
14 lines · 437 BRaw
1import type Git from '../../../hooks/git'
2import type PaneState from '../../../hooks/pane-state'
3
4/**
5 * The pane's read bodies holding one body under each of the given paths.
6 *
7 * @param body the body every path reads
8 * @param paths the files that have it
9 * @returns the bodies by path
10 */
11export const bodiesOf = (
12 body: Git.FileHunks,
13 ...paths: readonly string[]
14): PaneState.Bodies => new Map(paths.map(path => [path, body]))