Skip to content

Commit

Permalink
Replace \? with !
Browse files Browse the repository at this point in the history
  • Loading branch information
sphilipse committed Oct 10, 2024
1 parent 6a10197 commit cbbb6cc
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export function useConversation({
},
})
.catch((err) => {
notifications?.toasts.addError(err, {
notifications!.toasts.addError(err, {
title: i18n.translate('xpack.aiAssistant.errorUpdatingConversation', {
defaultMessage: 'Could not update conversation',
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function useConversationList(): UseConversationListResult {

conversations.refresh();
} catch (err) {
notifications?.toasts.addError(err, {
notifications!.toasts.addError(err, {
title: i18n.translate('xpack.aiAssistant.flyout.failedToDeleteConversation', {
defaultMessage: 'Could not delete conversation',
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function useCurrentUser() {
useEffect(() => {
const getCurrentUser = async () => {
try {
const authenticatedUser = await security?.authc.getCurrentUser();
const authenticatedUser = await security!.authc.getCurrentUser();
setUser(authenticatedUser);
} catch {
setUser(undefined);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function useKnowledgeBase(): UseKnowledgeBaseResult {
return install();
}
setInstallError(error);
notifications?.toasts.addError(error, {
notifications!.toasts.addError(error, {
title: i18n.translate('xpack.aiAssistant.errorSettingUpKnowledgeBase', {
defaultMessage: 'Could not set up Knowledge Base',
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function useSimulatedFunctionCalling() {
services: { uiSettings },
} = useKibana();

const simulatedFunctionCallingEnabled = uiSettings?.get<boolean>(
const simulatedFunctionCallingEnabled = uiSettings!.get<boolean>(
aiAssistantSimulatedFunctionCalling,
false
);
Expand Down

0 comments on commit cbbb6cc

Please sign in to comment.