Prompt Assembler Integration
Enable prompt-assembler support to expose reusable prompt recipes as virtual profiles.
Requirements
prompt-assembler(thepaCLI) must be onPATH.- tx v0.1.0 or newer.
- Configuration managed under the usual directories (
~/.config/txby default).
If pa returns an error or invalid JSON, tx hides the virtual profiles and prints a notice in the TUI footer.
Configuration
Create a drop-in file such as ~/.config/tx/conf.d/20-pa.toml:
[features.pa]
enabled = true
namespace = "pa"
namespacecontrols the prefix shown in the TUI (for examplepa/bootstrap).- Restart tx to refresh the list; the TUI re-runs
pa list --jsonwhen it launches.
Using Virtual Profiles
When the feature is active:
- Virtual entries appear in the profiles pane alongside regular profiles.
- The preview pane renders Markdown metadata (bold headings for provider, description, and tags) followed by a fenced code block labelled
markdownthat contains the assembled prompt frompa show --json <prompt-name>. Enterlaunches the pipeline immediately;Tabprints it for shell reuse.- When a previous session is highlighted you can press
Ctrl+Yto print its ID orCtrl+Eto export its transcript before switching back to the profile pane.
Behind the scenes tx inserts pa <prompt> as a pre snippet before your provider. Combine the feature with stdin_mode = "capture_arg" to pass assembled prompts as arguments:
[providers.codex]
bin = "codex"
flags = ["--search"]
stdin_mode = "capture_arg"
stdin_to = "codex:{prompt}"
With that configuration, selecting pa/hello captures the generator output and invokes the provider with codex --search "<prompt-text>".
Troubleshooting
- Run
tx doctorto confirmpais discoverable. - Increase logging with
RUST_LOG=tx=debug txif profiles disappear. - Restart tx after changing prompts in the
prompt-assemblerrepository.
Known limitation: additional metadata beyond tags and contents still requires future enhancements.