Skip to content

[Temp] Starter prompts#21

Closed
stephmilovic wants to merge 23 commits intocontext_promptsfrom
tile_prompts
Closed

[Temp] Starter prompts#21
stephmilovic wants to merge 23 commits intocontext_promptsfrom
tile_prompts

Conversation

@stephmilovic
Copy link
Owner

Temp PR against context_prompts in order to see the actual diff

};

export const getAllPromptIds = (pGroups: PromptGroup[]) => {
return pGroups.map((promptGroup: PromptGroup) => [...Object.values(promptGroup)]).flat();
Copy link

Choose a reason for hiding this comment

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

flatMap could be used

capabilities.actions?.delete === true &&
capabilities.actions?.save === true;

const starterPromptsEnabled = useIsExperimentalFeatureEnabled('starterPromptsEnabled');
Copy link

Choose a reason for hiding this comment

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

Is this feature flag still enabled through xpack.securitySolution.enableExperimental or is this the new feature flag service?


const starterPromptsEnabled = useIsExperimentalFeatureEnabled('starterPromptsEnabled');
// remove once product has signed off on prompt text
const isStarterPromptsEnabled = starterPromptsEnabled;
Copy link

Choose a reason for hiding this comment

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

Extra re-assignment?


const result = await tool.func({ query: 'What is Kibana Security?', product: 'kibana' });

expect(result).toContain('The "AI Assistant knowledge base" needs to be installed');
Copy link

Choose a reason for hiding this comment

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

Nice!

const isKnowledgeBaseInstalled = await getIsKnowledgeBaseInstalled(kbDataClient);
if (!isKnowledgeBaseInstalled) {
// prompt to help user install knowledge base
return 'The "AI Assistant knowledge base" needs to be installed, containing the Security Labs content. Navigate to the Knowledge Base page in the AI Assistant Settings to install it.';
Copy link

Choose a reason for hiding this comment

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

Suggested change
return 'The "AI Assistant knowledge base" needs to be installed, containing the Security Labs content. Navigate to the Knowledge Base page in the AI Assistant Settings to install it.';
return 'The "AI Assistant knowledge base" needs to be installed, this will install the Security Labs content. Navigate to the Knowledge Base page in the AI Assistant Settings to install it.';

Copy link

@KDKHD KDKHD left a comment

Choose a reason for hiding this comment

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

Code changes look good - How do I test the starter prompts?

stephmilovic and others added 7 commits June 24, 2025 16:22
…ed (elastic#221732)

## Summary

Resolves: elastic#216810

This PR uses the licensing plugin to check is security is enabled. If
not, we skip adding API keys to tasks that pass in a `request` object,
but still scheduling them.

### Checklist
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants