Skip to content
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

feat(chat): refactor application dialogs, add deployable app dialog draft (Issue #2353) #2355

Merged
merged 54 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
0ec9bb0
fix(chat): run npm ddp
Oct 10, 2024
89bea49
feat(chat): combine application dialogs into one wizard
Oct 10, 2024
cc81c87
feat(chat): refactor application dialogs, add deployable application …
Oct 11, 2024
910311a
feat(chat): hide draft dialog
Oct 11, 2024
50fec3c
Merge branch 'development' into feat/python-apps
Gimir Oct 11, 2024
27f6e84
fix(chat): fix logo delete issue
Oct 11, 2024
06513af
fix(chat): remove watcher
Oct 12, 2024
f1f8da2
fix(chat): rename error message component
Oct 12, 2024
b99c176
feat(chat): add controller hoc
Oct 13, 2024
edc53fd
feat(chat): improve validation, rework type system
Oct 13, 2024
be1f883
fix(chat): fix namings, remove extra code, add iconUrl for publish pa…
Oct 13, 2024
e7ccb9e
Merge branch 'development' of https://github.com/epam/ai-dial-chat in…
Oct 13, 2024
459d67a
Merge branch 'development' into feat/python-apps
Derikyan Oct 13, 2024
122b379
feat(chat): add start/stop application actions
Oct 17, 2024
12673c8
feat(chat): add new fields for executable app form, add start/stop ap…
Oct 17, 2024
7b96cd4
Merge branch 'feat/python-apps' of https://github.com/epam/ai-dial-ch…
Oct 17, 2024
c41bfa4
Merge branch 'development' of https://github.com/epam/ai-dial-chat in…
Oct 17, 2024
5d1caa0
fix(chat): fix npm issues
Oct 17, 2024
2a91793
fix(chat): fix npm issues
Oct 17, 2024
504fe61
fix(chat): fix npm issues
Oct 17, 2024
658836b
Merge branch 'development' of https://github.com/epam/ai-dial-chat in…
Oct 17, 2024
8a7d78a
fix(chat): fix create & start/stop api requests
Oct 18, 2024
ad3aaf9
Merge branch 'development' of https://github.com/epam/ai-dial-chat in…
Oct 18, 2024
f77326f
fix(chat): move mime format validator to utils
Oct 18, 2024
cadf444
fix(chat): fix attachment types field validation
Oct 20, 2024
0362f44
fix(chat): refactor application types
Oct 21, 2024
4616569
fix(chat): add functionStatus
Oct 22, 2024
09e9640
feat(chat): add dynamic fields component
Oct 23, 2024
829bf3c
feat(chat): remove application request for detailed view, retrieve fu…
Oct 23, 2024
1f7cce3
feat(chat): add files request on load
Oct 23, 2024
c397c91
Merge branch 'development' of https://github.com/epam/ai-dial-chat in…
Oct 23, 2024
9c06b5d
feat(chat): add start/stop application feature
Oct 23, 2024
bf9c484
fix(chat): fix useEffect dependency array
Oct 23, 2024
04a15e2
feat(chat): change application wizard background color
Oct 23, 2024
4904751
fix(chat): fix change status finish condition
Oct 25, 2024
e5c0a07
fix(chat): pass functionStatus to application
Oct 25, 2024
7dea8d3
feat(chat): add mapping validators
Oct 25, 2024
132840a
fix(chat): fix update application status fail handling
Oct 25, 2024
47c36b1
fix(chat): fix icon buttons, change status indicator size
Oct 25, 2024
5242553
feat(chat): add start/stop actions to application card context menu
Oct 25, 2024
f2315f0
feat(chat): add code apps feature flag
Oct 25, 2024
42a8987
Merge branch 'development' of https://github.com/epam/ai-dial-chat in…
Oct 25, 2024
66b1606
fix(chat): fix lint issues
Oct 25, 2024
f04fc29
Merge branch 'development' into feat/python-apps
IlyaBondar Oct 28, 2024
33e5020
fix(chat): fix model list modify conditions, fix pr issues
Oct 28, 2024
cd3a08c
Merge branch 'development' of https://github.com/epam/ai-dial-chat in…
Oct 28, 2024
98eab45
Merge branch 'feat/python-apps' of https://github.com/epam/ai-dial-ch…
Oct 28, 2024
49b2a42
fix(chat): refactor, fix namings
Oct 28, 2024
2752946
Merge branch 'development' of https://github.com/epam/ai-dial-chat in…
Oct 28, 2024
cf7faa3
Merge branch 'development' into feat/python-apps
IlyaBondar Oct 29, 2024
cee1811
Merge branch 'development' into feat/python-apps
IlyaBondar Oct 29, 2024
770d10f
Merge branch 'development' into feat/python-apps
IlyaBondar Oct 29, 2024
8139e0c
fix(chat): run prettier
Oct 29, 2024
2f17f49
Merge branch 'development' into feat/python-apps
IlyaBondar Oct 29, 2024
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
2 changes: 1 addition & 1 deletion apps/chat/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ DIAL_ROLES_FIELD="dial_roles"


# Application UI settings
ENABLED_FEATURES="conversations-section,prompts-section,top-settings,top-clear-conversation,top-chat-info,top-chat-model-settings,empty-chat-settings,header,footer,request-api-key,report-an-issue,likes,conversations-sharing,prompts-sharing,input-files,attachments-manager,conversations-publishing,prompts-publishing,custom-logo,input-links,custom-applications,message-templates,marketplace,quick-apps"
ENABLED_FEATURES="conversations-section,prompts-section,top-settings,top-clear-conversation,top-chat-info,top-chat-model-settings,empty-chat-settings,header,footer,request-api-key,report-an-issue,likes,conversations-sharing,prompts-sharing,input-files,attachments-manager,conversations-publishing,prompts-publishing,custom-logo,input-links,custom-applications,message-templates,marketplace,quick-apps,code-apps"
NEXT_PUBLIC_APP_NAME="Local Development APP Name"
NEXT_PUBLIC_DEFAULT_SYSTEM_PROMPT=""
NEXT_PUBLIC_DEFAULT_TEMPERATURE="1"
Expand Down
46 changes: 20 additions & 26 deletions apps/chat/src/components/Chat/ModelList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ import { useTranslation } from 'next-i18next';

import classNames from 'classnames';

import { getModelDescription, isQuickApp } from '@/src/utils/app/application';
import {
getApplicationType,
getModelDescription,
isApplicationStatusUpdating,
} from '@/src/utils/app/application';
import {
getOpenAIEntityFullName,
groupModelsAndSaveOrder,
Expand All @@ -37,10 +41,9 @@ import { SettingsSelectors } from '@/src/store/settings/settings.reducers';

import { DESCRIPTION_DELIMITER_REGEX } from '@/src/constants/chat';

import { QuickAppDialog } from '@/src/components/Common/QuickAppDialog';
import { ApplicationWizard } from '@/src/components/Common/ApplicationWizard/ApplicationWizard';

import { ModelIcon } from '../Chatbar/ModelIcon';
import { ApplicationDialog } from '../Common/ApplicationDialog';
import { ConfirmDialog } from '../Common/ConfirmDialog';
import ContextMenu from '../Common/ContextMenu';
import { DisableOverlay } from '../Common/DisableOverlay';
Expand Down Expand Up @@ -113,6 +116,7 @@ const ModelGroup = ({

const description = getModelDescription(currentEntity);
const isPublicEntity = isEntityPublic(currentEntity);
const isModifyDisabled = isApplicationStatusUpdating(currentEntity);

const handleSelectVersion = useCallback(
(entity: DialAIEntityModel) => onSelect(entity.id),
Expand All @@ -125,6 +129,7 @@ const ModelGroup = ({
name: t('Edit'),
dataQa: 'edit',
display: !isPublicEntity,
disabled: isModifyDisabled,
Icon: IconPencilMinus,
onClick: (e: React.MouseEvent) => {
e.stopPropagation();
Expand Down Expand Up @@ -157,6 +162,7 @@ const ModelGroup = ({
{
name: t('Delete'),
dataQa: 'delete',
disabled: isModifyDisabled && !isPublicEntity,
display: !isPublicEntity,
Icon: IconTrashX,
onClick: (e: React.MouseEvent) => {
Expand All @@ -174,6 +180,7 @@ const ModelGroup = ({
handleEdit,
handlePublish,
handleOpenDeleteConfirmModal,
isModifyDisabled,
],
);

Expand Down Expand Up @@ -342,11 +349,7 @@ export const ModelList = ({
const handleEdit = useCallback(
(currentEntity: DialAIEntityModel) => {
dispatch(ApplicationActions.get(currentEntity.id));
handleOpenApplicationModal(
isQuickApp(currentEntity)
? ApplicationType.QUICK_APP
: ApplicationType.CUSTOM_APP,
);
handleOpenApplicationModal(getApplicationType(currentEntity));
},
[dispatch, handleOpenApplicationModal],
);
Expand Down Expand Up @@ -441,24 +444,15 @@ export const ModelList = ({
onClose={handleConfirmDialogClose}
/>
)}
{applicationModal &&
applicationModal.type === ApplicationType.CUSTOM_APP && (
<ApplicationDialog
isOpen={applicationModal.type === ApplicationType.CUSTOM_APP}
onClose={handleCloseApplicationDialog}
currentReference={currentEntity?.reference}
isEdit
/>
)}
{applicationModal &&
applicationModal.type === ApplicationType.QUICK_APP && (
<QuickAppDialog
isOpen={applicationModal.type === ApplicationType.QUICK_APP}
onClose={handleCloseApplicationDialog}
currentReference={currentEntity?.reference}
isEdit
/>
)}
{!!applicationModal && (
<ApplicationWizard
isOpen={!!applicationModal}
onClose={handleCloseApplicationDialog}
type={applicationModal.type}
currentReference={currentEntity?.reference}
isEdit
/>
)}
{publishAction && entityForPublish && entityForPublish.id && (
<PublishModal
entity={entityForPublish}
Expand Down
Loading
Loading