77 |
78 | {messages.length == 0 && (
{welcomeMessage}
)}
79 | {messages.map((message, index) => (
80 |
81 |
82 |
{message.role}
83 | {message.content}
84 |
85 |
86 | ))}
87 | {isTyping &&
System is typing...
}
88 |
89 |
90 |
115 |
116 | );
117 | }
118 |
119 | export default Chat;
120 |
--------------------------------------------------------------------------------
/src/frontend/src/main.jsx:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation.
2 | // Licensed under the MIT License.
3 | import { StrictMode } from 'react'
4 | import { createRoot } from 'react-dom/client'
5 | import './App.css'
6 | import App from './App.jsx'
7 |
8 | createRoot(document.getElementById('root')).render(
9 |
10 |
11 | ,
12 | )
13 |
--------------------------------------------------------------------------------
/src/frontend/vite.config.js:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation.
2 | // Licensed under the MIT License.
3 | import { defineConfig } from 'vite'
4 | import react from '@vitejs/plugin-react'
5 |
6 | // https://vite.dev/config/
7 | export default defineConfig({
8 | plugins: [react()]
9 | })
10 |
--------------------------------------------------------------------------------