Switch.note_pick: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/switch.bend as Switch Lines 118-123 of cswap-bend-cli@0.1.0.0/switch.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/switch.bend&start_line=118&end_line=123 import Base import cswap-bend-cli@0.1.0.0/json.bend as Json import cswap-bend-cli@0.1.0.0/store.bend as Store import cswap-bend-cli@0.1.0.0/swbase.bend as B def note_pick(+note: String, +cur: String, +curref: Json.Json, +models: List<&2, String>) -> Json.Json: Store.sel.j(String.eq(note, "current-unavailable"), B.noop("best", "usage-unavailable", "Current account usage is unavailable — " ++ stay_msg(cur), curref, []), Store.sel.j(String.eq(note, "no-comparison"), B.noop("best", "usage-unavailable", "No other account has usage data to compare — " ++ stay_msg(cur), curref, []), Store.sel.j(String.eq(note, "incomplete-comparison"), B.noop("best", "usage-unavailable", "No account with known usage has more remaining quota; some usage is unavailable — " ++ stay_msg(cur), curref, []), Store.sel.j(String.eq(note, "stay"), B.noop("best", "already-best", "Already on the account with the most remaining quota (Account-" ++ cur ++ ").", curref, []), B.noop("best", "candidates-exhausted", "All accounts are at their " ++ limits_label(models) ++ " — " ++ stay_msg(cur), curref, []))))) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json.bend&name=Json https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/store.bend&name=sel.j https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/swbase.bend&name=noop https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/switch.bend&name=limits_label https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/switch.bend&name=stay_msg