We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1dcf639 commit bc69a0cCopy full SHA for bc69a0c
ai-code-interface.el
@@ -68,8 +68,10 @@ with a newline separator."
68
"Read a prompt from the user and send it to the AI service."
69
(interactive)
70
(let ((initial-input (when (use-region-p)
71
- (buffer-substring-no-properties (region-beginning)
72
- (region-end)))))
+ (string-trim-right
+ (buffer-substring-no-properties (region-beginning)
73
+ (region-end))
74
+ "\n"))))
75
(when-let ((prompt (ai-code-read-string "Send to AI: " initial-input)))
76
(ai-code--insert-prompt prompt))))
77
0 commit comments