Commit Graph

21 Commits

Author SHA1 Message Date
Valentin Maerten
f68626cdee refactor(interactive): extract getMissingRequiredVars helper 2025-12-14 17:37:45 +01:00
Valentin Maerten
90061ecbd4 refactor(interactive): extract Prompt method and reduce duplication 2025-12-14 17:33:55 +01:00
Valentin Maerten
6ea272d2e7 refactor: rename internal/prompt to internal/input 2025-12-14 17:25:30 +01:00
Valentin Maerten
fa92cc14e5 refactor(interactive): simplify prompting functions and naming 2025-12-14 17:17:31 +01:00
Valentin Maerten
7f4d5a5e4a feat(interactive): add just-in-time prompting for sequential task calls 2025-12-14 16:54:46 +01:00
Valentin Maerten
0efebed8b8 refactor(interactive): replace --no-tty flag with --interactive 2025-12-14 16:21:52 +01:00
Valentin Maerten
feb97c061c refactor(interactive): remove sync writer now that prompts are upfront 2025-12-14 16:14:52 +01:00
Valentin Maerten
bd166ff271 fix(interactive): collect vars before checking visited to handle duplicate task calls 2025-12-13 13:16:37 +01:00
Valentin Maerten
647052aaab wip: collect all required vars upfront before execution
- Add collectAllRequiredVars to traverse dep tree and find missing vars
- Add promptForAllVars to prompt for all vars at once
- Store prompted vars on Executor and inject into all RunTask calls
- Remove redundant GetTask call in collectAllRequiredVars
- Make SyncWriter conditional on TTY presence
2025-12-13 13:05:39 +01:00
Valentin Maerten
00f7788c35 wip: add synchronized output to prevent prompt interleaving
- Add SyncWriter to synchronize stdout/stderr writes with prompts
- Add promptMutex to serialize interactive prompts
- Keep rawStdout/rawStderr for BubbleTea to avoid deadlock
- Update test Taskfile with nested deps scenario
2025-12-13 12:28:10 +01:00
Valentin Maerten
419442bba6 refactor(interactive): move interactive setting to taskrc 2025-12-13 12:01:36 +01:00
Valentin Maerten
538699e54f feat(vars): add interactive prompting for required variables
Add support for interactive variable prompting using Bubble Tea.
Variables can be marked as `interactive: true` in the requires section,
and users will be prompted to enter values for missing variables when
running in a TTY.

Features:
- New `interactive` field on required variables
- Bubble Tea-based text input and select prompts
- --no-tty flag to disable interactive prompts
- Automatic skip when variable is already set
2025-12-13 11:05:18 +01:00
Valentin Maerten
35ea4e0460 feat: display allowed values when vars are not provided (#2052) 2025-02-20 20:08:14 +01:00
Valentin Maerten
80f96d67da fix: requires allowed values works with dynamic var (#2033) 2025-02-08 17:29:36 +01:00
Andrey Nering
43f3dcea05 chore(requires): skip unneeded variable evaluation for requires (#1976) 2024-12-30 18:27:16 -03:00
Pete Davison
2965841eb7 feat: use external package for ordered maps (#1797) 2024-12-30 17:54:36 +00:00
Valentin Maerten
a35910429c feat: option to ensure variable is within the list of values (#1827) 2024-10-18 18:16:57 +02:00
Pete Davison
5e9851f42f Update minimum go version (#1758)
* feat: update minimum version to 1.22

* refactor: use int range iterator

* refactor: loop variables

* refactor: replace slicesext.FirstNonZero with cmp.Or

* refactor: use slices.Concat instead of append

* fix: unused param

* fix: linting
2024-08-14 08:37:05 -05:00
Pete Davison
1ef5cf71d0 feat: pass ast.Call by reference 2024-02-22 14:58:24 -06:00
Pete Davison
247c2586c2 refactor: taskfile/ast package (#1450)
* refactor: ast package

* feat: read -> taskfile

* refactor: taskfile.Taskfile -> taskfile.Read

* refactor: move merge function back into taskfile package

* refactor: rename taskfile.go to read.go
2023-12-29 20:32:03 +00:00
Ben Coleman
307f39cee3 feat: add ability to specify which vars are required (#1204) 2023-06-29 22:13:41 -03:00