Skip to content

[Theia AI] Handling of unresolved variables #15453

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

Closed
Tracked by #15068
JonasHelming opened this issue Apr 12, 2025 · 1 comment · Fixed by #15463
Closed
Tracked by #15068

[Theia AI] Handling of unresolved variables #15453

JonasHelming opened this issue Apr 12, 2025 · 1 comment · Fixed by #15463

Comments

@JonasHelming
Copy link
Contributor

JonasHelming commented Apr 12, 2025

Open Question: If project-info or other variables such as context summary in agent prompts do not exist, the variable remains unresolved like this "{{prompt:project-info}}"
We might consider to change this behavior:

We generally remove unresolved variables (and functions) => might be an issue for debugging
We remove prompt fragment only that cannot be resolved (i.e. return "")
We introduce a syntax like {{prompt:project-info}}? to make things that are optional

@planger WDYT?

@planger
Copy link
Contributor

planger commented Apr 13, 2025

Good question!

We generally remove unresolved variables (and functions) => might be an issue for debugging

Yeah, I'd not be in favor of that. Also if it would unexpectedly remove any text that matches the function or variable pattern from prompts.

We remove prompt fragment only that cannot be resolved (i.e. return "")

I think this is the best option. I'd output a log warning that prompt:abc wasn't found and then return an empty string. This also has the advantage that we are leaving that corner case to decide for the variable provider.

We introduce a syntax like {{prompt:project-info}}? to make things that are optional

Sounds a bit too much to me.

Thank you!

JonasHelming added a commit that referenced this issue Apr 14, 2025
- Unresolved prompt fragments
- Empty changesets

fixed #15453
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 a pull request may close this issue.

2 participants