Repository navigation
Rebased /todo command + auto-todos onto 0.5.0 (review feedback from #3 addressed) - #13
Merged
Merged
Conversation
… addressed - /todo command reads via typed ctx.session.context + latestTodosFromMessages, falls back to same-plugin storage; returns undefined (never []) when empty - auto-todos resolves the session directory via typed ctx.session.get; drops raw client cast, serverBaseUrls/serverHeaders helpers, node:fs /proc reads - keeps master's rewritten context hook; adds MAX_TODOS=100 and MAX_TODO_CONTENT_LENGTH=500 validation to normalizeTodos - joins split async lines; explicit 'could not read' vs [] distinction kept - tests: 69/69 green (master suite + rewritten todo-command/auto-todos tests)
An entry without `always` is meant to inject when the incoming list is empty, but the check ran against the list as it was being built: the first injected entry made the list non-empty and every later default entry was skipped. Decide against the incoming list once. Also hold the config to the `todowrite` limits: entries over MAX_TODO_CONTENT_LENGTH are dropped and injection stops at MAX_TODOS so the merged list can never exceed the caps.
The command collapsed `undefined` (no source has a list) into `[]` and rendered "the todo list is empty" for both. Post "No todo list found for this session." when no list exists, and keep the empty-list report for an explicitly empty list. Also restore the formatting of the `ctx.command.transform` call and use a valid delivery value in the test.
The MAX_TODOS / MAX_TODO_CONTENT_LENGTH rejections added with the caps had no tests.
/todo posts the current list into the conversation; auto-todos.json seeds it per project. Both shipped without README coverage.
Owner
|
Thanks @famewolf — I went through the rebase and pushed four fixup commits on top of
On prompt caching: the fixups touch neither the CI is green on |
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.
Rebased
/todocommand + auto-todos onto 0.5.0, addressing the review on #3.Required changes:
src/tui-data.ts/tests/tui-data.test.tshunks — master'stodowritesFromMessages+writeTimestampalready cover the timestamp-ranked read. The branch keeps the/todocommand + message-log reader.ctx.session.context({ sessionID })with same-plugin storage fallback; deleted thectx.clientcast, theserverBaseUrls/serverHeadershelpers, and thenode:fsimport.Cleanups folded in: joined split
asynclines; explicitundefined(never[]) when no source has a list, keeping empty vs failed distinguishable; rebased on current master, keeping master's rewrittencontexthook and only adding the command registration/disposal. Also addsMAX_TODOS=100/MAX_TODO_CONTENT_LENGTH=500validation tonormalizeTodos.Tests: 69/69 green (master suite untouched + rewritten todo-command/auto-todos tests against the typed API).