Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion packages/core/resources/css/amazonq-webview.css
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,6 @@ div.mynah-card.padding-large {
}

.mynah-chat-wrapper {
padding: 0.75rem 1.25rem !important; /* 12px top/bottom, 20px left/right */
padding: 0.75rem 1.25rem;
box-sizing: border-box;
}
28 changes: 25 additions & 3 deletions packages/core/src/amazonq/webview/ui/tabs/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ChatItem, ChatItemType, MynahUIDataModel, QuickActionCommandGroup } fro
import { TabType } from '../storages/tabsStorage'
import { FollowUpGenerator } from '../followUps/generator'
import { QuickActionGenerator } from '../quickActions/generator'
import { qChatIntroMessageForSMUS, TabTypeDataMap } from './constants'
import { TabTypeDataMap } from './constants'
import { agentWalkthroughDataModel } from '../walkthrough/agent'
import { FeatureContext } from '../../../../shared/featureConfig'
import { RegionProfile } from '../../../../codewhisperer/models/model'
Expand Down Expand Up @@ -56,6 +56,18 @@ export class TabDataGenerator {
if (tabType === 'welcome') {
return {}
}
const programmerModeCard: ChatItem | undefined = {
type: ChatItemType.ANSWER,
title: 'NEW FEATURE',
header: {
icon: 'code-block',
iconStatus: 'primary',
body: '## Pair programmer mode',
},
fullWidth: true,
canBeDismissed: true,
body: 'Pair code with Amazon Q, your virtual pair programmer that can work alongside you autonomously making real-time code changes on your behalf. \n\n Switch off pair programmer mode to get read-only responses from Q.',
}

const regionProfileCard: ChatItem | undefined =
this.regionProfile === undefined
Expand All @@ -67,6 +79,15 @@ export class TabDataGenerator {
messageId: 'regionProfile',
}

const welcomeMessage = `Hi! I'm Amazon Q.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@Randall-Jiang Randall-Jiang Apr 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I add the seperate welcomeMessage here is I don't want to mess up the current user experience since I only got the UI for agentic chat. I will update constants.ts if we finalize that we are using the same welcome message globally


You can ask me to:
• Create new projects and files
• Make changes to your codebase
• Explain how to do things

Enter \`/\` to view quick actions. Use \`@\` to add saved prompts, files, folders, or your entire workspace as context.`

const tabData: MynahUIDataModel = {
tabTitle: taskName ?? TabTypeDataMap[tabType].title,
promptInputInfo:
Expand All @@ -76,10 +97,11 @@ export class TabDataGenerator {
contextCommands: this.getContextCommands(tabType),
chatItems: needWelcomeMessages
? [
...(tabType === 'cwc' || tabType === 'unknown' ? [programmerModeCard] : []),
...(regionProfileCard ? [regionProfileCard] : []),
{
type: ChatItemType.ANSWER,
body: isSMUS ? qChatIntroMessageForSMUS : TabTypeDataMap[tabType].welcome,
body: welcomeMessage,
},
{
type: ChatItemType.ANSWER,
Expand All @@ -88,7 +110,7 @@ export class TabDataGenerator {
]
: [...(regionProfileCard ? [regionProfileCard] : [])],
promptInputOptions:
tabType === 'cwc'
tabType === 'cwc' || tabType === 'unknown'
? [
{
type: 'switch',
Expand Down