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

fix: properly initialize custom agents #14354

Merged

Conversation

sdirix
Copy link
Member

@sdirix sdirix commented Oct 25, 2024

What it does

Prompt templates of newly added custom agents were not stored within the PromptService. As a consequence their prompt was ignored when invoked in Chat.

This issue is now fixed by restructuring the prompt storing mechanism. Prompts are now implicitly stored and removed based on all currently registered agents.

How to test

Use Case - Initial Prompt
  • Add a new custom agent
  • Adjust its prompt within the yaml file
  • Verify that the prompt is actually used by invoking the agent in the chat
Use Case - Modified Prompt
  • Open the custom agents yaml file (manually or by adding a new agent)
  • Modify the prompt of an agent (whose prompt is not overriden)
  • Verify that the prompt is actually used by invoking the agent in the chat
Use Case - Customized Prompt
  • Edit the prompt of a custom agent via the "Edit" button, i.e. not via the yaml file
  • Verify that the new prompt is actually used by invoking the agent in the chat
  • Reset the prompt
  • Verify that the initial prompt of the yaml file is used by invoking the agent in the chat

Review checklist

Reminder for reviewers

Prompt templates of newly added custom agents were not stored within
the PromptService. As a consequence their prompt was ignored when
invoked in Chat.

This issue is now fixed by restructuring the prompt storing mechanism.
Prompts are now implicitly stored and removed based on all currently
registered agents.
@sdirix sdirix marked this pull request as ready for review October 25, 2024 14:00
Copy link
Contributor

@planger planger left a comment

Choose a reason for hiding this comment

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

Thanks, looks good to me and works as advertised! 👍

@JonasHelming JonasHelming merged commit a5f26a3 into eclipse-theia:master Oct 28, 2024
11 checks passed
@sdirix sdirix deleted the initialize-custom-agents branch October 28, 2024 19:13
@jfaltermeier jfaltermeier added this to the 1.55.0 milestone Oct 30, 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.

4 participants