MCPcopy Create free account
hub / github.com/echoVic/blade-code / getRoleDisplayName

Function getRoleDisplayName

src/context/utils.ts:130–139  ·  view source on GitHub ↗

* 获取角色显示名称

(role: string)

Source from the content-addressed store, hash-verified

128 * 获取角色显示名称
129 */
130function getRoleDisplayName(role: string): string {
131 const roleMap: Record<string, string> = {
132 user: '用户',
133 assistant: '助手',
134 system: '系统',
135 tool: '工具',
136 };
137
138 return roleMap[role] || role;
139}
140
141/**
142 * 创建默认的上下文管理器配置

Callers 1

formatMessagesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected