in plugin/src/software/aws/toolkits/eclipse/amazonq/inlineChat/InlineChatSession.java [340:372]
private boolean verifyChatResultParams(final InlineChatResult chatResult) {
if (chatResult == null) {
return false;
}
var options = (chatResult.followUp() != null)
? chatResult.followUp().options()
: null;
String type = (options != null)
? options[0].type()
: null;
// End session if user auth status needs refreshing
if (type == "full-auth" || type == "re-auth") {
uiManager.showAuthExpiredNotification();
return false;
}
// End session if server responds with no suggestions
if (chatResult.body() == null || chatResult.body().isBlank()) {
uiManager.showNoSuggestionsNotification();
return false;
}
// End session if response has code refs and user has setting disabled
if (chatResult.codeReference() != null && chatResult.codeReference().length > 0) {
if (!this.referencesEnabled) {
uiManager.showCodeReferencesNotification();
return false;
}
}
return true;
}