diff --git a/web/app/components/app/chat/answer/index.tsx b/web/app/components/app/chat/answer/index.tsx index b8242bd215..68615341cc 100644 --- a/web/app/components/app/chat/answer/index.tsx +++ b/web/app/components/app/chat/answer/index.tsx @@ -260,7 +260,7 @@ const Answer: FC = ({
- {(isResponsing && (isAgentMode ? (!content && (agent_thoughts || []).length === 0) : !content)) + {(isResponsing && (isAgentMode ? (!content && (agent_thoughts || []).filter(item => !!item.thought || !!item.tool).length === 0) : !content)) ? (
@@ -268,7 +268,6 @@ const Answer: FC = ({ ) : (
- {annotation?.logAnnotation && (
@@ -299,9 +298,9 @@ const Answer: FC = ({ author: annotation.authorName, })} /> )} - {item.isOpeningStatement && item.suggestedQuestions && item.suggestedQuestions.length > 0 && ( + {item.isOpeningStatement && item.suggestedQuestions && item.suggestedQuestions.filter(q => !!q && q.trim()).length > 0 && (
- {item.suggestedQuestions.map((question, index) => ( + {item.suggestedQuestions.filter(q => !!q && q.trim()).map((question, index) => (
{
} > -
+
{tools.map((item: AgentTool & { icon: any; collection?: Collection }, index) => (
1 && 'mt-1', 'group relative flex justify-between items-center last-of-type:mb-0 pl-2.5 py-2 pr-3 w-full rounded-lg border-[0.5px] border-gray-200 ')} - style={{ - width: 'calc(50% - 2px)', - }} > -
+
{(item.isDeleted || item.notAuthor) ? ( @@ -117,12 +114,12 @@ const AgentTools: FC = () => { ))}
{item.tool_label || item.tool_name}
-
+
{(item.isDeleted || item.notAuthor) ? (
diff --git a/web/app/components/app/configuration/config/index.tsx b/web/app/components/app/configuration/config/index.tsx index e9d7d3eef5..7cd6312042 100644 --- a/web/app/components/app/configuration/config/index.tsx +++ b/web/app/components/app/configuration/config/index.tsx @@ -183,6 +183,8 @@ const Config: FC = () => { }) const hasChatConfig = isChatApp && (featureConfig.openingStatement || featureConfig.suggestedQuestionsAfterAnswer || (featureConfig.speechToText && !!speech2textDefaultModel) || (featureConfig.textToSpeech && !!text2speechDefaultModel) || featureConfig.citation) + const hasCompletionConfig = !isChatApp && (moreLikeThisConfig.enabled || (featureConfig.textToSpeech && !!text2speechDefaultModel)) + const hasToolbox = moderationConfig.enabled || featureConfig.annotation const wrapRef = useRef(null) @@ -272,8 +274,8 @@ const Config: FC = () => { ) } - {/* TextnGeneration config */}{ - !hasChatConfig && ( + {/* Text Generation config */}{ + hasCompletionConfig && ( = ({ }, [value]) const [tempSuggestedQuestions, setTempSuggestedQuestions] = useState(suggestedQuestions || []) - + const notEmptyQuestions = tempSuggestedQuestions.filter(question => !!question && question.trim()) const coloredContent = (tempValue || '') .replace(//g, '>') @@ -208,7 +208,7 @@ const OpeningStatement: FC = ({
) : (
- {tempSuggestedQuestions.map((question, index) => { + {notEmptyQuestions.map((question, index) => { return (
{question}