Closed Lenbok closed 1 year ago
Thanks for the PR! I'll play with it a little and see if I can make it more generic.
Made it configurable. It uses read-string by default, but can be changed like the following for your use case. Should also help grow the history over time.
(setq chatgpt-shell-read-string-function
(lambda (prompt history)
(completing-read prompt (symbol-value history) nil nil nil history)))
edit fixing typos
I get funcall-interactively: Symbol’s value as variable is void: chatgpt-shell--chatgpt-prompt-history
when calling the function.
Sorry about that. Try latest again.
Use completing read pre-populated with some example prompts. Works nicely with vertico etc.