Skip to content

Update tweaks for recursive prompt discovery#3

Open
Darkamunday wants to merge 1 commit into
mobcat40:masterfrom
Darkamunday:tweaks
Open

Update tweaks for recursive prompt discovery#3
Darkamunday wants to merge 1 commit into
mobcat40:masterfrom
Darkamunday:tweaks

Conversation

@Darkamunday

@Darkamunday Darkamunday commented Jul 5, 2026

Copy link
Copy Markdown

By opening this pull request, I agree to the terms in
CONTRIBUTING.md
— including the grant that lets the
maintainer relicense my contribution (for example, under the MIT License).

What does this PR do?

Summary

This PR adds support for recursively discovering prompt pack JSON files.

Previously PromptChain only loaded prompt packs located directly inside the prompts directory. This change allows prompt packs to be organized into subfolders while remaining fully backwards compatible.

Example:

PromptChain/
└── prompts/
├── Characters/
├── Hair/
├── Eyes/
├── Clothing/
├── Lighting/
└── Styles/

Changes

  • Replace Path.glob("*.json") with Path.rglob("*.json") when loading prompt packs.
  • Replace Path.glob("*.json") with Path.rglob("*.json") when deleting prompts.
  • Update documentation comments to reflect recursive loading.

Testing

  • ✅ Prompt packs load correctly from the root prompts folder.
  • ✅ Prompt packs load correctly from nested subfolders.
  • ✅ Existing prompt packs continue to work unchanged.

Related issues

Checklist

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