Skip to content

Commit

Permalink
fix(chat): fix settings tooltip (Issue #3020) (#3021)
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyaBondar authored Jan 27, 2025
1 parent fb799dc commit a704e8d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions apps/chat/src/components/Chat/ChatHeader/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
doesModelAllowAddons,
doesModelAllowSystemPrompt,
doesModelAllowTemperature,
doesModelHaveSettings,
} from '@/src/utils/app/models';

import { Conversation } from '@/src/types/chat';
Expand Down Expand Up @@ -346,6 +347,7 @@ export const ChatHeader = Inversify.register(
tooltip={
<HeaderSettingsTooltip
disallowChangeSettings={disallowChangeSettings}
hasSettings={!!doesModelHaveSettings(model)}
subModel={
conversation.assistantModelId &&
model?.type === EntityType.Assistant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ interface Props {
temperature: number | null;
selectedAddons: DialAIEntityAddon[] | null;
disallowChangeSettings: boolean;
hasSettings: boolean;
}

const SM_HEIGHT_THRESHOLDS = [
Expand All @@ -31,6 +32,7 @@ export const HeaderSettingsTooltip = ({
temperature,
selectedAddons,
disallowChangeSettings,
hasSettings,
}: Props) => {
const { t } = useTranslation(Translation.Chat);

Expand All @@ -46,7 +48,7 @@ export const HeaderSettingsTooltip = ({
>
<div className="font-semibold">
{t(
disallowChangeSettings
disallowChangeSettings || !hasSettings
? 'Conversation settings'
: 'Change conversation settings',
)}
Expand Down

0 comments on commit a704e8d

Please sign in to comment.