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

Set default LLM to the last one used #1263

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

pkukielka
Copy link
Contributor

Changes

User LLM selection is now saved and used for subsequest chats/edits.
TODO: new API for commands is needed to suport the same.

Test plan

Manual tests according to QA guide

@@ -53,10 +50,6 @@ class FixupService(val project: Project) : Disposable {
return true
}

fun setCurrentModel(model: ChatModelsResponse.ChatModelProvider) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Value never used.

@pkukielka pkukielka force-pushed the pkukielka/fix-llm-selection-for-commands branch from af11c2f to 97a298c Compare April 2, 2024 13:23
@@ -48,7 +48,7 @@ class EditCommandPrompt(val controller: FixupService, val editor: Editor, val di
LlmDropdown(
modelUsage = ModelUsage.EDIT,
project = controller.project,
onSetSelectedItem = controller::setCurrentModel,
onSetSelectedItem = {},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this callback should persist the default for the inline edits, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, @danielmarquespt said the default between edits and chats should be the same.
We are already saving the default in LlmDropdown::setSelectedItem

Copy link
Contributor

@mkondratek mkondratek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@pkukielka pkukielka force-pushed the pkukielka/fix-llm-selection-for-commands branch from 97a298c to b309f9f Compare April 2, 2024 16:34
@pkukielka pkukielka merged commit afb1288 into main Apr 2, 2024
5 checks passed
@pkukielka pkukielka deleted the pkukielka/fix-llm-selection-for-commands branch April 2, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants