| … | … | @@ -462,10 +462,14 @@ function todayIso () { |
| 462 | 462 | |
| 463 | 463 | /** |
| 464 | 464 | * Human-readable suggest output. |
| 465 | * |
| 466 | * opts.confidenceFloor — tier floor for DISPLAY (default 'low' = show all) |
| 467 | * opts.appliedFloor — tier floor used by --apply (for labeling sections) |
| 465 | 468 | */ |
| 466 | 469 | export function formatSuggest (result, opts = {}) { |
| 467 | 470 | const lines = [] |
| 468 | 471 | const show = opts.confidenceFloor || 'low' // show everything by default |
| 472 | const appliedFloor = opts.appliedFloor || opts.confidenceFloor || 'high' |
| 469 | 473 | |
| 470 | 474 | const byConfidence = { |
| 471 | 475 | high: result.fixes.filter(f => f.confidence === 'high'), |
| … | … | @@ -479,7 +483,7 @@ export function formatSuggest (result, opts = {}) { |
| 479 | 483 | '(' + byConfidence.high.length + ' high, ' + |
| 480 | 484 | byConfidence.medium.length + ' medium, ' + |
| 481 | 485 | byConfidence.low.length + ' low).') |
| 482 | | lines.push('Applicable at --confidence ' + (opts.confidenceFloor || 'high') + |
| 486 | lines.push('Applicable at --confidence ' + appliedFloor + |
| 483 | 487 | ': ' + result.applicable.length) |
| 484 | 488 | lines.push('') |
| 485 | 489 | |
| … | … | @@ -487,7 +491,7 @@ export function formatSuggest (result, opts = {}) { |
| 487 | 491 | if (byConfidence[tier].length === 0) continue |
| 488 | 492 | if (!ge(tier, show)) continue |
| 489 | 493 | |
| 490 | | const isAuto = ge(tier, opts.confidenceFloor || 'high') |
| 494 | const isAuto = ge(tier, appliedFloor) |
| 491 | 495 | const heading = tier === 'high' |
| 492 | 496 | ? '## High-confidence fixes (auto-applicable)' |
| 493 | 497 | : tier === 'medium' |