Improved prompt function add add ctx.* functions (#301)

This commit is contained in:
Gregory Schier
2025-11-15 08:19:58 -08:00
committed by GitHub
parent 7ced183b11
commit 84219571e8
29 changed files with 454 additions and 150 deletions

View File

@@ -117,6 +117,7 @@ async fn cmd_render_template<R: Runtime>(
template: &str,
workspace_id: &str,
environment_id: Option<&str>,
purpose: Option<RenderPurpose>,
) -> YaakResult<String> {
let environment_chain =
app_handle.db().resolve_environments(workspace_id, None, environment_id)?;
@@ -126,7 +127,7 @@ async fn cmd_render_template<R: Runtime>(
&PluginTemplateCallback::new(
&app_handle,
&PluginContext::new(&window),
RenderPurpose::Preview,
purpose.unwrap_or(RenderPurpose::Preview),
),
&RenderOptions {
error_behavior: RenderErrorBehavior::Throw,