Skip to content

Commit 1f7c608

Browse files
authored
fix(amazonq): refactor the welcome screen to make it look better (#2027)
1 parent 89ae720 commit 1f7c608

File tree

1 file changed

+47
-11
lines changed

1 file changed

+47
-11
lines changed

chat-client/src/client/tabs/tabFactory.ts

Lines changed: 47 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,26 @@ export class TabFactory {
7474
...(this.agenticMode && pairProgrammingCardActive ? [programmerModeCard] : []),
7575
{
7676
type: ChatItemType.ANSWER,
77-
body: `Hi, I'm Amazon Q. I can answer your software development questions.
78-
Ask me to explain, debug, or optimize your code.
79-
You can enter \`/\` to see a list of quick actions.`,
77+
body: `<div style="display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 100px 0 20px 0;">
78+
<div style="font-family: monospace; font-size: 16px; line-height: 1.2; margin-bottom: 8px;">
79+
<pre>• • •
80+
• •
81+
• • •
82+
• • •
83+
• • •</pre>
84+
</div>
85+
86+
<div style="text-align: center;">
87+
88+
# Amazon Q
89+
**Coding Assistant Reimagined**
90+
91+
💡 Select code and ask me to explain it, or type \`/\` for quick commands
92+
93+
</div>
94+
</div>`,
95+
canBeVoted: false,
8096
},
81-
...(!this.agenticMode
82-
? [
83-
{
84-
type: ChatItemType.ANSWER,
85-
followUp: this.getWelcomeBlock(),
86-
},
87-
]
88-
: []),
8997
]
9098
: chatMessages
9199
? (chatMessages as ChatItem[])
@@ -218,6 +226,34 @@ export class TabFactory {
218226
return tabBarButtons.length ? tabBarButtons : undefined
219227
}
220228

229+
// Enhanced welcome messages block for non-agentic mode
230+
private getEnhancedWelcomeBlock() {
231+
return {
232+
text: '',
233+
options: [
234+
{
235+
pillText: 'Getting Started',
236+
prompt: 'What can Amazon Q help me with?',
237+
type: 'help',
238+
},
239+
],
240+
}
241+
}
242+
243+
// Agentic welcome messages block
244+
private getAgenticWelcomeBlock() {
245+
return {
246+
text: '',
247+
options: [
248+
{
249+
pillText: 'Getting Started',
250+
prompt: 'What can Amazon Q help me with?',
251+
type: 'help',
252+
},
253+
],
254+
}
255+
}
256+
221257
// Legacy welcome messages block
222258
private getWelcomeBlock() {
223259
return {

0 commit comments

Comments
 (0)