UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

24 lines (23 loc) • 858 B
import { l as normalizeOptionalString } from "./string-coerce-CCIiB4H7.mjs"; import { n as getResidentUserProfileDisplay } from "./user-profile-list-D7DDbqt5.mjs"; import { s as buildControlUiUserAvatarPath } from "./control-ui-resource-routes-DgXN5Axb.mjs"; import "./control-ui-contract-DTmt_Jww.mjs"; //#region src/gateway/current-user-profile-display.ts function resolveCurrentUserProfileDisplay(e, t = getResidentUserProfileDisplay) { try { const n = t(e); if (!n) return { kind: "unresolved" }; const r = normalizeOptionalString(n.displayName); return { kind: "resolved", profileId: n.id, ...r ? { label: r } : {}, avatarUrl: buildControlUiUserAvatarPath(n.id, n.avatarRevision), hasUploadedAvatar: n.hasAvatar }; } catch { return { kind: "unresolved" }; } } //#endregion export { resolveCurrentUserProfileDisplay as t };