Skip to content

Commit 5182244

Browse files
PierrunoYTclaude
andauthored
Fix visual display issue with multi-line paste operations (#259)
Co-authored-by: Claude <noreply@anthropic.com>
1 parent c53aa37 commit 5182244

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

npm-app/src/cli.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,8 @@ export class CLI {
738738
this.detectPasting()
739739
if (this.isPasting) {
740740
this.pastedContent += line + '\n'
741+
// Suppress the prompt during paste mode to avoid multiple ">" prompts
742+
this.rl.setPrompt('')
741743
} else if (!this.isReceivingResponse) {
742744
const input = (this.pastedContent + line).trim()
743745
this.pastedContent = ''
@@ -1429,6 +1431,8 @@ export class CLI {
14291431
this.consecutiveFastInputs = 0
14301432
if (this.isPasting) {
14311433
this.isPasting = false
1434+
// Restore the normal prompt when paste mode ends
1435+
this.setPrompt()
14321436
}
14331437
}
14341438
this.lastInputTime = currentTime

0 commit comments

Comments
 (0)