Skip to content

Add environments field support to pull function#100

Draft
Parker Henderson (parkerhendo) wants to merge 3 commits intomainfrom
feat-functions-pull-prompt-environments
Draft

Add environments field support to pull function#100
Parker Henderson (parkerhendo) wants to merge 3 commits intomainfrom
feat-functions-pull-prompt-environments

Conversation

@parkerhendo
Copy link
Copy Markdown
Contributor

@parkerhendo Parker Henderson (parkerhendo) commented Apr 7, 2026

TL;DR

Added support for environments field in prompt configurations with automatic slug normalization.

What changed?

  • Added environments field to PullFunctionRow and NormalizedPrompt structs
  • Implemented normalize_environment_slugs function that extracts slug values from environment objects or accepts string values directly
  • Added environments rendering support for both TypeScript and Python project file generation
  • Environments are normalized to arrays of string slugs, filtering out empty values and trimming whitespace

How to test?

  • Create prompts with environments configured as objects with slug fields or as string arrays
  • Run the pull command and verify that environments are properly rendered in generated TypeScript and Python files
  • Test that empty slugs and whitespace are properly handled during normalization

Why make this change?

This enables prompts to specify which environments they should be available in, providing better organization and deployment control for prompt configurations across different runtime environments.

@parkerhendo Parker Henderson (parkerhendo) changed the title feat(functions): preserve prompt environments in pull output Add environments field support to pull function Apr 7, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Latest downloadable build artifacts for this PR commit 9a81f27a8ff5:

Available artifact names
  • ``artifacts-build-global
  • ``artifacts-build-local-x86_64-apple-darwin
  • ``artifacts-build-local-x86_64-pc-windows-msvc
  • ``artifacts-build-local-x86_64-unknown-linux-musl
  • ``artifacts-build-local-x86_64-unknown-linux-gnu
  • ``artifacts-build-local-aarch64-unknown-linux-musl
  • ``artifacts-build-local-aarch64-unknown-linux-gnu
  • ``artifacts-build-local-aarch64-apple-darwin
  • ``artifacts-plan-dist-manifest
  • ``cargo-dist-cache

@parkerhendo Parker Henderson (parkerhendo) force-pushed the feat-functions-pull-prompt-environments branch from beebd7c to 9a81f27 Compare April 7, 2026 23:53
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