@@ -115,53 +115,6 @@ t if invoked from a transient frame (quitting closes the frame).")
115
115
:keymap chatgpt-shell-prompt-compose-view-mode-map
116
116
(setq buffer-read-only chatgpt-shell-prompt-compose-view-mode))
117
117
118
- ;;;### autoload
119
- (defun chatgpt-shell-prompt-compose (prefix )
120
- " Compose and send prompt from a dedicated buffer.
121
-
122
- With PREFIX, clear existing history (wipe asociated shell history).
123
-
124
- Whenever `chatgpt-shell-prompt-compose' is invoked, appends any active
125
- region (or flymake issue at point) to compose buffer.
126
-
127
- Additionally, if point is at an error/warning raised by flymake,
128
- automatically add context (error/warning + code) to expedite ChatGPT
129
- for help to fix the issue.
130
-
131
- The compose buffer always shows the latest interaction, but it's
132
- backed by the shell history. You can always switch to the shell buffer
133
- to view the history.
134
-
135
- Editing: While compose buffer is in in edit mode, it offers a couple
136
- of magit-like commit buffer bindings.
137
-
138
- `\\ [chatgpt-shell-prompt-compose-send-buffer]` to send the buffer query.
139
- `\\ [chatgpt-shell-prompt-compose-cancel]` to cancel compose buffer.
140
- `\\ [chatgpt-shell-prompt-compose-search-history]` search through history.
141
- `\\ [chatgpt-shell-prompt-compose-previous-history]` cycle through previous
142
- item in history.
143
- `\\ [chatgpt-shell-prompt-compose-next-history]` cycle through next item in
144
- history.
145
-
146
- Read-only: After sending a query, the buffer becomes read-only and
147
- enables additional key bindings.
148
-
149
- `\\ [chatgpt-shell-prompt-compose-send-buffer]` After sending offers to abort
150
- query in-progress.
151
- `\\ [View-quit]` Exits the read-only buffer.
152
- `\\ [chatgpt-shell-prompt-compose-retry]` Refresh (re-send the query). Useful
153
- to retry on disconnects.
154
- `\\ [chatgpt-shell-prompt-compose-next-item]` Jump to next source block.
155
- `\\ [chatgpt-shell-prompt-compose-previous-item]` Jump to next previous block.
156
- `\\ [chatgpt-shell-prompt-compose-reply]` Reply to follow-up with additional questions.
157
- `\\ [chatgpt-shell-prompt-compose-request-entire-snippet]` Send \" Show entire snippet\" query.
158
- `\\ [chatgpt-shell-prompt-compose-insert-block-at-point]` Insert block at point at last known location.
159
- `\\ [chatgpt-shell-prompt-compose-request-more]` Send \" Show me more\" query.
160
- `\\ [chatgpt-shell-prompt-compose-other-buffer]` Jump to other buffer (ie. the shell itself).
161
- `\\ [chatgpt-shell-mark-block]` Mark block at point."
162
- (interactive " P" )
163
- (chatgpt-shell-prompt-compose-show-buffer :clear-history prefix))
164
-
165
118
(defvar-local chatgpt-shell--ring-index nil )
166
119
167
120
(cl-defun chatgpt-shell-prompt-compose-show-buffer (&key content clear-history transient-frame-p )
0 commit comments