Skip to content

Commit

Permalink
Addressing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
teresaqhoang committed Aug 8, 2023
1 parent 22e4fb1 commit ed3a94c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions webapp/src/checkEnv.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Checks if all required environment variables are defined
// Returns an array of missing variables
/**
* Checks if all required environment variables are defined
* @returns {string[]} An array of missing environment variables
*/
export const getMissingEnvVariables = () => {
// Should be aligned with variables defined in .env.example
const envVariables = ['REACT_APP_BACKEND_URI', 'REACT_APP_AAD_AUTHORITY', 'REACT_APP_AAD_CLIENT_ID'];
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/components/token-usage/TokenUsageGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ const contrastColors = [
export const TokenUsageGraph: React.FC<ITokenUsageGraph> = ({ promptView, tokenUsage }) => {
const classes = useClasses();
const { conversations, selectedId } = useAppSelector((state: RootState) => state.conversations);
const loadingResponse = conversations[selectedId].botResponseStatus && Object.entries(tokenUsage).length === 0;
const loadingResponse =
selectedId !== '' && conversations[selectedId].botResponseStatus && Object.entries(tokenUsage).length === 0;

const responseGenerationView: TokenUsageView = {};
const memoryGenerationView: TokenUsageView = {};
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/views/BackendProbe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const BackendProbe: FC<IData> = ({ uri, onBackendFound }) => {
}
};

void fetchAsync().catch(() => {
fetchAsync().catch(() => {
// Ignore - this page is just a probe, so we don't need to show any errors if backend is not found
});
}, 3000);
Expand Down

0 comments on commit ed3a94c

Please sign in to comment.