* Get the plugins directory name based on current mode. * Uses session state (from --cowork flag) or env var. * * Priority: * 1. Session state (set by CLI flag --cowork) * 2. Environment variable CLAUDE_CODE_USE_COWORK_PLUGINS * 3. Default: 'plugins'
()
| 32 | * 3. Default: 'plugins' |
| 33 | */ |
| 34 | function getPluginsDirectoryName(): string { |
| 35 | // Session state takes precedence (set by CLI flag) |
| 36 | if (getUseCoworkPlugins()) { |
| 37 | return COWORK_PLUGINS_DIR |
| 38 | } |
| 39 | // Fall back to env var |
| 40 | if (isEnvTruthy(process.env.CLAUDE_CODE_USE_COWORK_PLUGINS)) { |
| 41 | return COWORK_PLUGINS_DIR |
| 42 | } |
| 43 | return PLUGINS_DIR |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * Get the full path to the plugins directory. |
no test coverage detected