| Age | Commit message (Collapse) | Author |
|
- Move cmd/do to cmd/ask; mage builds and installs ask; Fish completions to ask.fish
- Update askcli help text, errors, executor default label, and Fish script (__ask_*)
- Task alias cache subdirectory under XDG cache: hexai/ask/
- Rename integration test files and helpers; refresh README and docs
- Rename plan-do-uuid-wrapper.md to plan-ask-uuid-wrapper.md
Made-with: Cursor
|
|
- Move cmd/ask to cmd/do; mage BuildDo builds binary named do
- Update askcli help text, errors, Fish completion (complete -c do, __do_*)
- Task alias cache path: XDG cache hexai/do/task-aliases-v2.json
- Refresh README and docs; go install path cmd/do@latest
- Remove accidentally tracked cmd/ask build artifact; ignore cmd/do/do and cmd/do/ask
Made-with: Cursor
|
|
When the task alias cache file contains invalid JSON (e.g. from a
concurrent write race producing two concatenated JSON objects), the
previous code returned a hard error that blocked all `ask` subcommands.
Now loadTaskAliasCache discards the corrupt file and starts fresh,
assigning new alias IDs on the next run. Validation errors (e.g.
next_id reuse) still surface as errors since those indicate a logic bug.
Also fix stale v1 reference in integration test aliasCachePath.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Alias IDs are now stored in reversed form (e.g. id=37 → "10" instead
of "01") so that the first character varies quickly across consecutive
IDs, making shell auto-completion more effective. The counter logic is
unchanged; only the string representation is reversed via a new
reverseString helper in encodeTaskAliasID/decodeTaskAliasID.
The cache file is bumped to task-aliases-v2.json so existing mappings
are abandoned and all aliases are regenerated with the new format.
Also fix TestDispatcher_CompleteUUIDsSubcommand to use an isolated temp
dir for the alias cache, preventing flakiness from cross-test pollution.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Add in-memory byUUID and byAlias maps to taskAliasCache so that
ensureAlias, lookupUUIDByAlias, and lookupAliasByUUID all run in O(1)
instead of scanning the full entries slice. Maps are rebuilt after
every mutation (load, prune, append) to avoid stale pointers.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
|
|
|
|
|
|
|
|
|