fix: remove permanently disabled conditional paths (#2450)

* fix: remove permanently disabled conditional paths

* fix: remove the disabled classifier rendering branch
This commit is contained in:
JATMN
2026-10-27 09:18:01 -07:00
committed by GitHub
parent 099cd505fe
commit d4d1b2bfa7
5 changed files with 2 additions and 57 deletions
-18
View File
@@ -525,24 +525,6 @@ export function LogSelector(t0: LogSelectorProps) {
t22 = t23;
}
const titleFilteredLogs = t22;
let t23;
let t24;
if ($[42] !== debouncedDeepSearchQuery || $[43] !== deferredSearchQuery) {
t23 = () => {
if (false && deferredSearchQuery && deferredSearchQuery !== debouncedDeepSearchQuery) {
setIsSearching(true);
}
};
t24 = [deferredSearchQuery, debouncedDeepSearchQuery, false];
$[42] = debouncedDeepSearchQuery;
$[43] = deferredSearchQuery;
$[44] = t23;
$[45] = t24;
} else {
t23 = $[44];
t24 = $[45];
}
React.useEffect(t23, t24);
let t25;
let t26;
if ($[46] !== debouncedDeepSearchQuery) {
@@ -10,7 +10,6 @@ import { Box, Text, useTheme } from '../../ink.js';
import { useAppStateMaybeOutsideOfProvider } from '../../state/AppState.js';
import { findToolByName, type Tool, type ToolProgressData, type Tools } from '../../Tool.js';
import type { ProgressMessage } from '../../types/message.js';
import { useIsClassifierChecking } from '../../utils/classifierApprovalsHook.js';
import { logError } from '../../utils/log.js';
import type { buildMessageLookups } from '../../utils/messages.js';
import { MessageResponse } from '../MessageResponse.js';
@@ -52,11 +51,6 @@ export function AssistantToolUseMessage(t0) {
const [theme] = useTheme();
const bg = useSelectedMessageBg();
const pendingWorkerRequest = useAppStateMaybeOutsideOfProvider(_temp);
useIsClassifierChecking(param.id);
const permissionMode = useAppStateMaybeOutsideOfProvider(_temp2);
const hasStrippedRules = useAppStateMaybeOutsideOfProvider(_temp3);
const isAutoClassifier = permissionMode === "auto" || permissionMode === "plan" && hasStrippedRules;
const isClassifierChecking = false;
let t1;
if ($[0] !== param.input || $[1] !== param.name || $[2] !== tools) {
bb0: {
@@ -236,15 +230,13 @@ export function AssistantToolUseMessage(t0) {
t12 = $[53];
}
let t13;
if ($[54] !== inProgressToolCallCount || $[55] !== isAutoClassifier || $[56] !== isClassifierChecking || $[57] !== isQueued || $[58] !== isResolved || $[59] !== isTranscriptMode || $[60] !== isWaitingForPermission || $[61] !== lookups || $[62] !== param.id || $[63] !== progressMessagesForMessage || $[64] !== terminalSize || $[65] !== tool_0 || $[66] !== tools || $[67] !== verbose) {
t13 = !isResolved && !isQueued && (isClassifierChecking ? <MessageResponse height={1}><Text dimColor={true}>{isAutoClassifier ? "Auto classifier checking\u2026" : "Bash classifier checking\u2026"}</Text></MessageResponse> : isWaitingForPermission ? <MessageResponse height={1}><Text dimColor={true}>Waiting for permission…</Text></MessageResponse> : renderToolUseProgressMessage(tool_0, tools, lookups, param.id, progressMessagesForMessage, {
if ($[54] !== inProgressToolCallCount || $[57] !== isQueued || $[58] !== isResolved || $[59] !== isTranscriptMode || $[60] !== isWaitingForPermission || $[61] !== lookups || $[62] !== param.id || $[63] !== progressMessagesForMessage || $[64] !== terminalSize || $[65] !== tool_0 || $[66] !== tools || $[67] !== verbose) {
t13 = !isResolved && !isQueued && (isWaitingForPermission ? <MessageResponse height={1}><Text dimColor={true}>Waiting for permission…</Text></MessageResponse> : renderToolUseProgressMessage(tool_0, tools, lookups, param.id, progressMessagesForMessage, {
verbose,
inProgressToolCallCount,
isTranscriptMode
}, terminalSize));
$[54] = inProgressToolCallCount;
$[55] = isAutoClassifier;
$[56] = isClassifierChecking;
$[57] = isQueued;
$[58] = isResolved;
$[59] = isTranscriptMode;
@@ -292,12 +284,6 @@ export function AssistantToolUseMessage(t0) {
}
return t16;
}
function _temp3(state_1) {
return !!state_1.toolPermissionContext.strippedDangerousRules;
}
function _temp2(state_0) {
return state_0.toolPermissionContext.mode;
}
function _temp(state) {
return state.pendingWorkerRequest;
}
-1
View File
@@ -219,7 +219,6 @@ export function getAllBaseTools(): Tools {
? (() => { const tct = getTeamCreateTool(); const tdt = getTeamDeleteTool(); return [tct, tdt].filter(Boolean) })()
: []),
...(VerifyPlanExecutionTool ? [VerifyPlanExecutionTool] : []),
...(process.env.USER_TYPE === 'ant' && REPLTool ? [REPLTool] : []),
...(WorkflowTool ? [WorkflowTool] : []),
...(SleepTool ? [SleepTool] : []),
...(cronTools ?? []),
-17
View File
@@ -1,17 +0,0 @@
/**
* React hook for classifierApprovals store.
* Split from classifierApprovals.ts so pure-state importers (permissions.ts,
* toolExecution.ts, postCompactCleanup.ts) do not pull React into print.ts.
*/
import { useSyncExternalStore } from 'react'
import {
isClassifierChecking,
subscribeClassifierChecking,
} from './classifierApprovals.js'
export function useIsClassifierChecking(toolUseID: string): boolean {
return useSyncExternalStore(subscribeClassifierChecking, () =>
isClassifierChecking(toolUseID),
)
}
-5
View File
@@ -3,7 +3,6 @@ import { randomBytes } from 'crypto'
// Mutable controls for the mocked image processor (image_processor_napi / sharp).
let mockMetadata: unknown = { width: 10, height: 10, format: 'png' }
let throwOnSharpConstruction = false
const defaultBuffer = Buffer.from('rendered')
type MockImageProcessor = {
@@ -28,9 +27,6 @@ function makeSharpInstance(): MockImageProcessor {
}
function sharpFactory(input: Buffer): MockImageProcessor {
if (throwOnSharpConstruction) {
throw new Error('image_processor_napi crashed')
}
return makeSharpInstance()
}
@@ -47,7 +43,6 @@ const originalImageProcessorExports = { ...actualImageProcessor }
afterEach(() => {
mockMetadata = { width: 10, height: 10, format: 'png' }
throwOnSharpConstruction = false
mock.module(imageProcessorPath, () => originalImageProcessorExports)
mock.restore()
})