mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-29 20:34:28 +00:00
feat(agent): use deterministic storage keys for preset avatars (#404)
This commit is contained in:
@@ -7,6 +7,10 @@ import {
|
||||
|
||||
export { PRESET_AVATAR_IDS, type PresetAvatarId, isPresetAvatarId }
|
||||
|
||||
export function getPresetAvatarStorageKey(id: PresetAvatarId): string {
|
||||
return `files/avatars/${id}.webp`
|
||||
}
|
||||
|
||||
const bufferCache = new Map<PresetAvatarId, Buffer>()
|
||||
|
||||
export function getPresetAvatarBuffer(id: PresetAvatarId): Buffer | null {
|
||||
|
||||
Reference in New Issue
Block a user