mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 01:31:08 +00:00
19 lines
555 B
TypeScript
19 lines
555 B
TypeScript
import type { OpenClawConfig } from "../../config/config.js";
|
|
import { resolveAuthProfileMetadata } from "./identity.js";
|
|
import type { AuthProfileStore } from "./types.js";
|
|
|
|
export function resolveAuthProfileDisplayLabel(params: {
|
|
cfg?: OpenClawConfig;
|
|
store: AuthProfileStore;
|
|
profileId: string;
|
|
}): string {
|
|
const { displayName, email } = resolveAuthProfileMetadata(params);
|
|
if (displayName) {
|
|
return `${params.profileId} (${displayName})`;
|
|
}
|
|
if (email) {
|
|
return `${params.profileId} (${email})`;
|
|
}
|
|
return params.profileId;
|
|
}
|