Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix: Fix bot icons #975

Merged
merged 2 commits into from
May 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion samples/apps/copilot-chat-app/webapp/src/Constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import botIcon1 from './assets/bot-icons/bot-icon-1.png';

export const Constants = {
app: {
name: 'Copilot',
Expand All @@ -20,7 +22,7 @@ export const Constants = {
id: 'bot',
fullName: 'Copilot',
emailAddress: '',
photo: '/assets/bot-icon-1.png',
photo: botIcon1,
},
fileExtension: 'skcb',
typingIndicatorTimeoutMs: 5000,
Expand Down
14 changes: 7 additions & 7 deletions samples/apps/copilot-chat-app/webapp/src/libs/useChat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ import { useSemanticKernel } from './semantic-kernel/useSemanticKernel';
import { BotService } from './services/BotService';
import { ChatService } from './services/ChatService';

import botIcon1 from '../assets/bot-icons/bot-icon-1.png';
import botIcon2 from '../assets/bot-icons/bot-icon-2.png';
import botIcon3 from '../assets/bot-icons/bot-icon-3.png';
import botIcon4 from '../assets/bot-icons/bot-icon-4.png';
import botIcon5 from '../assets/bot-icons/bot-icon-5.png';

export const useChat = () => {
const dispatch = useAppDispatch();
const { instance, accounts } = useMsal();
Expand All @@ -35,13 +41,7 @@ export const useChat = () => {
const botService = new BotService(process.env.REACT_APP_BACKEND_URI as string);
const chatService = new ChatService(process.env.REACT_APP_BACKEND_URI as string);

const botProfilePictures: string[] = [
'/assets/bot-icon-1.png',
'/assets/bot-icon-2.png',
'/assets/bot-icon-3.png',
'/assets/bot-icon-4.png',
'/assets/bot-icon-5.png',
];
const botProfilePictures: string[] = [botIcon1, botIcon2, botIcon3, botIcon4, botIcon5];

const loggedInUser: ChatUser = {
id: account?.homeAccountId || '',
Expand Down