(baseDir: string, scope: 'project' | 'user')
| 164 | |
| 165 | /** Remove the teamai OpenCode plugin for a scope if present. */ |
| 166 | export async function removeOpencodeHooks(baseDir: string, scope: 'project' | 'user'): Promise<void> { |
| 167 | const dir = resolveOpencodePluginDir(baseDir, scope); |
| 168 | const file = path.join(dir, OPENCODE_HOOK_FILE); |
| 169 | if (await pathExists(file)) { |
| 170 | await remove(file); |
| 171 | log.success(`Removed teamai OpenCode hook from ${file}`); |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | /** |
| 176 | * Reject slugs that could escape the plugin directory when used as a filename. |
no test coverage detected