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

Add enable state of agent to preferences #14206

Merged
merged 2 commits into from
Sep 20, 2024

Conversation

eneufeld
Copy link
Contributor

@eneufeld eneufeld commented Sep 20, 2024

What it does

The selected model was already persisted in the preferences,
but the enablement state was not.
Here the settings were extended to include the enablement state.
The new setting is consumed and updated from the AgentService.

Fixes #14205

How to test

Enable/Disable an agent and reload the page and check the agent has the same state of enablement as before the reload.

Follow-ups

Review checklist

Reminder for reviewers

@eneufeld
Copy link
Contributor Author

this is currently based on #14177 and will be rebased as soon as the other one is merged

The selected model was already persisted in the preferences,
but the enablement state was not.
Here the settings were extended to include the enablement state.
The new setting is consumed and updated from the AgentService.

Fixes eclipse-theia#14205
Copy link
Member

@sdirix sdirix left a comment

Choose a reason for hiding this comment

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

Works great for me. Thanks!


@injectable()
export class AISettingsService {
export class AISettingsServiceImpl implements AISettingsService {
@inject(PreferenceService) protected preferenceService: PreferenceService;
static readonly PREFERENCE_NAME = 'ai.settings';
Copy link
Member

@sdirix sdirix Sep 20, 2024

Choose a reason for hiding this comment

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

Not directly related to this PR but we should align this with the other preferences we store, i.e. this should be

Suggested change
static readonly PREFERENCE_NAME = 'ai.settings';
static readonly PREFERENCE_NAME = 'ai-features.agentSettings';

Edit: done with 574940b

@JonasHelming JonasHelming merged commit 31c776e into eclipse-theia:master Sep 20, 2024
11 checks passed
@sgraband sgraband added this to the 1.54.0 milestone Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

AI Agent settings are not persisted
4 participants