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 / pane-actions / pane-actions.ts
41 lines · 951 BRaw
1/**
2 * What the pane's Buttons and Selects do, each closing over the plugin's
3 * state in its register function.
4 */
5export type PaneActions = {
6 /**
7 * Docked, scrolls the body to this file's hunks; inline, picks the file
8 * and opens its detail.
9 */
10 selectFile: (path: string) => void
11
12 /**
13 * Moves the docked list's window by so many files, clamped to the list.
14 */
15 scrollList: (delta: number) => void
16
17 /**
18 * Shows or hides the tests and generated files.
19 */
20 toggleNoise: () => void
21
22 /**
23 * Opens or closes the pre-session section.
24 */
25 togglePreSession: () => void
26
27 /**
28 * Moves the comparison base on to the next mode, round to the first.
29 */
30 cycleBase: () => void
31
32 /**
33 * Picks the source by its Select value: `current` or a turn's number.
34 */
35 chooseSource: (value: string) => void
36
37 /**
38 * Arms this file's diff for the next prompt, or disarms it.
39 */
40 toggleAsk: (path: string) => void
41}