-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[Security Assistant] Clean up AI settings tabs #187705
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
Show all changes
24 commits
Select commit
Hold shift + click to select a range
8159791
make tabs more self contained
angorayc a55f254
handle save
angorayc a428535
Merge branch 'main' of github.com:elastic/kibana into ai-settings-fixup
angorayc 46788fb
default prompts
angorayc 21bc428
unit tests
angorayc 4a704ae
Merge branch 'main' of github.com:elastic/kibana into ai-settings-fixup
angorayc 796acc0
wordings
angorayc ee36cca
wording
angorayc 7268866
knowledge base wording
angorayc 14ad7ca
update systen prompts
angorayc 0197227
refetch/reset conversations and prompts
angorayc c42d530
styles
angorayc b286fb0
wording
angorayc 4740951
disable save button when empty
angorayc 0465be2
no fallback
angorayc 2312d8e
remove actions popover
angorayc 3b3c228
fix prompt removal and sync conversation when prompt created
angorayc 3054fcd
Merge branch 'main' of github.com:elastic/kibana into ai-settings-fixup
angorayc 4d3d813
remove .only
angorayc 0f1e5b4
unit tests
angorayc 8242557
unit tests
angorayc 2335485
fix append conversations to prompt
angorayc 41ad029
remove fallback value on conversation table
angorayc b86d019
save button was chopped in the settings modal
angorayc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
...t/impl/assistant/common/components/assistant_settings_management/inline_actions/index.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0; you may not use this file except in compliance with the Elastic License | ||
| * 2.0. | ||
| */ | ||
|
|
||
| import { EuiTableActionsColumnType } from '@elastic/eui'; | ||
| import { useCallback } from 'react'; | ||
| import * as i18n from './translations'; | ||
|
|
||
| interface Props<T> { | ||
| disabled?: boolean; | ||
| onDelete?: (rowItem: T) => void; | ||
| onEdit?: (rowItem: T) => void; | ||
| } | ||
|
|
||
| export const useInlineActions = <T extends { isDefault?: boolean | undefined }>() => { | ||
| const getInlineActions = useCallback(({ disabled = false, onDelete, onEdit }: Props<T>) => { | ||
| const handleEdit = (rowItem: T) => { | ||
| onEdit?.(rowItem); | ||
| }; | ||
|
|
||
| const handleDelete = (rowItem: T) => { | ||
| onDelete?.(rowItem); | ||
| }; | ||
|
|
||
| const actions: EuiTableActionsColumnType<T> = { | ||
| name: i18n.ACTIONS_BUTTON, | ||
| actions: [ | ||
| { | ||
| name: i18n.EDIT_BUTTON, | ||
| description: i18n.EDIT_BUTTON, | ||
| icon: 'pencil', | ||
| type: 'icon', | ||
| onClick: (rowItem: T) => { | ||
| handleEdit(rowItem); | ||
| }, | ||
| enabled: () => !disabled, | ||
| available: () => onEdit != null, | ||
| }, | ||
| { | ||
| name: i18n.DELETE_BUTTON, | ||
| description: i18n.DELETE_BUTTON, | ||
| icon: 'trash', | ||
| type: 'icon', | ||
| onClick: (rowItem: T) => { | ||
| handleDelete(rowItem); | ||
| }, | ||
| enabled: ({ isDefault }: { isDefault?: boolean }) => !isDefault && !disabled, | ||
| available: () => onDelete != null, | ||
| color: 'danger', | ||
| }, | ||
| ], | ||
| }; | ||
| return actions; | ||
| }, []); | ||
|
|
||
| return getInlineActions; | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 0 additions & 89 deletions
89
...tant/impl/assistant/common/components/assistant_settings_management/row_actions/index.tsx
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.