def kind_warning

cswap-bend-cli@0.1.0.0 · swcreds.bend:172

import cswap-bend-cli@0.1.0.0/swcreds.bend as Swcreds
import Base

172def kind_warning(+k: CKind, +cur: String) -> List<&2, String>:
173  match k:
174    case KWiped{}:
175      ["The live credential's tokens were wiped (Claude Code clears them when a refresh is rejected). Account-" ++ cur ++ "'s stored backup was kept. If the account cannot authenticate after switching back, log in with Claude Code and run: cswap add"]
176    case KForeignSynced{s}:
177      ["Credential ownership mismatch detected. The live credential already matches Account-" ++ s ++ "'s stored backup, so nothing was written into Account-" ++ cur ++ "."]
178    case KForeign{s}:
179      ["Credential ownership mismatch detected. The live credential was preserved and was not written into Account-" ++ cur ++ ". If Account-" ++ s ++ " later cannot authenticate, log in as it and run: cswap add --slot " ++ s]
180    case KAlien{}:
181      ["The live login does not match a managed account. It was preserved and not written into Account-" ++ cur ++ ". If you need that account, log in as it and run: cswap add"]
182    case _:
183      []

Uses (4)

Used by (1)