Repository navigation
Add lich whoami and accept a session id as a target - #700
Merged
Merged
Conversation
A session had no way to learn its own label: sessions and list_sessions leave the caller out, and a lich id given as a target matched nothing. whoami prints the caller's own entry in the sessions shape, and both resolvers (relay and spawn) now match the id before the two names, so naming yourself by id gets the same answer as naming yourself by label.
# Conflicts: # CHANGELOG.md
Merged
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.
A session could not learn its own label:
lich sessionsandlist_sessionsleave the caller out, and a lich id passed as a target answered "no session named". lich-plugin (lichdotdev/lich-plugin#62) works around it by matching the text of control's self-refusal, which has no contract.lich whoami [--json](RPCrelay.Self): the caller's own entry, same object assessions --json(label,name,project,kind,state,id). Errors whenLICH_SESSION_IDis unset or unknown.relay.resolvefor send,spawn.findSessionfor close/rename/control/ask/file) match the lich id before the label and roster name, honouring--project. Naming yourself by id gets what naming yourself by label gets: control and ask still refuse, send still finds no live session.docs/cli.md, MCP param descriptions mention the id, CHANGELOG entry.Provider-agnostic:
LICH_SESSION_IDis set for every provider's PTY, so no provider gap.Gate: gofmt,
go vet ./...,go test ./...green. Frontend untouched.