Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transient issue when selecting a model in gptel-menu #583

Open
1 task done
qazwsxpawel opened this issue Jan 25, 2025 · 6 comments
Open
1 task done

Transient issue when selecting a model in gptel-menu #583

qazwsxpawel opened this issue Jan 25, 2025 · 6 comments
Labels
bug Something isn't working

Comments

@qazwsxpawel
Copy link

Please update gptel first -- errors are often fixed by the time they're reported.

  • I have updated gptel to the latest commit and tested that the issue still exists

Bug Description

After selecting a model (-m, helm) I don't get back to gptel-menu transient, but I see a 'split' of the current buffer, in transient state (?)
Please note that I actually I don't quite know what exactly is happening only the effect, so my description might be misleading.
Hopefully this helps:

Image

Please see the repro steps below for description of what's happening.
Let me know if additional clarification is needed :)

Backend

None

Steps to Reproduce

  • open the gptel-menu,
  • press -m to select a model,
  • helm pops up with lists of models,
  • pick a model
  • expected: go back to gptel-menu transient (?)
  • actual: get the contents of the current buffer in a 'split' (?)
    • you can see the keys being sent to that transient (Unbound suffix: j in the minibuffer—me trying to navigate with vim bindings, keys that are actually bound, e.g. =, produce appropriate message in the minibuffer but no change in the menu transient)

Additional Context

Emacs

GNU Emacs 29.1 (build 2, aarch64-apple-darwin21.5.0, NS appkit-2113.50 Version 12.4 (Build 21F79)) of 2024-01-11
Spacemacs running on an up-to-date dev branch.

Gptel

Version: 20250125.544
Commit: 43c42e27634a5a705b0589aaa9047ae906a1faeb

Backtrace

Log Information

I `(setq gptel-log-level 'debug)` but I don't see the `*gptel-log*` buffer 🤷
Please let me know if this would be helpful and how to troubleshoot if you think it's worth it.
@qazwsxpawel qazwsxpawel added the bug Something isn't working label Jan 25, 2025
@karthink
Copy link
Owner

Looks like an issue in the latest Transient release. What is your version of Transient? (M-x find-library, transient, look at the file header)

@sashkachan
Copy link

sashkachan commented Jan 26, 2025

I am on

(defconst transient-version "0.8.3")

And have a similar issue.
I used to get it on the model selection like the OP (I think I had an older transient version).

With the current version, model selection issue does not occur, however the same problem happens on rewrite (only when I alter the rewrite prompt).

@qazwsxpawel
Copy link
Author

(defconst transient-version "0.8.3")

I am on the same version as @sashkachan here ^^^

@karthink thanks for looking into this!

@karthink
Copy link
Owner

karthink commented Jan 26, 2025 via email

@seunghoonha
Copy link

Hi @karthink,

I’m experiencing the same issue as described in this thread and wanted to provide additional details.

Issue Summary
gptel-menu opens in the same window where it was invoked, as expected.
However, interacting with certain options inside gptel-menu (such as -b, -f, e, g, b, -m, -i, -t) unexpectedly triggers a new window of the original buffer.
The newly opened window covers most of the screen, while the gptel-menu window remains open but smaller in the background.
This means gptel-menu itself is not duplicating, but something is causing the original buffer to open in a new window, unexpectedly taking over the layout.
Additional Observations
This happens consistently when interacting with the affected options.
There is no flicker or visible window rearrangement beforehand—only the new window suddenly appears.
If gptel-menu is opened in a separate window, the issue still occurs.
What This Suggests
The issue seems related to how gptel-menu processes commands like model selection, buffer management, or response target switching.
It’s possible that an implicit window refresh is being triggered inside gptel-menu, forcing the original buffer to display again in a new window.
Since this behavior persists even when rolling back transient versions, it may not be solely due to transient's recent changes.
I’ve also attached a screenshot to illustrate the issue. Let me know if I can provide any more details or debugging steps. Thanks for your time! 🚀

Image

@sashkachan
Copy link

From my experience, setting transient-show-during-minibuffer-read to true seems to eliminate the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants