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
| @@ -17,6 +17,7 @@ | ||
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | const kept: string[] = [] |
| 20 | + | |
| 20 | 21 | let used = ASK_CUT_NOTE.length |
| 21 | 22 | |
| 22 | 23 | for (const line of text.split('\n')) { |
| @@ -20,6 +20,7 @@ | ||
| 20 | 20 | const files: Types.FileStat[] = [] |
| 21 | 21 | const stats = { filesCount: 0, linesAdded: 0, linesRemoved: 0 } |
| 22 | 22 | const records = stdout.split('\0') |
| 23 | + | |
| 23 | 24 | let at = 0 |
| 24 | 25 | |
| 25 | 26 | while (at < records.length) { |
| @@ -41,6 +41,7 @@ | ||
| 41 | 41 | |
| 42 | 42 | async function kindOf(path: string): Promise<Types.WalkKind> { |
| 43 | 43 | const names = path === '' ? [] : path.split('/') |
| 44 | + | |
| 44 | 45 | let directory = '' |
| 45 | 46 | |
| 46 | 47 | for (const [depth, name] of names.entries()) { |
| @@ -43,8 +43,11 @@ | ||
| 43 | 43 | let isRefreshQueued = false |
| 44 | 44 | let generation = 0 |
| 45 | 45 | let bodyKey: string | null = null |
| 46 | + | |
| 46 | 47 | const polled = { toplevel: '', headKey: '' } |
| 48 | + | |
| 47 | 49 | let model: PaneState.PaneModel = PaneState.INITIAL_MODEL |
| 50 | + | |
| 48 | 51 | const timers = new Map<'refresh' | 'redraw' | 'poll', Timer>() |
| 49 | 52 | const loggedBaseKinds = new Set<'ok' | 'sad'>() |
| 50 | 53 |
| @@ -23,6 +23,7 @@ | ||
| 23 | 23 | */ |
| 24 | 24 | export function codeBlocksOf(hunks: readonly Git.Hunk[]): Types.CodeBody { |
| 25 | 25 | const blocks: Types.CodeBlock[] = [] |
| 26 | + | |
| 26 | 27 | let chars = 0 |
| 27 | 28 | let nodes = 0 |
| 28 | 29 | let isTruncated = false |
| @@ -19,6 +19,7 @@ | ||
| 19 | 19 | maxChars: number, |
| 20 | 20 | ): Pick<Git.FileHunks, 'hunks' | 'isTruncated'> { |
| 21 | 21 | const hunks: Git.Hunk[] = [] |
| 22 | + | |
| 22 | 23 | let rest = hunk |
| 23 | 24 | let isTruncated = false |
| 24 | 25 |
| @@ -18,6 +18,7 @@ | ||
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | const characters = [...text] |
| 21 | + | |
| 21 | 22 | let kept = '' |
| 22 | 23 | |
| 23 | 24 | for (let at = characters.length - 1; at >= 0; at--) { |
| @@ -18,6 +18,7 @@ | ||
| 18 | 18 | |
| 19 | 19 | for (const [index, word] of words.entries()) { |
| 20 | 20 | const wordWidth = cellWidth(word) |
| 21 | + | |
| 21 | 22 | let rowWidth = cellWidth(rows[rows.length - 1] ?? '') |
| 22 | 23 | |
| 23 | 24 | if (index !== 0) { |
| @@ -39,6 +40,7 @@ | ||
| 39 | 40 | } |
| 40 | 41 | |
| 41 | 42 | const characters = [...word] |
| 43 | + | |
| 42 | 44 | let visible = cellWidth(rows[rows.length - 1] ?? '') |
| 43 | 45 | |
| 44 | 46 | for (const [at, character] of characters.entries()) { |