claude-code-session: 프로필 한글 별칭(aliases) 지원

'아베르노 세션 열어줘' → develop2025 프로필로 매핑.
별칭은 state/claude_sessions.json 의 profiles.<name>.aliases 에 둔다.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
hyowons
2026-10-06 11:32:05 +09:00
parent 5384b1d670
commit 708961b449
2 changed files with 11 additions and 2 deletions
@@ -332,10 +332,18 @@ def cmd_profile_edit(args) -> int:
return 0
def _resolve_alias(state: dict, name: str) -> str:
"""프로필 별칭(한글 등)을 실제 프로필 이름으로 바꾼다. 해당 없으면 그대로."""
for pname, prof in state['profiles'].items():
if name in prof.get('aliases', []):
return pname
return name
def cmd_session_open(args) -> int:
profile = args.profile or DEFAULT_PROFILE
_validate_name(profile, '프로필 이름')
state = _load_state()
profile = _resolve_alias(state, args.profile or DEFAULT_PROFILE)
_validate_name(profile, '프로필 이름')
prof = state['profiles'].get(profile)
if not prof:
raise SystemExit(f'등록되지 않은 프로필: {profile} (먼저 `profile add` 실행)')