feat(templates): add auto-run toggle for templates#217
Closed
JiahaoZhu11 wants to merge 4 commits intodifferent-ai:devfrom
Closed
feat(templates): add auto-run toggle for templates#217JiahaoZhu11 wants to merge 4 commits intodifferent-ai:devfrom
JiahaoZhu11 wants to merge 4 commits intodifferent-ai:devfrom
Conversation
Add ability to control whether templates automatically run when selected or just populate the prompt input for manual review.
Changes:
- Add auto-run toggle (On/Off) in template creation modal with hint text
- Persist autoRun setting in Rust backend (workspace/templates.rs)
- Update template YAML frontmatter serialization to include autoRun field
- Set default workspace templates to auto-run enabled
- Fix bug where YAML frontmatter parser returned string values ("true"/"false")
instead of booleans, causing autoRun: false to be ignored
When autoRun is disabled, the template prompt is populated in the input
field but not automatically sent, allowing users to review/edit before
submitting.
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
Contributor
Author
|
Closing in favor of #224, which includes this auto-run toggle feature along with additional quick start templates functionality. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Frontend (TypeScript/SolidJS)
types.ts- AddautoRun?: booleanto Template typeutils/templates.ts- Add autoRun to draft types and functionstemplate-state.ts- Add signal, parsing from YAML/JSON, respect flag in runTemplatetemplate-modal.tsx- Add On/Off toggle button UIapp.tsx- Wire up props + setPrompt event listeneren.ts/zh.ts- Add i18n translationsBackend (Rust/Tauri)
types.rs- Addauto_run: Option<bool>with serde defaulttemplates.rs- Serialize autoRun to YAML, pass through in write_templateTest Plan