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
42 lines · 1.0 KBRaw
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 list's window by so many files, clamped to the list; in the
14 * dialog the pick is dropped so the window leaves the file last viewed.
15 */
16 scrollList: (delta: number) => void
17
18 /**
19 * Shows or hides the tests and generated files.
20 */
21 toggleNoise: () => void
22
23 /**
24 * Opens or closes the pre-session section.
25 */
26 togglePreSession: () => void
27
28 /**
29 * Moves the comparison base on to the next mode, round to the first.
30 */
31 cycleBase: () => void
32
33 /**
34 * Picks the source by its Select value: `current` or a turn's number.
35 */
36 chooseSource: (value: string) => void
37
38 /**
39 * Arms this file's diff for the next prompt, or disarms it.
40 */
41 toggleAsk: (path: string) => void
42}