in plugin/src/software/aws/toolkits/eclipse/amazonq/util/IQInlineSuggestionSegmentFactory.java [113:124]
private static boolean isOpenBracket(final String input, final int idx) {
char c = input.charAt(idx);
boolean isBracket = c == '(' || c == '[' || c == '{' || c == '<' || c == '"' || c == '\'';
if (!isBracket) {
return false;
}
// TODO: enrich this check to eliminate false postives
if (idx > 0 && Character.isWhitespace(input.charAt(idx - 1)) && c == '<') {
return false;
}
return true;
}