Skip to content

fix: highlight command mistype #1060

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 1 commit into from
Apr 22, 2025
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions chat-client/src/client/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,16 +202,16 @@ export const createChat = (
}

const allExistingTabs: MynahUITabStoreModel = mynahUi.getAllTabs()
const highlightCommands = featureConfig.get('highlightCommands')
const highlightCommand = featureConfig.get('highlightCommand')

for (const tabId in allExistingTabs) {
mynahUi.updateStore(tabId, {
...tabFactory.getDefaultTabData(),
contextCommands: highlightCommands
contextCommands: highlightCommand
? [
{
groupName: 'Additional Commands',
commands: [toMynahContextCommand(highlightCommands)],
commands: [toMynahContextCommand(highlightCommand)],
},
]
: [],
Expand Down
8 changes: 4 additions & 4 deletions chat-client/src/client/mynahUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,11 @@ export const createMynahUi = (
tabBarButtons: defaultTabBarData.tabBarButtons,
contextCommands: [
...(contextCommandGroups || []),
...(featureConfig?.get('highlightCommands')
...(featureConfig?.get('highlightCommand')
? [
{
groupName: 'Additional commands',
commands: [toMynahContextCommand(featureConfig.get('highlightCommands'))],
commands: [toMynahContextCommand(featureConfig.get('highlightCommand'))],
},
]
: []),
Expand Down Expand Up @@ -748,11 +748,11 @@ ${params.message}`,
mynahUi.updateStore(tabId, {
contextCommands: [
...(contextCommandGroups || []),
...(featureConfig?.get('highlightCommands')
...(featureConfig?.get('highlightCommand')
? [
{
groupName: 'Additional commands',
commands: [toMynahContextCommand(featureConfig.get('highlightCommands'))],
commands: [toMynahContextCommand(featureConfig.get('highlightCommand'))],
},
]
: []),
Expand Down
2 changes: 1 addition & 1 deletion client/vscode/src/chatActivation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ function generateJS(webView: Webview, extensionUri: Uri): string {

const entrypoint = webView.asWebviewUri(chatUri)
const chatFeatures: Map<string, FeatureContext> = new Map()
chatFeatures.set('highlightCommands', {
chatFeatures.set('highlightCommand', {
variation: 'Context commands for chat',
value: {
stringValue: '@sage',
Expand Down
Loading