Skip to content

Commit

Permalink
format fix
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyaBondar committed Nov 18, 2024
1 parent 40f33f8 commit b9d41c2
Show file tree
Hide file tree
Showing 18 changed files with 53 additions and 52 deletions.
12 changes: 6 additions & 6 deletions apps/chat-e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@
"incremental": true,
"plugins": [
{
"name": "next",
},
"name": "next"
}
],
"paths": {
"@/*": ["apps/chat-e2e/*"],
"@/chat/*": ["apps/chat/src/*"],
"@epam/ai-dial-shared": ["libs/shared/src/index.ts"],
"@epam/ai-dial-shared": ["libs/shared/src/index.ts"]
},
"baseUrl": "../../",
"types": ["jsdom"],
"types": ["jsdom"]
},
"include": [
"**/*.ts",
"**/*.tsx",
"**/*.js",
"**/*.jsx",
"next-env.d.ts",
"postcss.config.js",
"postcss.config.js"
],
"exclude": ["node_modules", "src/**/*.spec.ts"],
"exclude": ["node_modules", "src/**/*.spec.ts"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const ChatInputMessage = ({
selectedModels?.length === 1 ? selectedModels[0]?.tokenizer : undefined;
const maxTokensLength =
selectedModels.length === 1
? selectedModels[0]?.limits?.maxRequestTokens ?? Infinity
? (selectedModels[0]?.limits?.maxRequestTokens ?? Infinity)
: Infinity;
const { getTokensLength } = useTokenizer(modelTokenizer);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const ReplayVariablesDialog = () => {
replayUserMessagesStack:
conversation.replay.replayUserMessagesStack.map(
(message, index) =>
index === conversation.replay?.activeReplayIndex ?? 0
(index === conversation.replay?.activeReplayIndex ?? 0)
? {
...message,
content: newContent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export const PlaybackControls = ({
>
{phase === PlaybackPhases.EMPTY
? t('Type a message')
: activeMessage.content ?? ''}
: (activeMessage.content ?? '')}
</span>

{phase === PlaybackPhases.MESSAGE && hasAttachments && (
Expand Down
4 changes: 2 additions & 2 deletions apps/chat/src/components/Chat/Publish/PublishWizard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,8 @@ export function PublishModal<
value={publishRequestName}
placeholder={
publishAction === PublishActions.ADD
? t('Type publication request name...') ?? ''
: t('Type unpublish request name...') ?? ''
? (t('Type publication request name...') ?? '')
: (t('Type unpublish request name...') ?? '')
}
className="w-full bg-transparent text-base font-semibold outline-none"
data-qa="request-name"
Expand Down
2 changes: 1 addition & 1 deletion apps/chat/src/components/Marketplace/ApplicationCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export const ApplicationCard = ({
);

const iconSize =
isNotDesktop ?? isMediumScreen() ? SMALL_ICON_SIZE : DESKTOP_ICON_SIZE;
(isNotDesktop ?? isMediumScreen()) ? SMALL_ICON_SIZE : DESKTOP_ICON_SIZE;
const Bookmark = installedModelIds.has(entity.reference)
? IconBookmarkFilled
: IconBookmark;
Expand Down
4 changes: 2 additions & 2 deletions apps/chat/src/components/Settings/SettingDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ export const SettingDialog: FC<Props> = ({ open, onClose }) => {
localLogo={
deleteLogo
? undefined
: (localLogoFile && localLogoFile.name) ??
customLogoLocalStoreName
: ((localLogoFile && localLogoFile.name) ??
customLogoLocalStoreName)
}
title={t('Custom logo')}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ export const VisualizerRenderer = ({
...customAttachmentData?.layout,
width: scrollWidth
? scrollWidth
: customAttachmentData?.layout.width ?? DEFAULT_CUSTOM_ATTACHMENT_WIDTH,
: (customAttachmentData?.layout.width ??
DEFAULT_CUSTOM_ATTACHMENT_WIDTH),
height:
customAttachmentData?.layout.height ?? DEFAULT_CUSTOM_ATTACHMENT_HEIGHT,
};
Expand Down
4 changes: 2 additions & 2 deletions apps/chat/src/utils/app/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ export const prepareEntityName = (
options?.replaceWithSpacesForRenaming ? ' ' : '',
)
.trim()
: name
: (name
.replace(/\r\n|\r/gm, '\n')
.split('\n')
.map((s) => s.replace(notAllowedSymbolsRegex, ' ').trim())
.filter(Boolean)[0] ?? '';
.filter(Boolean)[0] ?? '');
const result =
clearName.length > MAX_ENTITY_LENGTH
? substring(clearName, 0, MAX_ENTITY_LENGTH)
Expand Down
2 changes: 1 addition & 1 deletion apps/chat/src/utils/app/conversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const getAssitantModelId = (
conversationAssistantModelId?: string,
): string | undefined => {
return modelType === EntityType.Assistant
? conversationAssistantModelId ?? defaultAssistantModelId
? (conversationAssistantModelId ?? defaultAssistantModelId)
: undefined;
};

Expand Down
2 changes: 1 addition & 1 deletion apps/chat/src/utils/app/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ export const isConversationHasExternalAttachments = (
): boolean => {
const userBucket = BucketService.getBucket();
const messages =
conversation.playback?.messagesStack ?? conversation.isReplay
(conversation.playback?.messagesStack ?? conversation.isReplay)
? [
...(conversation.replay?.replayUserMessagesStack ?? []),
...conversation.messages,
Expand Down
4 changes: 2 additions & 2 deletions apps/chat/src/utils/app/import-export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,8 @@ export const updateAttachment = ({

const newTitle =
oldAttachment.type === PLOTLY_CONTENT_TYPE
? oldAttachment.title ?? newAttachmentFile?.name
: newAttachmentFile?.name ?? oldAttachment.title;
? (oldAttachment.title ?? newAttachmentFile?.name)
: (newAttachmentFile?.name ?? oldAttachment.title);

const updatedAttachment: Attachment = {
...oldAttachment,
Expand Down
12 changes: 6 additions & 6 deletions apps/overlay-sandbox/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"incremental": true,
"plugins": [
{
"name": "next",
},
],
"name": "next"
}
]
},
"include": [
"**/*.ts",
Expand All @@ -25,12 +25,12 @@
"../../apps/overlay-sandbox/.next/types/**/*.ts",
"../../dist/apps/overlay-sandbox/.next/types/**/*.ts",
"next-env.d.ts",
".next/types/**/*.ts",
".next/types/**/*.ts"
],
"exclude": [
"node_modules",
"jest.config.ts",
"src/**/*.spec.ts",
"src/**/*.test.ts",
],
"src/**/*.test.ts"
]
}
10 changes: 5 additions & 5 deletions libs/chat-visualizer-connector/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noFallthroughCasesInSwitch": true
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json",
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json",
},
],
"path": "./tsconfig.spec.json"
}
]
}
10 changes: 5 additions & 5 deletions libs/modulify-ui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"jsx": "react-jsx",
"composite": true,
"composite": true
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json",
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json",
},
],
"path": "./tsconfig.spec.json"
}
]
}
10 changes: 5 additions & 5 deletions libs/overlay/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noFallthroughCasesInSwitch": true
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json",
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json",
},
],
"path": "./tsconfig.spec.json"
}
]
}
10 changes: 5 additions & 5 deletions libs/shared/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noFallthroughCasesInSwitch": true
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json",
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json",
},
],
"path": "./tsconfig.spec.json"
}
]
}
10 changes: 5 additions & 5 deletions libs/visualizer-connector/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noFallthroughCasesInSwitch": true
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json",
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json",
},
],
"path": "./tsconfig.spec.json"
}
]
}

0 comments on commit b9d41c2

Please sign in to comment.