MCPcopy Create free account
hub / github.com/Tencent/teamai-cli / removeOpencodeHooks

Function removeOpencodeHooks

src/opencode-hooks.ts:166–173  ·  view source on GitHub ↗
(baseDir: string, scope: 'project' | 'user')

Source from the content-addressed store, hash-verified

164
165/** Remove the teamai OpenCode plugin for a scope if present. */
166export 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.

Callers 4

executeRemovalFunction · 0.85
reconcileOpencodePluginFunction · 0.85
sweepLegacyProjectHooksFunction · 0.85

Calls 3

resolveOpencodePluginDirFunction · 0.85
pathExistsFunction · 0.85
removeFunction · 0.70

Tested by

no test coverage detected