Closed Stebalien closed 5 months ago
Today I learn. Thank you. I will fix it.
Ah, sorry, I was already working on a fix. See #62.
@Stebalien Merged. But after merge I realized that it breaks request cancel functionality for non-chat and non-instant buffers. Like ellama-add-code
, ellama-complete
or ellama-make-concise
etc.
I will fix it now by enable ellama-instant-mode
in this buffers.
@Stebalien Thank you!
I will fix it now by enable ellama-instant-mode in this buffers.
In that case, I'd consider renaming it to something like ellama-request-mode
and only turning it on while the request is ongoing (maybe even in ellama-session-mode
buffers?).
Since its changes buffer-local I don't think we should turn it off. But move it into ellama-stream
looks promising... Maybe it's good idea
Yeah, I guess there's little harm in leaving it on. I was just thinking users might want to bind keys that are only active when actively querying ellama.
@Stebalien see #67
Please try to avoid advising global functions for mode-local functionality. Advice is a last-ditch "there's no other way" method.
ellama-session-mode
and bind[remap keyboard-quit]
in its keymap.kill-buffer
, add a buffer-local hook tokill-buffer-hook
.save-buffer
, add a buffer-local function towrite-file-functions
and return non-nil.