Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ export type AssistantFeatureKey = keyof AssistantFeatures;
export const defaultAssistantFeatures = Object.freeze({
assistantModelEvaluation: false,
defendInsights: false,
advancedEsqlGeneration: false,
});
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ describe('AssistantProvider', () => {
isStarterPromptsEnabled: expect.any(Boolean),
}),
assistantFeatures: expect.objectContaining({
advancedEsqlGeneration: expect.any(Boolean),
assistantModelEvaluation: expect.any(Boolean),
defendInsights: expect.any(Boolean),
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ export const INVOKE_ASSISTANT_SUCCESS_EVENT: EventTypeOpts<{
durationMs: number;
toolsInvoked: {
AlertCountsTool?: number;
NaturalLanguageESQLTool?: number;
GenerateESQLTool?: number;
AskAboutESQLTool?: number;
KnowledgeBaseRetrievalTool?: number;
KnowledgeBaseWriteTool?: number;
OpenAndAcknowledgedAlertsTool?: number;
Expand Down Expand Up @@ -139,7 +140,14 @@ export const INVOKE_ASSISTANT_SUCCESS_EVENT: EventTypeOpts<{
optional: true,
},
},
NaturalLanguageESQLTool: {
GenerateESQLTool: {
type: 'long',
_meta: {
description: 'Number of times tool was invoked.',
optional: true,
},
},
AskAboutESQLTool: {
type: 'long',
_meta: {
description: 'Number of times tool was invoked.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,6 @@ export const allowedExperimentalValues = Object.freeze({
*/
assistantModelEvaluation: false,

/**
* Enables advanced ESQL generation for the Assistant.
*/
advancedEsqlGeneration: false,

/**
* Enables the Managed User section inside the new user details flyout.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { getPromptSuffixForOssModel } from './utils/common';

export type ESQLToolParams = Require<AssistantToolParams, 'assistantContext'>;

const TOOL_NAME = 'AskAboutEsqlTool';
const TOOL_NAME = 'AskAboutESQLTool';

const toolDetails = {
id: 'ask-about-esql-tool',
Expand All @@ -40,12 +40,7 @@ export const ASK_ABOUT_ESQL_TOOL: AssistantTool = {
sourceRegister: APP_UI_ID,
isSupported: (params: AssistantToolParams): params is ESQLToolParams => {
const { inference, connectorId, assistantContext } = params;
return (
inference != null &&
connectorId != null &&
assistantContext != null &&
assistantContext.getRegisteredFeatures('securitySolutionUI').advancedEsqlGeneration
);
return inference != null && connectorId != null && assistantContext != null;
},
async getTool(params: AssistantToolParams) {
if (!this.isSupported(params)) return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export type GenerateEsqlParams = Require<
const TOOL_NAME = 'GenerateESQLTool';

const toolDetails = {
id: 'gnerate-esql-tool',
id: 'generate-esql-tool',
name: TOOL_NAME,
// note: this description is overwritten when `getTool` is called
// local definitions exist ../elastic_assistant/server/lib/prompt/tool_prompts.ts
Expand All @@ -43,7 +43,6 @@ export const GENERATE_ESQL_TOOL: AssistantTool = {
inference != null &&
connectorId != null &&
assistantContext != null &&
assistantContext.getRegisteredFeatures('securitySolutionUI').advancedEsqlGeneration &&
createLlmInstance != null
);
},
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import { PRODUCT_DOCUMENTATION_TOOL } from './product_docs/product_documentation_tool';
import { GENERATE_ESQL_TOOL } from './esql/generate_esql_tool';
import { ASK_ABOUT_ESQL_TOOL } from './esql/ask_about_esql_tool';
import { NL_TO_ESQL_TOOL } from './esql/nl_to_esql_tool';
import { ALERT_COUNTS_TOOL } from './alert_counts/alert_counts_tool';
import { OPEN_AND_ACKNOWLEDGED_ALERTS_TOOL } from './open_and_acknowledged_alerts/open_and_acknowledged_alerts_tool';
import { DEFEND_INSIGHTS_TOOL } from './defend_insights';
Expand All @@ -25,7 +24,6 @@ export const assistantTools = [
KNOWLEDGE_BASE_WRITE_TOOL,
GENERATE_ESQL_TOOL,
ASK_ABOUT_ESQL_TOOL,
NL_TO_ESQL_TOOL,
OPEN_AND_ACKNOWLEDGED_ALERTS_TOOL,
PRODUCT_DOCUMENTATION_TOOL,
SECURITY_LABS_KNOWLEDGE_BASE_TOOL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,6 @@ export class Plugin implements ISecuritySolutionPlugin {
plugins.elasticAssistant.registerTools(APP_UI_ID, assistantTools);
const features = {
assistantModelEvaluation: config.experimentalFeatures.assistantModelEvaluation,
advancedEsqlGeneration: config.experimentalFeatures.advancedEsqlGeneration,
};
plugins.elasticAssistant.registerFeatures(APP_UI_ID, features);
plugins.elasticAssistant.registerFeatures('management', features);
Expand Down