* Get the thinkback skill directory from the installed plugin's cache path
()
| 43 | * Get the thinkback skill directory from the installed plugin's cache path |
| 44 | */ |
| 45 | async function getThinkbackSkillDir(): Promise<string | null> { |
| 46 | const { |
| 47 | enabled |
| 48 | } = await loadAllPlugins(); |
| 49 | const thinkbackPlugin = enabled.find(p => p.name === 'thinkback' || p.source && p.source.includes(getPluginId())); |
| 50 | if (!thinkbackPlugin) { |
| 51 | return null; |
| 52 | } |
| 53 | const skillDir = join(thinkbackPlugin.path, 'skills', SKILL_NAME); |
| 54 | if (await pathExists(skillDir)) { |
| 55 | return skillDir; |
| 56 | } |
| 57 | return null; |
| 58 | } |
| 59 | export async function playAnimation(skillDir: string): Promise<{ |
| 60 | success: boolean; |
| 61 | message: string; |
no test coverage detected