diff --git a/src/sql/workbench/contrib/scripting/browser/scripting.contribution.ts b/src/sql/workbench/contrib/scripting/browser/scripting.contribution.ts index eadf81b03f..b753009e84 100644 --- a/src/sql/workbench/contrib/scripting/browser/scripting.contribution.ts +++ b/src/sql/workbench/contrib/scripting/browser/scripting.contribution.ts @@ -94,7 +94,26 @@ MenuRegistry.appendMenuItem(MenuId.ObjectExplorerItemContext, { id: commands.OE_SCRIPT_AS_SELECT_COMMAND_ID, title: localize('scriptSelect', "Select Top 1000") }, - when: ContextKeyExpr.or(TreeNodeContextKey.NodeType.isEqualTo('Table'), TreeNodeContextKey.NodeType.isEqualTo('View')) + when: ContextKeyExpr.and( + ConnectionContextKey.Provider.notEqualsTo('KUSTO'), + ContextKeyExpr.or( + TreeNodeContextKey.NodeType.isEqualTo('Table'), + TreeNodeContextKey.NodeType.isEqualTo('View') + ) + ) +}); + +MenuRegistry.appendMenuItem(MenuId.ObjectExplorerItemContext, { + group: '0_query', + order: 1, + command: { + id: commands.OE_SCRIPT_AS_SELECT_COMMAND_ID, + title: localize('scriptKustoSelect', "Take 10") + }, + when: ContextKeyExpr.and( + ConnectionContextKey.Provider.isEqualTo('KUSTO'), + TreeNodeContextKey.NodeType.isEqualTo('Table') + ) }); MenuRegistry.appendMenuItem(MenuId.ObjectExplorerItemContext, {