(characterId?: string)
| 358 | |
| 359 | /** Clear the cached video URL for an emotion so next resolve picks a new random one */ |
| 360 | export function clearEmotionVideoCache(characterId?: string): void { |
| 361 | if (characterId) { |
| 362 | for (const key of _emotionVideoCache.keys()) { |
| 363 | if (key.startsWith(`${characterId}:`)) _emotionVideoCache.delete(key); |
| 364 | } |
| 365 | } else { |
| 366 | _emotionVideoCache.clear(); |
| 367 | } |
| 368 | } |
| 369 | |
| 370 | export function getCharacterPromptContext(config: CharacterConfig): string { |
| 371 | return ( |
no test coverage detected