File tree Expand file tree Collapse file tree 4 files changed +47
-8
lines changed
testdata/format/claude/auto-accept-edits Expand file tree Collapse file tree 4 files changed +47
-8
lines changed Original file line number Diff line number Diff line change @@ -21,16 +21,21 @@ func removeClaudeMessageBox(msg string) string {
2121 }
2222 }
2323
24- if strings .HasPrefix (trimmedLastLine (), "? for shortcuts" ) {
25- popLine ()
26- }
27- msgBoxEdge := "───────────────"
28- if strings .Contains (trimmedLastLine (), msgBoxEdge ) {
29- popLine ()
24+ // The ">" symbol is often used to indicate the user input line.
25+ // We remove all lines including and after the last ">" symbol
26+ // in the message.
27+ greaterThanLineIdx := - 1
28+ for i := len (lines ) - 1 ; i >= max (len (lines )- 6 , 0 ); i -- {
29+ if strings .Contains (lines [i ], ">" ) {
30+ greaterThanLineIdx = i
31+ break
32+ }
3033 }
31- if strings . Contains ( trimmedLastLine (), ">" ) {
32- popLine ()
34+ if greaterThanLineIdx >= 0 {
35+ lines = lines [: greaterThanLineIdx ]
3336 }
37+
38+ msgBoxEdge := "───────────────"
3439 if strings .Contains (trimmedLastLine (), msgBoxEdge ) {
3540 popLine ()
3641 }
Original file line number Diff line number Diff line change 1+ ╭────────────────────────────────────────────╮
2+ │ ✻ Welcome to Claude Code research preview! │
3+ │ │
4+ │ /help for help │
5+ │ │
6+ │ cwd: /Users/hugodutka/dev/agentapi │
7+ ╰────────────────────────────────────────────╯
8+
9+ Tips for getting started:
10+
11+ 1. Run /init to create a CLAUDE.md file with instructions for Claude
12+ 2. Run /terminal-setup to set up terminal integration
13+ 3. Use Claude to help with file analysis, editing, bash commands and git
14+ 4. Be as specific as you would with another engineer for the best results
Original file line number Diff line number Diff line change 1+ ╭────────────────────────────────────────────╮
2+ │ ✻ Welcome to Claude Code research preview! │
3+ │ │
4+ │ /help for help │
5+ │ │
6+ │ cwd: /Users/hugodutka/dev/agentapi │
7+ ╰────────────────────────────────────────────╯
8+
9+ Tips for getting started:
10+
11+ 1. Run /init to create a CLAUDE.md file with instructions for Claude
12+ 2. Run /terminal-setup to set up terminal integration
13+ 3. Use Claude to help with file analysis, editing, bash commands and git
14+ 4. Be as specific as you would with another engineer for the best results
15+
16+ ╭──────────────────────────────────────────────────────────────────────────────╮
17+ │ > │
18+ ╰──────────────────────────────────────────────────────────────────────────────╯
19+ ⏵⏵ auto-accept edits on (shift+tab to ✓ Update installed • Restart to
20+ toggle) apply
You can’t perform that action at this time.
0 commit comments