import { c as _c } from "react/compiler-runtime"; import React from 'react'; import { Box, Text } from '../ink.js'; import { getCachedKeybindingWarnings, getKeybindingsPath, isKeybindingCustomizationEnabled } from '../keybindings/loadUserBindings.js'; /** * Displays keybinding validation warnings in the UI. * Similar to McpParsingWarnings, this provides persistent visibility * of configuration issues. * * Only shown when keybinding customization is enabled (ant users + feature gate). */ export function KeybindingWarnings() { const $ = _c(2); if (!isKeybindingCustomizationEnabled()) { return null; } let t0; let t1; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { t1 = Symbol.for("react.early_return_sentinel"); bb0: { const warnings = getCachedKeybindingWarnings(); if (warnings.length === 0) { t1 = null; break bb0; } const errors = warnings.filter(_temp); const warns = warnings.filter(_temp2); t0 = 0 ? "error" : "warning"}>Keybinding Configuration IssuesLocation: {getKeybindingsPath()}{errors.map(_temp3)}{warns.map(_temp4)}; } $[0] = t0; $[1] = t1; } else { t0 = $[0]; t1 = $[1]; } if (t1 !== Symbol.for("react.early_return_sentinel")) { return t1; } return t0; } function _temp4(warning, i_0) { return [Warning] {warning.message}{warning.suggestion && → {warning.suggestion}}; } function _temp3(error, i) { return [Error] {error.message}{error.suggestion && → {error.suggestion}}; } function _temp2(w_0) { return w_0.severity === "warning"; } function _temp(w) { return w.severity === "error"; }