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 / entries / turn-entry-of / turn-entry-of.ts
19 lines · 541 BRaw
1import type Turns from '../../../turns'
2import type { BodyEntry } from '../body-entry'
3
4/**
5 * A turn's file as the pane draws it: its hunks come from the transcript,
6 * so its body is always in hand.
7 *
8 * @param file the turn's file
9 * @returns the entry
10 */
11export const turnEntryOf = (file: Turns.TurnFile): BodyEntry => ({
12 path: file.path,
13 displayPath: file.path,
14 added: file.added,
15 removed: file.removed,
16 isUntracked: false,
17 isBinary: false,
18 body: { hunks: file.hunks, isTruncated: file.isTruncated, isLarge: false },
19})