feat(folders): add --resolve flag to show peer names - #24
Merged
Conversation
Design for resolving peer IDs to readable names in `folders show` command. Adds --resolve flag, normalizes peer output in both JSON and text formats. Ref: #19 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6-task TDD plan: _normalizePeer, _resolvePeerName, showFolder update, CLI --resolve flag, SKILL.md docs, test fixups. Ref: #19 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extracts type and numeric id from raw MTCute peer objects. Ref: #19 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolves peer ID to name via getChat/getFullUser without fetching full metadata. Returns null on error (graceful degradation). Ref: #19 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
showFolder now returns { type, id } for each peer instead of raw MTCute objects.
With resolve=true, additionally fetches channel titles and user names.
Unresolvable peers are marked as (unresolved).
Ref: #19
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Without --resolve: shows typed peer ID list (channel:123, user:456). With --resolve: groups peers by type and shows resolved names. Ref: #19 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Documents all folders subcommands including new --resolve flag. Ref: #19 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All peer lists (include/exclude/pinned) now group by type in --resolve mode. Previously excluded/pinned peers lost type information. Ref: #19
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.
Summary
_normalizePeer()to convert raw MTCute peer objects to{ type, id }format_resolvePeerName()for lightweight name resolution viagetChat()/getFullUser()showFolder()to normalize peers by default and optionally resolve names withresolve: true--resolveCLI flag tofolders showwith two output modes: typed IDs (default) vs grouped resolved namesfolderssubcommands in SKILL.mdCloses #19
Test plan
_normalizePeer,_resolvePeerName, andshowFolderpeer normalization/resolutiontgcli folders show AI --resolve --timeout 30s🤖 Generated with Claude Code