Documentation
¶
Overview ¶
Package prompt holds the natural-language text lich types into an agent session, in every language a user can pick for it. The UI has its own language and its own catalogs (native/i18n); the two settings are independent because people often run the interface in one language and talk to their agents in another.
A catalog is a struct rather than a map of string keys so that a wrong name is a compile error at the call site, and a locale that misses a field is caught by TestCatalogParity. Each field is a fmt format: use explicit argument indexes (%[2]s) when a translation needs the arguments in another order.
Index ¶
Constants ¶
const EnvVar = "LICH_PROMPT_LANG"
EnvVar is the variable lich exports into every session PTY with the prompt language at spawn time. Text composed outside the lich process (the lich CLI, its MCP server, the companion plugin's hooks) reads the language from here, because it has no way to read the setting itself.
Variables ¶
var Langs = []Lang{English, PortugueseBR, Spanish, ChineseCN, Japanese, Korean, Russian}
Langs is every language a catalog exists for, English first as the default.
Functions ¶
This section is empty.
Types ¶
type Catalog ¶
type Catalog struct {
// internal/relay: SpawnBriefing. These are passed as one argv entry and a
// provider shipped as a .cmd is spawned through cmd.exe, so they must not
// contain a double quote or angle brackets in any locale.
BriefingIntro string
BriefingCards string
BriefingNative string
BriefingSessions string
BriefingCommandTools string
BriefingCommandCLI string
// internal/relay: compose, origin and replyInstruction.
RelayMessage string
OriginCLI string
OriginSession string
ReplyCommand string
ReplyRouteCLI string
ReplyRouteTools string
ReplyOnlyWayBack string
WorkerTask string
PickTicketNudge string
NudgeResultsReady Plural
NudgeRouteCLI string
NudgeRouteTools string
NudgeNotice string
// internal/relay: a subagent's report and block, a merge notice, a late
// scheduled prompt and the continuation parked at a usage limit.
SubagentReport string
SubagentReportBranch string
BlockedNotice string
ReportSummary Plural
BlockedSummary string
MergeNotice string
MergeSummary string
LateNotice string
// ResumePrompt is stored in the sessions table as a parked prompt, so a row
// written in one language has to be recognised in every other: match it
// with relay's isResumePrompt, never with ==.
ResumePrompt string
// internal/drop: the line under a copied file's path.
CopyNotice string
// internal/cli: the lich command line and its MCP server, read from
// EnvVar. MCP tool descriptions, flag help and errors stay English.
MCPInstructions string
HandOverFailed string
SendToSessionPrivate string
OutcomeUnread string
OutcomeUndelivered string
OutcomeUnanswered string
OutcomeStopped string
OutcomeExpired string
StillWorkingPrivate string
StillWorkingOpen string
StillWorkingPrivateCLI string
StillWorkingOpenCLI string
CollectedNothing string
CollectedAnswer string
CollectedStillWorking string
OpenedProject string
OpenedWorktree string
OpenedConfined string
OpenedSession string
ClosedRemoved string
ClosedKept string
ClosedPlain string
// contains filtered or unexported fields
}
Catalog is every prompt text in one language. Add a field here, then its text in en.go and in every other locale file; TestCatalogParity fails until each locale has it with the same format verbs.
Untranslated in every locale, because agents and tools match them literally: the [lich] token, tool and CLI names, ticket ids, and tool parameters.