Skip to content

Conversation

prasad89
Copy link
Contributor

@prasad89 prasad89 commented Jul 8, 2025

This PR adds the ability to store task prompts in external files instead of embedding them directly in YAML configurations.

Key Changes

  • Added PromptFile field to ScriptStep struct
  • Implemented ResolvePrompt() method to load prompts from files or inline content
  • Refactored setup-dev-cluster task to use external setup-dev-cluster.md file
  • Maintains full backward compatibility with existing inline prompts

Benefits

  • Cleaner YAML configurations
  • Better maintainability for complex prompts
  • Improved editing experience with markdown files
  • Supports both absolute and relative file paths

@prasad89 prasad89 marked this pull request as ready for review July 8, 2025 11:58

// ResolvePrompt resolves the prompt from either inline or file source
func (s *ScriptStep) ResolvePrompt(baseDir string) (string, error) {
// If both are provided, promptFile takes precedence
Copy link
Member

Choose a reason for hiding this comment

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

I think we should simply fail when both are provided to avoid any confusion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

resolved :)

@prasad89 prasad89 requested a review from droot July 8, 2025 17:39
Copy link
Member

@droot droot left a comment

Choose a reason for hiding this comment

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

Thank you.

@droot droot merged commit a3c51bc into GoogleCloudPlatform:main Jul 8, 2025
6 checks passed
@prasad89 prasad89 deleted the prompt-file branch July 16, 2025 18:31
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.

2 participants