Profview.prof_json2: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/profview.bend as Profview Lines 48-53 of cswap-bend-cli@0.1.0.0/profview.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/profview.bend&start_line=48&end_line=53 import Base import cswap-bend-cli@0.1.0.0/json.bend as Json import cswap-bend-cli@0.1.0.0/profile.bend as P import cswap-bend-cli@0.1.0.0/policy/safe.bend as SF import cswap-bend-cli@0.1.0.0/daemon/config.bend as Cfg def prof_json2(+p: P.Prof, +is_builtin: Bool, +stored: Bool, +active: Bool, +e: Cfg.Cfg) -> Json.Json: match p: case P.Prof{n, algo, th, ms, cd, iv}: Json.of_pairs([("name", Json.JStr{n}), ("builtin", Json.JBool{is_builtin}), ("stored", Json.JBool{stored}), ("active", Json.JBool{active}), ("strategy", Json.JStr{SF.name(algo)}), ("threshold", num_or_null(th)), ("models", opt_json(P.models_json(ms))), ("cooldown_s", num_or_null(cd)), ("interval_s", num_or_null(iv)), ("effective", eff_json(e))]) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/daemon/config.bend&name=Cfg 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/json.bend&name=of_pairs https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/policy/safe.bend&name=name https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/profile.bend&name=Prof https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/profile.bend&name=models_json https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/profview.bend&name=eff_json https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/profview.bend&name=num_or_null https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/profview.bend&name=opt_json