Repository navigation
docs: teach the theme skill formatVersion and themes that can't load - #23
Merged
Merged
Conversation
lich#598 adds an optional formatVersion to theme files and lists a stored theme it cannot load in Settings > Appearance instead of only logging it.
lich#600 adds both as optional fields of lich-theme.json.
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.
Follow-up to lichdotdev/lich#598 and lichdotdev/lich#600. Depends on both shipping in a release: until #598 a lich in the wild still logs broken themes instead of listing them, and until #600 it ignores
minLichVersionand a manifestformatVersion.What changes
skills/theme/SKILL.md: the rules list gainsformatVersion(optional, omitted means 1, positive integer no greater than the format lich reads, refused by number). The Traps bullet about copying a file into the themes directory now says a broken stored theme is listed under the theme strip as one that can't load, with the reason and Remove, after a window reload; only a file whose name is not a valid theme id stays log-only. Import is still the path that selects the theme. The frontmatter description drops "silently missing" in favor of "listed as a theme that can't load, or missing".skills/theme/validate.mjs: acceptsformatVersion1, rejects a non-integer or < 1 ("must be a positive integer") and a newer format with lich's wording ("theme format 2 is newer than this lich reads (up to 1); update lich").template.jsonunchanged: nothing in this repo's tests or CI requires the key, and lich stamps it on install.minLichVersion(MAJOR.MINOR.PATCH, older lich refuses, dev builds skip; suggested when a pack uses a token only a recent lich has) andformatVersion(same rule as a theme file, error prefixedmanifest:).validate.mjschecks their shape; whether the running lich is new enough stays lich's call.[Unreleased]entries.Test plan
validate.mjson a template-derived theme withformatVersionabsent,1(ok),2,0,1.5,"1"(rejected with the expected messages)validate.mjson a repository with manifestminLichVersionabsent /0.51.0(ok),0.51/51(rejected), manifestformatVersion2/"1"(rejected,manifest:prefix)node --test tests/*.test.mjs(hook contract tests green in CI)fixtures match lichfails on this PR for an unrelated reason: upstreamsession-start.jsonlgained a line since v0.12.0; left for its own change, since the scripts have to match it first