@@ -7,19 +7,8 @@ const SPINNER_FRAMES = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧',
77const DIVIDER = '─' . repeat ( 55 ) ;
88const STEPS = [ 'Init' , 'Fetch' , 'Scan' ] ;
99
10- const CONFIDENCE_COLORS = {
11- HIGH : 'red' ,
12- MEDIUM : 'yellow' ,
13- LOW : 'cyan' ,
14- FALSE_POSITIVE : 'gray' ,
15- } ;
16-
1710// ── Helpers ──────────────────────────────────────────────────────────────────
1811
19- function getConfidenceColor ( score ) {
20- return CONFIDENCE_COLORS [ score ?. toUpperCase ( ) ] || 'gray' ;
21- }
22-
2312function padEnd ( str , len ) {
2413 return str + ' ' . repeat ( Math . max ( 0 , len - str . length ) ) ;
2514}
@@ -211,22 +200,13 @@ export function renderNotLoggedIn() {
211200 ) ;
212201}
213202
214- export function renderDone ( secrets , failOn , shouldFailOn , startTime , fileCount , meta ) {
203+ export function renderDone ( secrets , startTime , fileCount , meta ) {
215204 const allSecrets = secrets . flatMap ( file =>
216205 file . secrets . map ( s => ( { ...s , file_path : file . file_path } ) )
217206 ) ;
218207
219- const blockingSecrets = allSecrets . filter ( s => shouldFailOn ( s . confidence_score ) ) ;
220- const hasBlocking = blockingSecrets . length > 0 ;
221208 const elapsed = startTime ? formatElapsed ( startTime ) : null ;
222209
223- // Count by confidence
224- const counts = { } ;
225- allSecrets . forEach ( s => {
226- const conf = s . confidence_score ?. toUpperCase ( ) || 'UNKNOWN' ;
227- counts [ conf ] = ( counts [ conf ] || 0 ) + 1 ;
228- } ) ;
229-
230210 // Group by file
231211 const grouped = { } ;
232212 allSecrets . forEach ( s => {
@@ -269,22 +249,15 @@ export function renderDone(secrets, failOn, shouldFailOn, startTime, fileCount,
269249 ) ) ;
270250
271251 fileSecrets . forEach ( ( secret , si ) => {
272- const conf = secret . confidence_score ?. toUpperCase ( ) || 'UNKNOWN' ;
273- const confColor = getConfidenceColor ( conf ) ;
274- const isBlocking = shouldFailOn ( secret . confidence_score ) ;
275252 const isLast = si === fileSecrets . length - 1 ;
276253 const branch = isLast ? '└─' : '├─' ;
277254 const lineStr = secret . line_number ? `L${ secret . line_number } ` : '' ;
278255
279256 els . push ( React . createElement (
280257 Box , { key : `s-${ fi } -${ si } ` } ,
281258 React . createElement ( Text , { color : 'gray' } , ` ${ branch } ` ) ,
282- React . createElement ( Text , {
283- color : confColor ,
284- bold : isBlocking ,
285- } , padEnd ( conf , 16 ) ) ,
286259 React . createElement ( Text , { color : 'gray' } , padEnd ( lineStr , 6 ) ) ,
287- React . createElement ( Text , { color : isBlocking ? 'white' : 'gray' , dimColor : ! isBlocking } , secret . type || '' ) ,
260+ React . createElement ( Text , { color : 'white' } , secret . type || '' ) ,
288261 ) ) ;
289262 } ) ;
290263
@@ -330,28 +303,17 @@ export function renderDone(secrets, failOn, shouldFailOn, startTime, fileCount,
330303
331304 // Secret stats line
332305 if ( allSecrets . length > 0 ) {
333- const stats = [ `${ allSecrets . length } secret${ allSecrets . length !== 1 ? 's' : '' } found` ] ;
334- for ( const conf of [ 'HIGH' , 'MEDIUM' , 'LOW' , 'FALSE_POSITIVE' ] ) {
335- if ( counts [ conf ] ) {
336- const label = conf === 'FALSE_POSITIVE' ? 'false positive' : conf . toLowerCase ( ) ;
337- stats . push ( `${ counts [ conf ] } ${ label } ` ) ;
338- }
339- }
340306 els . push ( React . createElement (
341- Text , { key : 'stats' , color : 'gray' } , stats . join ( ' · ' ) ,
307+ Text , { key : 'stats' , color : 'gray' } ,
308+ `${ allSecrets . length } secret${ allSecrets . length !== 1 ? 's' : '' } found` ,
342309 ) ) ;
343310 }
344311
345312 // Status line
346- if ( hasBlocking ) {
313+ if ( allSecrets . length > 0 ) {
347314 els . push ( React . createElement (
348315 Text , { key : 'status' , color : 'red' , bold : true } ,
349- `✗ ${ blockingSecrets . length } blocking secret${ blockingSecrets . length !== 1 ? 's' : '' } — remove before committing` ,
350- ) ) ;
351- } else if ( allSecrets . length > 0 ) {
352- els . push ( React . createElement (
353- Text , { key : 'status' , color : 'green' , bold : true } ,
354- '✓ No blocking secrets found' ,
316+ `✗ ${ allSecrets . length } secret${ allSecrets . length !== 1 ? 's' : '' } found — remove before committing` ,
355317 ) ) ;
356318 } else {
357319 els . push ( React . createElement (
0 commit comments