File tree Expand file tree Collapse file tree 2 files changed +43
-5
lines changed Expand file tree Collapse file tree 2 files changed +43
-5
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,18 @@ function initChat() {
9
9
const chatClient = new ChatClient ( chatUI ) ;
10
10
11
11
const form = document . getElementById ( "chat-form" ) ;
12
-
13
12
const messageInput = document . getElementById ( "message" ) ;
14
-
13
+ const targetContainer = document . getElementById ( "messages" ) ;
14
+ const placeholderWrapper = document . getElementById ( "placeholder-wrapper" ) ;
15
15
16
16
form . addEventListener ( "submit" , async function ( e ) {
17
17
e . preventDefault ( ) ;
18
+
19
+ // Remove placeholder message if it exists
20
+ if ( placeholderWrapper ) {
21
+ placeholderWrapper . remove ( ) ;
22
+ }
23
+
18
24
await chatClient . sendMessage ( "/chat" , messageInput . value . trim ( ) ) ;
19
25
messageInput . value = "" ;
20
26
} ) ;
@@ -24,4 +30,4 @@ function initChat() {
24
30
} ;
25
31
}
26
32
27
- document . addEventListener ( "DOMContentLoaded" , initChat ) ;
33
+ document . addEventListener ( "DOMContentLoaded" , initChat ) ;
Original file line number Diff line number Diff line change 12
12
< link rel ="
stylesheet "
href ="
https://cdn.jsdelivr.net/npm/[email protected] /dist/cosmo/bootstrap.min.css "
13
13
integrity ="sha256-axRDISYf7Hht1KhcMnfDV2nq7hD/8Q9Rxa0YlW/o3NU= " crossorigin ="anonymous ">
14
14
< link href ="/static/styles.css " rel ="stylesheet " type ="text/css ">
15
+ < style >
16
+ # messages {
17
+ display : flex;
18
+ flex-direction : column;
19
+ align-items : center;
20
+ text-align : center;
21
+ }
22
+ # placeholder-wrapper {
23
+ display : flex;
24
+ flex-grow : 1 ;
25
+ justify-content : center;
26
+ align-items : center;
27
+ width : 100% ;
28
+ }
29
+ # placeholder-message {
30
+ color : # 6c757d ;
31
+ }
32
+ .header {
33
+ font-size : 2em ;
34
+ font-weight : bold;
35
+ margin-bottom : 10px ;
36
+ }
37
+ .message-content {
38
+ text-align : left;
39
+ }
40
+ </ style >
15
41
</ head >
16
42
< body >
17
43
< div class ="container-fluid h-100 d-flex flex-row ">
18
44
< div class ="row flex-grow-1 h-100 ">
19
45
<!-- Chat Section -->
20
46
< div class ="col-full d-flex flex-column h-100 " id ="chat-container "> <!-- Full width initially -->
21
47
< div id ="messages " class ="px-4 pb-4 pt-2 flex-grow-1 overflow-y-auto align-items-stretch ">
22
- <!-- Message content goes here -->
48
+ < div id ="placeholder-wrapper ">
49
+ < div id ="placeholder-message " class ="text-center text-muted my-3 ">
50
+ < div class ="header "> Getting Started with Agents Using Azure AI Foundry</ div >
51
+ Type your message in the text box below. You can start with a simple "Hey" or try something fun like "Tell me a joke."< br >
52
+ You can also ask something specific related to the information in the files used for Azure Search, for example, "What is Contoso Galaxy Innovations product?"
53
+ </ div >
54
+ </ div >
23
55
</ div >
24
56
25
57
< div id ="chat-area " class ="text-light px-4 py-2 rounded-top text-dark d-flex flex-column justify-content-center background-user ">
@@ -76,4 +108,4 @@ <h5 class="mb-0">Document Viewer</h5>
76
108
< script src ="https://cdn.jsdelivr.net/npm/markdown-it/dist/markdown-it.min.js "> </ script >
77
109
< script type ="module " src ="/static/main.js "> </ script >
78
110
</ body >
79
- </ html >
111
+ </ html >
You can’t perform that action at this time.
0 commit comments