mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Feat: Modify the agent list return field name #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -2,11 +2,13 @@ import { FileUploadProps } from '@/components/file-upload';
|
|||||||
import message from '@/components/ui/message';
|
import message from '@/components/ui/message';
|
||||||
import { AgentGlobals } from '@/constants/agent';
|
import { AgentGlobals } from '@/constants/agent';
|
||||||
import {
|
import {
|
||||||
|
DSL,
|
||||||
IAgentLogsRequest,
|
IAgentLogsRequest,
|
||||||
IAgentLogsResponse,
|
IAgentLogsResponse,
|
||||||
|
IFlow,
|
||||||
|
IFlowTemplate,
|
||||||
ITraceData,
|
ITraceData,
|
||||||
} from '@/interfaces/database/agent';
|
} from '@/interfaces/database/agent';
|
||||||
import { DSL, IFlow, IFlowTemplate } from '@/interfaces/database/flow';
|
|
||||||
import { IDebugSingleRequestBody } from '@/interfaces/request/agent';
|
import { IDebugSingleRequestBody } from '@/interfaces/request/agent';
|
||||||
import i18n from '@/locales/config';
|
import i18n from '@/locales/config';
|
||||||
import { BeginId } from '@/pages/agent/constant';
|
import { BeginId } from '@/pages/agent/constant';
|
||||||
@ -122,7 +124,7 @@ export const useFetchAgentListByPage = () => {
|
|||||||
const debouncedSearchString = useDebounce(searchString, { wait: 500 });
|
const debouncedSearchString = useDebounce(searchString, { wait: 500 });
|
||||||
|
|
||||||
const { data, isFetching: loading } = useQuery<{
|
const { data, isFetching: loading } = useQuery<{
|
||||||
kbs: IFlow[];
|
canvas: IFlow[];
|
||||||
total: number;
|
total: number;
|
||||||
}>({
|
}>({
|
||||||
queryKey: [
|
queryKey: [
|
||||||
@ -132,7 +134,7 @@ export const useFetchAgentListByPage = () => {
|
|||||||
...pagination,
|
...pagination,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
initialData: { kbs: [], total: 0 },
|
initialData: { canvas: [], total: 0 },
|
||||||
gcTime: 0,
|
gcTime: 0,
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const { data } = await agentService.listCanvasTeam(
|
const { data } = await agentService.listCanvasTeam(
|
||||||
@ -146,7 +148,7 @@ export const useFetchAgentListByPage = () => {
|
|||||||
true,
|
true,
|
||||||
);
|
);
|
||||||
|
|
||||||
return data?.data ?? [];
|
return data?.data;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -159,7 +161,7 @@ export const useFetchAgentListByPage = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
data: data.kbs,
|
data: data.canvas,
|
||||||
loading,
|
loading,
|
||||||
searchString,
|
searchString,
|
||||||
handleInputChange: onInputChange,
|
handleInputChange: onInputChange,
|
||||||
|
|||||||
@ -73,6 +73,7 @@ export declare interface IFlow {
|
|||||||
user_id: string;
|
user_id: string;
|
||||||
permission: string;
|
permission: string;
|
||||||
nickname: string;
|
nickname: string;
|
||||||
|
operator_permission: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IFlowTemplate {
|
export interface IFlowTemplate {
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { RAGFlowAvatar } from '@/components/ragflow-avatar';
|
|||||||
import { SharedBadge } from '@/components/shared-badge';
|
import { SharedBadge } from '@/components/shared-badge';
|
||||||
import { Card, CardContent } from '@/components/ui/card';
|
import { Card, CardContent } from '@/components/ui/card';
|
||||||
import { useNavigatePage } from '@/hooks/logic-hooks/navigate-hooks';
|
import { useNavigatePage } from '@/hooks/logic-hooks/navigate-hooks';
|
||||||
import { IFlow } from '@/interfaces/database/flow';
|
import { IFlow } from '@/interfaces/database/agent';
|
||||||
import { formatDate } from '@/utils/date';
|
import { formatDate } from '@/utils/date';
|
||||||
import { AgentDropdown } from './agent-dropdown';
|
import { AgentDropdown } from './agent-dropdown';
|
||||||
import { useRenameAgent } from './use-rename-agent';
|
import { useRenameAgent } from './use-rename-agent';
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import {
|
|||||||
DropdownMenuTrigger,
|
DropdownMenuTrigger,
|
||||||
} from '@/components/ui/dropdown-menu';
|
} from '@/components/ui/dropdown-menu';
|
||||||
import { useDeleteAgent } from '@/hooks/use-agent-request';
|
import { useDeleteAgent } from '@/hooks/use-agent-request';
|
||||||
import { IFlow } from '@/interfaces/database/flow';
|
import { IFlow } from '@/interfaces/database/agent';
|
||||||
import { PenLine, Trash2 } from 'lucide-react';
|
import { PenLine, Trash2 } from 'lucide-react';
|
||||||
import { MouseEventHandler, PropsWithChildren, useCallback } from 'react';
|
import { MouseEventHandler, PropsWithChildren, useCallback } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { useSetModalState } from '@/hooks/common-hooks';
|
import { useSetModalState } from '@/hooks/common-hooks';
|
||||||
import { useUpdateAgentSetting } from '@/hooks/use-agent-request';
|
import { useUpdateAgentSetting } from '@/hooks/use-agent-request';
|
||||||
import { IFlow } from '@/interfaces/database/flow';
|
import { IFlow } from '@/interfaces/database/agent';
|
||||||
import { pick } from 'lodash';
|
import { pick } from 'lodash';
|
||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useState } from 'react';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user