Skip to content

Bugfix: Fixed TemplateObject[...] usage in "Prompts"#1391

Merged
rhennigan merged 1 commit intomainfrom
bugfix/prompt-templates
Feb 13, 2026
Merged

Bugfix: Fixed TemplateObject[...] usage in "Prompts"#1391
rhennigan merged 1 commit intomainfrom
bugfix/prompt-templates

Conversation

@rhennigan
Copy link
Member

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug in how TemplateObject instances are handled within prompt configurations. The bug involved symbols in $CellContext not being properly resolved when templates were applied, and insufficient error handling when template application produced unexpected results.

Changes:

  • Added replaceCellContext transformation before TemplateApply to properly resolve symbols from $CellContext to the current package context
  • Added validation with a new checkPromptComponent function to ensure template results are strings and provide clear error messages
  • Added a new error message InvalidPromptComponent for better diagnostics

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rhennigan rhennigan merged commit 1bb84f0 into main Feb 13, 2026
7 checks passed
@rhennigan rhennigan deleted the bugfix/prompt-templates branch February 13, 2026 20:01
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.

1 participant