Skip to content

fix: remove @ mention in placeholder q chat text if agentic mode not available #1311

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

Merged
Merged
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
14 changes: 8 additions & 6 deletions chat-client/src/client/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,13 @@ import { TabFactory } from './tabs/tabFactory'
import { ChatClientAdapter } from '../contracts/chatClientAdapter'
import { toMynahContextCommand, toMynahIcon } from './utils'

const DEFAULT_TAB_DATA = {
tabTitle: 'Chat',
promptInputInfo:
'Amazon Q Developer uses generative AI. You may need to verify responses. See the [AWS Responsible AI Policy](https://aws.amazon.com/machine-learning/responsible-ai/policy/).',
promptInputPlaceholder: 'Ask a question. Use @ to add context, / for quick actions',
const getDefaultTabConfig = (agenticMode?: Boolean) => {
return {
tabTitle: 'Chat',
promptInputInfo:
'Amazon Q Developer uses generative AI. You may need to verify responses. See the [AWS Responsible AI Policy](https://aws.amazon.com/machine-learning/responsible-ai/policy/).',
promptInputPlaceholder: `Ask a question. Use${agenticMode ? ' @ to add context,' : ''} / for quick actions`,
}
}

type ChatClientConfig = Pick<MynahUIDataModel, 'quickActionCommands'> & {
Expand Down Expand Up @@ -374,7 +376,7 @@ export const createChat = (
}

const messager = new Messager(chatApi)
const tabFactory = new TabFactory(DEFAULT_TAB_DATA, [
const tabFactory = new TabFactory(getDefaultTabConfig(config?.agenticMode), [
...(config?.quickActionCommands ? config.quickActionCommands : []),
])

Expand Down
Loading