Repository navigation
feat(mods): agent-facing text follows LICH_PROMPT_LANG (en, pt-BR) - #70
Merged
Merged
Conversation
The engine never follows $ across an import, so promptLang($) in prompt-text.js kept every mod from loading (claude plugin test: 0/33). promptLang now maps a plain LICH_PROMPT_LANG value to a catalog language and each hook reads the env itself. Docs for agent-cards and self-command name the language.
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.
lich now has a prompt language setting (en, pt-BR) that is independent of its interface language, and exports it into every session as
LICH_PROMPT_LANG(omartelo/lich#715, #723). Everything lich itself sends into a session already follows it. This PR makes the text the mods add for the agent follow it too.hooks/prompt-text.jsis one shared catalog:say(lang, key, vars)fills{name}slots, andpromptLang(tag)maps the env value to a catalog language. An empty or unknown value falls back to English, the same as lich'sprompt.Parse. Each hook reads$.env.get("LICH_PROMPT_LANG")itself, because the engine never follows$across an import.mod-controlask preamble;agent-cardsbackgrounded context, completed-result addendum, denies and TaskStop failure;edit-guardnote;self-commandskill/control notes, the/model//effortdeny, and the queued notes.Successfully stopped task: …, which mirrors Claude Code's own TaskStop message and is pinned by a test; the opencode tool descriptions, which mirror lich's MCP tool descriptions (English in lich too);skills/theme; and toasts.[lich], tool and command names, status enums, and thesubagent/prefix.Tests:
node --test tests/*.test.mjs403/403 (newprompt-text.test.mjscovers key and slot parity, literals, fallback, the env read, and one pt-BR render per hook; no existing test touched).claude plugin test .33/33.