I found that if I save the transcript and clean the buffer, chatgpt doesn't know the conversation that happened before (which I think it shouldn't, that's why I clean and start a new conversation).
But if I save the previous conversation and then I want to save the new thread, it will save to the old file.
I find shell-maker--file is set after the first save.
I am thinking can we (setf shell-maker--file nil) after the chatgpt-shell-clear-buffer
Ideas:
change the chatgpt-shell-clear-buffer to function that give nil to shell-maker--file then call the comint-clear-buffer. But it will let chatgpt-shell set the value in shell-marker. It breaks your design. What do you think?
maybe add one config var (reset-file-after-clean) that control the behavior of this feature. Like if after clean the buffer and the comint-clear-buffer is 'continue, the next save can append to the old file (but then we need handle the duplication content from multiple savings); if comint-clear-buffer is 'new-file, save to new file.
I found that if I save the transcript and clean the buffer, chatgpt doesn't know the conversation that happened before (which I think it shouldn't, that's why I clean and start a new conversation).
But if I save the previous conversation and then I want to save the new thread, it will save to the old file.
I find
shell-maker--file
is set after the first save.https://github.com/xenodium/chatgpt-shell/blob/0efead292f053774bba3c0789370e8e383aa49ec/shell-maker.el#L949
and the second save will use the
shell-maker--file
I just gave.I find the
chatgpt-shell-clear-buffer
actually the alias ofcomint-clear-buffer
.https://github.com/xenodium/chatgpt-shell/blob/0efead292f053774bba3c0789370e8e383aa49ec/chatgpt-shell.el#L545
I am thinking can we
(setf shell-maker--file nil)
after thechatgpt-shell-clear-buffer
Ideas:
chatgpt-shell-clear-buffer
to function that give nil toshell-maker--file
then call thecomint-clear-buffer
. But it will let chatgpt-shell set the value in shell-marker. It breaks your design. What do you think?reset-file-after-clean
) that control the behavior of this feature. Like if after clean the buffer and thecomint-clear-buffer
is 'continue, the next save can append to the old file (but then we need handle the duplication content from multiple savings); ifcomint-clear-buffer
is 'new-file, save to new file.Best, Thanks