()
| 74 | }; |
| 75 | } |
| 76 | function unsetEffortLevel(): EffortCommandResult { |
| 77 | const result = updateSettingsForSource('userSettings', { |
| 78 | effortLevel: undefined |
| 79 | }); |
| 80 | if (result.error) { |
| 81 | return { |
| 82 | message: `Failed to set effort level: ${result.error.message}` |
| 83 | }; |
| 84 | } |
| 85 | logEvent('tengu_effort_command', { |
| 86 | effort: 'auto' as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS |
| 87 | }); |
| 88 | // env=auto/unset (null) matches what /effort auto asks for, so only warn |
| 89 | // when env is pinning a specific level that will keep overriding. |
| 90 | const envOverride = getEffortEnvOverride(); |
| 91 | if (envOverride !== undefined && envOverride !== null) { |
| 92 | const envRaw = process.env.CLAUDE_CODE_EFFORT_LEVEL; |
| 93 | return { |
| 94 | message: `Cleared effort from settings, but CLAUDE_CODE_EFFORT_LEVEL=${envRaw} still controls this session`, |
| 95 | effortUpdate: { |
| 96 | value: undefined |
| 97 | } |
| 98 | }; |
| 99 | } |
| 100 | return { |
| 101 | message: 'Effort level set to auto', |
| 102 | effortUpdate: { |
| 103 | value: undefined |
| 104 | } |
| 105 | }; |
| 106 | } |
| 107 | export function executeEffort(args: string): EffortCommandResult { |
| 108 | const normalized = args.toLowerCase(); |
| 109 | if (normalized === 'auto' || normalized === 'unset') { |
no test coverage detected