mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-25 08:06:48 +08:00
### What problem does this PR solve? Feat: Place the new mcp button at the end of the line. #10427 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -446,7 +446,7 @@ export const initialAgentValues = {
|
||||
...initialLlmBaseValues,
|
||||
description: '',
|
||||
user_prompt: '',
|
||||
sys_prompt: t('flow.sysPromptDefultValue'),
|
||||
sys_prompt: t('flow.sysPromptDefaultValue'),
|
||||
prompts: [{ role: PromptRole.User, content: `{${AgentGlobals.SysQuery}}` }],
|
||||
message_history_window_size: 12,
|
||||
max_retries: 3,
|
||||
|
||||
@ -212,7 +212,7 @@ function AgentForm({ node }: INextOperatorForm) {
|
||||
<FormItem className="flex-1">
|
||||
<FormLabel>{t('flow.maxRetries')}</FormLabel>
|
||||
<FormControl>
|
||||
<NumberInput {...field} max={8}></NumberInput>
|
||||
<NumberInput {...field} max={8} min={0}></NumberInput>
|
||||
</FormControl>
|
||||
</FormItem>
|
||||
)}
|
||||
@ -237,7 +237,7 @@ function AgentForm({ node }: INextOperatorForm) {
|
||||
<FormItem className="flex-1">
|
||||
<FormLabel>{t('flow.maxRounds')}</FormLabel>
|
||||
<FormControl>
|
||||
<NumberInput {...field}></NumberInput>
|
||||
<NumberInput {...field} min={0}></NumberInput>
|
||||
</FormControl>
|
||||
</FormItem>
|
||||
)}
|
||||
|
||||
@ -5,7 +5,7 @@ import {
|
||||
FormFieldConfig,
|
||||
FormFieldType,
|
||||
} from '@/components/dynamic-form';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { BlockButton, Button } from '@/components/ui/button';
|
||||
import { Modal } from '@/components/ui/modal/modal';
|
||||
import {
|
||||
Sheet,
|
||||
@ -142,13 +142,12 @@ export const GobalParamSheet = (props: IGobalParamModalProps) => {
|
||||
>
|
||||
<SheetHeader className="p-5">
|
||||
<SheetTitle className="flex items-center gap-2.5">
|
||||
{t('flow.gobalVariable')}
|
||||
{t('flow.conversationVariable')}
|
||||
</SheetTitle>
|
||||
</SheetHeader>
|
||||
|
||||
<div className="px-5 pb-5">
|
||||
<Button
|
||||
variant={'secondary'}
|
||||
<BlockButton
|
||||
onClick={() => {
|
||||
setFields(GobalFormFields);
|
||||
setDefaultValues(GobalVariableFormDefaultValues);
|
||||
@ -156,7 +155,7 @@ export const GobalParamSheet = (props: IGobalParamModalProps) => {
|
||||
}}
|
||||
>
|
||||
{t('flow.add')}
|
||||
</Button>
|
||||
</BlockButton>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-col gap-2 px-5 ">
|
||||
@ -203,7 +202,7 @@ export const GobalParamSheet = (props: IGobalParamModalProps) => {
|
||||
</div>
|
||||
</SheetContent>
|
||||
<Modal
|
||||
title={t('flow.add') + t('flow.gobalVariable')}
|
||||
title={t('flow.add') + t('flow.conversationVariable')}
|
||||
open={visible}
|
||||
onCancel={hideAddModal}
|
||||
showfooter={false}
|
||||
|
||||
@ -6,7 +6,7 @@ import { DefaultOptionType } from 'antd/es/select';
|
||||
import { t } from 'i18next';
|
||||
import { isEmpty, toLower } from 'lodash';
|
||||
import get from 'lodash/get';
|
||||
import { MessageCircleCode } from 'lucide-react';
|
||||
import { MessageSquareCode } from 'lucide-react';
|
||||
import { useCallback, useContext, useEffect, useMemo, useState } from 'react';
|
||||
import {
|
||||
AgentDialogueMode,
|
||||
@ -162,7 +162,7 @@ export function useBuildConversationVariableOptions() {
|
||||
return {
|
||||
label: keyWithPrefix,
|
||||
parentLabel: <span>{t('flow.conversationVariable')}</span>,
|
||||
icon: <MessageCircleCode className="size-3" />,
|
||||
icon: <MessageSquareCode className="size-3" />,
|
||||
value: keyWithPrefix,
|
||||
type: value.type,
|
||||
};
|
||||
|
||||
@ -28,6 +28,7 @@ import {
|
||||
History,
|
||||
LaptopMinimalCheck,
|
||||
Logs,
|
||||
MessageSquareCode,
|
||||
ScreenShare,
|
||||
Settings,
|
||||
Upload,
|
||||
@ -218,7 +219,7 @@ export default function Agent() {
|
||||
onClick={() => showGobalParamSheet()}
|
||||
loading={loading}
|
||||
>
|
||||
{t('flow.conversationVariable')}
|
||||
<MessageSquareCode /> {t('flow.conversationVariable')}
|
||||
</ButtonLoading>
|
||||
<Button variant={'secondary'} onClick={handleButtonRunClick}>
|
||||
<CirclePlay />
|
||||
|
||||
@ -124,7 +124,7 @@ export function EditMcpDialog({
|
||||
form={form}
|
||||
setFieldChanged={setFieldChanged}
|
||||
></EditMcpForm>
|
||||
<Card>
|
||||
<Card className="bg-transparent">
|
||||
<CardContent className="p-3">
|
||||
<Collapse
|
||||
title={
|
||||
|
||||
@ -59,7 +59,7 @@ export default function McpServer() {
|
||||
<ProfileSettingWrapperCard
|
||||
header={
|
||||
<>
|
||||
<div className="text-text-primary text-2xl font-medium">
|
||||
<div className="text-text-primary text-2xl font-semibold">
|
||||
{t('mcp.mcpServers')}
|
||||
</div>
|
||||
<section className="flex items-center justify-between">
|
||||
@ -80,13 +80,13 @@ export default function McpServer() {
|
||||
)}
|
||||
{t(`mcp.${isSelectionMode ? 'exitBulkManage' : 'bulkManage'}`)}
|
||||
</Button>
|
||||
<Button variant={'secondary'} onClick={showEditModal('')}>
|
||||
<Plus className="size-3.5" /> {t('mcp.addMCP')}
|
||||
</Button>
|
||||
<Button onClick={showImportModal}>
|
||||
<Button variant={'secondary'} onClick={showImportModal}>
|
||||
<Download className="size-3.5" />
|
||||
{t('mcp.import')}
|
||||
</Button>
|
||||
<Button onClick={showEditModal('')}>
|
||||
<Plus className="size-3.5" /> {t('mcp.addMCP')}
|
||||
</Button>
|
||||
</div>
|
||||
</section>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user