MCPcopy Index your code
hub / github.com/codeaashu/claude-code / unsetEffortLevel

Function unsetEffortLevel

src/commands/effort/effort.tsx:76–106  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74 };
75}
76function 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}
107export function executeEffort(args: string): EffortCommandResult {
108 const normalized = args.toLowerCase();
109 if (normalized === 'auto' || normalized === 'unset') {

Callers 1

executeEffortFunction · 0.85

Calls 3

updateSettingsForSourceFunction · 0.85
logEventFunction · 0.85
getEffortEnvOverrideFunction · 0.85

Tested by

no test coverage detected