Merge branch 'refs/heads/develop' into fix/memory_bug_fix
This commit is contained in:
@@ -74,7 +74,7 @@ def get_multi_agent_configs(
|
||||
"app_id": str(app_id),
|
||||
"default_model_config_id": None,
|
||||
"model_parameters": None,
|
||||
"orchestration_mode": "conditional",
|
||||
"orchestration_mode": "supervisor",
|
||||
"sub_agents": [],
|
||||
"routing_rules": [],
|
||||
"execution_config": {
|
||||
|
||||
@@ -107,7 +107,7 @@ def multi_agent_config_4_app_release(release: AppRelease) -> MultiAgentConfig:
|
||||
model_parameters=config_dict.get("model_parameters"),
|
||||
master_agent_id=config_dict.get("master_agent_id"),
|
||||
master_agent_name=config_dict.get("master_agent_name"),
|
||||
orchestration_mode=config_dict.get("orchestration_mode", "conditional"),
|
||||
orchestration_mode=config_dict.get("orchestration_mode", "supervisor"),
|
||||
sub_agents=config_dict.get("sub_agents", []),
|
||||
routing_rules=config_dict.get("routing_rules"),
|
||||
execution_config=config_dict.get("execution_config", {}),
|
||||
@@ -152,7 +152,7 @@ def dict_to_multi_agent_config(config_dict: Dict[str, Any], app_id: Optional[uui
|
||||
... "app_id": "uuid-here",
|
||||
... "master_agent_id": "master-uuid",
|
||||
... "master_agent_name": "Master Agent",
|
||||
... "orchestration_mode": "conditional",
|
||||
... "orchestration_mode": "supervisor",
|
||||
... "sub_agents": [
|
||||
... {"agent_id": "sub1-uuid", "name": "Sub Agent 1", "role": "specialist", "priority": 1},
|
||||
... {"agent_id": "sub2-uuid", "name": "Sub Agent 2", "role": "specialist", "priority": 2}
|
||||
@@ -189,7 +189,7 @@ def dict_to_multi_agent_config(config_dict: Dict[str, Any], app_id: Optional[uui
|
||||
app_id=final_app_id,
|
||||
master_agent_id=master_agent_id,
|
||||
master_agent_name=config_dict.get("master_agent_name"),
|
||||
orchestration_mode=config_dict.get("orchestration_mode", "conditional"),
|
||||
orchestration_mode=config_dict.get("orchestration_mode", "supervisor"),
|
||||
sub_agents=config_dict.get("sub_agents", []),
|
||||
routing_rules=config_dict.get("routing_rules"),
|
||||
execution_config=config_dict.get("execution_config", {}),
|
||||
|
||||
BIN
web/src/assets/images/empty/chatEmpty.png
Normal file
BIN
web/src/assets/images/empty/chatEmpty.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 185 KiB |
@@ -71,6 +71,7 @@ export const en = {
|
||||
stepTwoDescription: 'Here you can create and manage spaces to organize models and data for different use cases.Once your spaces are ready, head to User Management to invite members and manage access.👉 Click User Management in the left menu to continue.',
|
||||
stepThree: 'This is User Management',
|
||||
stepThreeDescription: 'Here you can create users, assign roles, and manage access for your team.Once users are set up, the basic configuration is complete and you’re ready to start using the platform 🎉',
|
||||
finishButtonText: 'Get Started',
|
||||
},
|
||||
menu: {
|
||||
home: 'Home',
|
||||
@@ -184,15 +185,15 @@ export const en = {
|
||||
createNewMemorySummary: 'Create New Memory Entry',
|
||||
|
||||
createNewApplication: 'Create New Application',
|
||||
createNewApplicationDesc: 'Create New Space Application',
|
||||
createNewApplicationDesc: 'Build an app in just 3 minutes with zero-code drag-and-drop.',
|
||||
|
||||
createNewKnowledge: 'Create New Knowledge',
|
||||
createNewKnowledgeDesc: 'Create a new memory entry',
|
||||
createNewKnowledgeDesc: 'Transform your data into a fully searchable, dedicated knowledge base in seconds.',
|
||||
|
||||
memoryConversation: 'Memory Conversation',
|
||||
memoryConversationDesc: 'Memory Conversation',
|
||||
memoryConversationDesc: 'The more you use it, the better AI understands you.',
|
||||
helpCenter: 'Help Center',
|
||||
helpCenterDesc: 'Help Center',
|
||||
helpCenterDesc: 'One-stop support to answer your questions and get you started fast.',
|
||||
memorySummary: 'View Memory Summary',
|
||||
memorySummaryDesc: 'View Memory Summary Report',
|
||||
|
||||
@@ -415,6 +416,8 @@ export const en = {
|
||||
reset: 'Reset',
|
||||
refresh: 'Refresh',
|
||||
return: 'Return',
|
||||
statusEnabled: 'Available',
|
||||
statusDisabled: 'Unavailable'
|
||||
},
|
||||
model: {
|
||||
searchPlaceholder: 'search model…',
|
||||
@@ -1224,7 +1227,7 @@ export const en = {
|
||||
IMPLICIT_MEMORY: 'Implicit Memory',
|
||||
EMOTIONAL_MEMORY: 'Emotional Memory',
|
||||
EPISODIC_MEMORY: 'Episodic Memory',
|
||||
FORGETTING_MANAGEMENT: 'Forgetting Management',
|
||||
FORGET_MEMORY: 'Forget Memory',
|
||||
|
||||
endUserProfile: 'Core Profile',
|
||||
editEndUserProfile: 'Edit',
|
||||
@@ -1449,6 +1452,7 @@ Memory Bear: After the rebellion, regional warlordism intensified for several re
|
||||
deduplication_desc: 'Deduplication and disambiguation completed, {{count}} unique entities in total'
|
||||
},
|
||||
memoryConversation: {
|
||||
chatEmpty:'Is there anything I can help you with?',
|
||||
searchPlaceholder: 'Input user ID...',
|
||||
userID: 'User ID',
|
||||
testMemoryConversation: 'Test Memory Conversation',
|
||||
@@ -1580,6 +1584,7 @@ Memory Bear: After the rebellion, regional warlordism intensified for several re
|
||||
configured_disabled_desc: 'API is configured but not enabled',
|
||||
error_desc: 'API is configured but connection error',
|
||||
|
||||
testConnectionSuccess: 'Test Connection Successful',
|
||||
serviceEndpoint: 'Service Endpoint URL',
|
||||
serviceEndpointPlaceholder: 'URL of the service endpoint',
|
||||
serviceEndpointExtra: 'Complete access address of the MCP service',
|
||||
@@ -1729,6 +1734,7 @@ Memory Bear: After the rebellion, regional warlordism intensified for several re
|
||||
method: 'Method',
|
||||
path: 'Path',
|
||||
viewDetail: 'View Details',
|
||||
textLink: 'Test Connection',
|
||||
noResult: 'Processing results will be displayed here'
|
||||
},
|
||||
workflow: {
|
||||
|
||||
@@ -71,6 +71,7 @@ export const zh = {
|
||||
stepTwoDescription: '你可以在这里创建和管理不同的空间,把模型和数据组织到具体的使用场景中。空间创建完成后,可以去 User Management 邀请成员、分配权限,一起协作使用。👉 点击左侧 User Management 继续。',
|
||||
stepThree: '这里是用户管理页',
|
||||
stepThreeDescription: '你可以在这里创建用户、分配角色,并管理团队成员的访问权限。完成用户设置后,基础配置就准备好了,可以开始实际使用平台的各项功能了 🎉',
|
||||
finishButtonText: '开始使用',
|
||||
},
|
||||
menu: {
|
||||
home: '首页',
|
||||
@@ -782,15 +783,15 @@ export const zh = {
|
||||
createNewMemorySummary: '创建新记忆条目',
|
||||
|
||||
createNewApplication: '创建新应用',
|
||||
createNewApplicationDesc: '创建新空间应用',
|
||||
createNewApplicationDesc: '零代码拖拽3分钟创应用',
|
||||
|
||||
createNewKnowledge: '创建新知识',
|
||||
createNewKnowledgeDesc: '创建新记忆条目',
|
||||
createNewKnowledge: '创建知识库',
|
||||
createNewKnowledgeDesc: '秒变可搜索的专属知识库',
|
||||
|
||||
memoryConversation: '记忆对话',
|
||||
memoryConversationDesc: '记忆对话',
|
||||
memoryConversationDesc: '让AI越用越懂你',
|
||||
helpCenter: '帮助中心',
|
||||
helpCenterDesc: '帮助中心',
|
||||
helpCenterDesc: '一站式解决疑问快速上手',
|
||||
memorySummary: '查看记忆摘要',
|
||||
memorySummaryDesc: '查看记忆摘要报告',
|
||||
|
||||
@@ -963,6 +964,8 @@ export const zh = {
|
||||
reset: '重置',
|
||||
refresh: '刷新',
|
||||
return: '返回',
|
||||
statusEnabled: '可用',
|
||||
statusDisabled: '不可用'
|
||||
},
|
||||
product: {
|
||||
applicationManagement: '应用管理',
|
||||
@@ -1300,8 +1303,8 @@ export const zh = {
|
||||
IMPLICIT_MEMORY: '隐性记忆',
|
||||
EMOTIONAL_MEMORY: '情绪记忆',
|
||||
EPISODIC_MEMORY: '情景记忆',
|
||||
FORGETTING_MANAGEMENT: '遗忘',
|
||||
|
||||
FORGET_MEMORY: '遗忘记忆',
|
||||
|
||||
endUserProfile: '核心档案',
|
||||
editEndUserProfile: '编辑',
|
||||
other_name: '姓名',
|
||||
@@ -1523,6 +1526,7 @@ export const zh = {
|
||||
deduplication_desc: '去重消歧完成,最终{{count}}个唯一实体'
|
||||
},
|
||||
memoryConversation: {
|
||||
chatEmpty:'有什么我可以帮您的吗?',
|
||||
searchPlaceholder: '输入用户ID...',
|
||||
userID: '用户ID',
|
||||
testMemoryConversation: '测试记忆对话',
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
/*
|
||||
* @Description:
|
||||
* @Version: 0.0.1
|
||||
* @Author: yujiangping
|
||||
* @Date: 2026-01-05 17:22:23
|
||||
* @LastEditors: yujiangping
|
||||
* @LastEditTime: 2026-01-15 21:02:43
|
||||
*/
|
||||
import { create } from 'zustand'
|
||||
import enUS from 'antd/locale/en_US';
|
||||
import zhCN from 'antd/locale/zh_CN';
|
||||
@@ -12,6 +20,28 @@ import { timezoneToAntdLocaleMap } from '@/utils/timezones';
|
||||
dayjs.extend(utc);
|
||||
dayjs.extend(timezone);
|
||||
|
||||
// 自定义中文 locale,修改 Tour 组件的按钮文字
|
||||
const customZhCN: Locale = {
|
||||
...zhCN,
|
||||
Tour: {
|
||||
...zhCN.Tour,
|
||||
Next: '下一步',
|
||||
Previous: '上一步',
|
||||
Finish: '立即体验',
|
||||
},
|
||||
};
|
||||
|
||||
// 自定义英文 locale,修改 Tour 组件的按钮文字
|
||||
const customEnUS: Locale = {
|
||||
...enUS,
|
||||
Tour: {
|
||||
...enUS.Tour,
|
||||
Next: 'Next',
|
||||
Previous: 'Previous',
|
||||
Finish: 'Try it now',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
interface I18nState {
|
||||
language: string;
|
||||
@@ -23,7 +53,7 @@ interface I18nState {
|
||||
|
||||
const initialTimeZone = localStorage.getItem('timeZone') || 'Asia/Shanghai'
|
||||
const initialLanguage = localStorage.getItem('language') || 'en'
|
||||
const initialLocale = initialLanguage === 'en' ? enUS : zhCN
|
||||
const initialLocale = initialLanguage === 'en' ? customEnUS : customZhCN
|
||||
i18n.changeLanguage(initialLanguage)
|
||||
|
||||
export const useI18n = create<I18nState>((set, get) => ({
|
||||
@@ -32,7 +62,7 @@ export const useI18n = create<I18nState>((set, get) => ({
|
||||
timeZone: initialTimeZone,
|
||||
changeLanguage: (language: string) => {
|
||||
i18n.changeLanguage(language)
|
||||
const localeName = timezoneToAntdLocaleMap[language] || enUS;
|
||||
const localeName = language === 'en' ? customEnUS : customZhCN;
|
||||
set({ language: language, locale: localeName })
|
||||
},
|
||||
changeTimeZone: (timeZone: string) => {
|
||||
|
||||
@@ -45,7 +45,7 @@ export const useUser = create<UserState>((set, get) => ({
|
||||
const response = res as User;
|
||||
set({ user: response })
|
||||
if (flag) {
|
||||
window.location.href = response.role && response.current_workspace_id ? '/#/' : '/#/space'
|
||||
window.location.href = response.role && response.current_workspace_id ? '/#/' : '/#/index'
|
||||
}
|
||||
localStorage.setItem('user', JSON.stringify(response))
|
||||
})
|
||||
|
||||
@@ -201,7 +201,11 @@ const Agent = forwardRef<AgentRef>((_props, ref) => {
|
||||
...item,
|
||||
...filterItem
|
||||
}
|
||||
})
|
||||
})
|
||||
setKnowledgeConfig(prev => ({
|
||||
...prev,
|
||||
knowledge_bases: [...knowledge_bases]
|
||||
}))
|
||||
setData((prev) => {
|
||||
prev = prev as Config
|
||||
const knowledge_retrieval: KnowledgeConfig = {
|
||||
|
||||
@@ -16,7 +16,7 @@ import { maskApiKeys } from '@/utils/apiKeyReplacer'
|
||||
|
||||
const Api: FC<{ application: Application | null }> = ({ application }) => {
|
||||
const { t } = useTranslation();
|
||||
const activeMethods = ['GET'];
|
||||
const activeMethods = ['POST'];
|
||||
const { message, modal } = App.useApp()
|
||||
const copyContent = window.location.origin + '/v1/chat'
|
||||
const apiKeyModalRef = useRef<ApiKeyModalRef>(null);
|
||||
|
||||
@@ -11,6 +11,7 @@ import Empty from '@/components/Empty'
|
||||
import { formatDateTime } from '@/utils/format';
|
||||
import { randomString } from '@/utils/common'
|
||||
import BgImg from '@/assets/images/conversation/bg.png'
|
||||
import ChatEmpty from '@/assets/images/empty/chatEmpty.png'
|
||||
import Chat from '@/components/Chat'
|
||||
import type { ChatItem } from '@/components/Chat/types'
|
||||
import ButtonCheckbox from '@/components/ButtonCheckbox'
|
||||
@@ -261,7 +262,7 @@ const Conversation: FC = () => {
|
||||
<div className="rb:relative rb:h-screen rb:px-4 rb:flex-[1_1_auto]">
|
||||
<div className='rb:w-[760px] rb:h-screen rb:mx-auto rb:pt-10'>
|
||||
<Chat
|
||||
empty={<Empty url={BgImg} className="rb:h-full" size={[320,180]} subTitle={t('memoryConversation.emptyDesc')} />}
|
||||
empty={<Empty url={ChatEmpty} className="rb:h-full" size={[320,180]} title={t('memoryConversation.chatEmpty')} subTitle={t('memoryConversation.emptyDesc')} />}
|
||||
contentClassName="rb:h-[calc(100%-152px)] "
|
||||
data={chatList}
|
||||
streamLoading={streamLoading}
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
/*
|
||||
* @Description:
|
||||
* @Version: 0.0.1
|
||||
* @Author: yujiangping
|
||||
* @Date: 2026-01-13 11:44:06
|
||||
* @LastEditors: yujiangping
|
||||
* @LastEditTime: 2026-01-15 20:59:57
|
||||
*/
|
||||
import React, { useState, useRef } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
@@ -47,7 +47,7 @@ const QuickActions: FC<QuickActionsProps> = ({ onNavigate }) => {
|
||||
key: 'space-management',
|
||||
icon: spaceIcon,
|
||||
title: t('quickActions.spaceManagement'),
|
||||
onClick: () => onNavigate?.('/spce')
|
||||
onClick: () => onNavigate?.('/space')
|
||||
},
|
||||
// {
|
||||
// key: 'workflow-orchestration',
|
||||
|
||||
@@ -292,7 +292,7 @@ const KnowledgeGraph: FC<KnowledgeGraphProps> = ({ data, loading = false }) => {
|
||||
if (params.dataType === 'node') {
|
||||
const node = params.data as KnowledgeNode
|
||||
return `
|
||||
<div>
|
||||
<div class="rb:max-w-[560px]">
|
||||
<div><strong>${node.entity_name}</strong></div>
|
||||
<div>类型: ${node.entity_type}</div>
|
||||
<div>重要度: ${(node.pagerank * 100).toFixed(2)}%</div>
|
||||
@@ -301,10 +301,10 @@ const KnowledgeGraph: FC<KnowledgeGraphProps> = ({ data, loading = false }) => {
|
||||
} else if (params.dataType === 'edge') {
|
||||
const edge = params.data as KnowledgeEdge
|
||||
return `
|
||||
<div>
|
||||
<div class="rb:max-w-[560px]">
|
||||
<div><strong>关系</strong></div>
|
||||
<div>权重: ${edge.weight}</div>
|
||||
<div>${edge.description}</div>
|
||||
<div class="rb:break-words rb:whitespace-pre-wrap">${edge.description}</div>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import commerce from '@/assets/images/order/commerce.png'
|
||||
import checkIcon from '@/assets/images/login/checkBg.png'
|
||||
import alertIcon from '@/assets/images/order/alert.svg';
|
||||
import { useUser } from '@/store/user'
|
||||
import { useI18n } from '@/store/locale'
|
||||
|
||||
interface PriceItem {
|
||||
type: string;
|
||||
@@ -116,6 +117,7 @@ const PricingView: React.FC = () => {
|
||||
const { t } = useTranslation();
|
||||
const navigate = useNavigate();
|
||||
const { user } = useUser();
|
||||
const { language } = useI18n()
|
||||
|
||||
const handleChoosePlan = (type: string) => {
|
||||
switch(type) {
|
||||
@@ -127,6 +129,7 @@ const PricingView: React.FC = () => {
|
||||
navigate(user.current_workspace_id ? '/' : '/space');
|
||||
break
|
||||
case 'commerce':
|
||||
window.open(`https://docs.redbearai.com/s/${language || 'en'}-memorybear`, '_blank')
|
||||
break
|
||||
}
|
||||
};
|
||||
|
||||
@@ -256,7 +256,7 @@ const SelfReflectionEngine: React.FC = () => {
|
||||
{t('reflectionEngine.exampleText')}
|
||||
</div>
|
||||
|
||||
<Button type="primary" block loading={runLoading} onClick={handleRun}>{t('reflectionEngine.run')}</Button>
|
||||
<Button type="primary" block loading={runLoading} disabled={!values?.reflection_enabled} onClick={handleRun}>{t('reflectionEngine.run')}</Button>
|
||||
</RbCard>
|
||||
{result && <>
|
||||
<RbCard
|
||||
|
||||
@@ -32,7 +32,7 @@ const typeList = [
|
||||
{ key: 'EXPLICIT_MEMORY' }
|
||||
]
|
||||
},
|
||||
{ key: 'FORGETTING_MANAGEMENT', bg: 5 },
|
||||
{ key: 'FORGET_MEMORY', bg: 5 },
|
||||
]
|
||||
|
||||
const NodeStatistics: FC = () => {
|
||||
|
||||
@@ -38,7 +38,7 @@ const Detail: FC = () => {
|
||||
})
|
||||
}
|
||||
const items = useMemo(() => {
|
||||
return ['PERCEPTUAL_MEMORY', 'WORKING_MEMORY', 'EMOTIONAL_MEMORY', 'SHORT_TERM_MEMORY', 'IMPLICIT_MEMORY', 'EPISODIC_MEMORY', 'EXPLICIT_MEMORY', 'FORGETTING_MANAGEMENT']
|
||||
return ['PERCEPTUAL_MEMORY', 'WORKING_MEMORY', 'EMOTIONAL_MEMORY', 'SHORT_TERM_MEMORY', 'IMPLICIT_MEMORY', 'EPISODIC_MEMORY', 'EXPLICIT_MEMORY', 'FORGET_MEMORY']
|
||||
.map(key => ({ key, label: t(`userMemory.${key}`) }))
|
||||
}, [t])
|
||||
const onClick = ({ key }: { key: string }) => {
|
||||
@@ -67,7 +67,7 @@ const Detail: FC = () => {
|
||||
</div>
|
||||
</Dropdown>
|
||||
}
|
||||
extra={type === 'FORGETTING_MANAGEMENT' &&
|
||||
extra={type === 'FORGET_MEMORY' &&
|
||||
<Button type="primary" ghost className="rb:group rb:h-6! rb:px-2!" onClick={handleRefresh}>
|
||||
<img src={refreshIcon} className="rb:w-4 rb:h-4" />
|
||||
{t('common.refresh')}
|
||||
@@ -75,7 +75,7 @@ const Detail: FC = () => {
|
||||
/>
|
||||
<div className="rb:h-[calc(100vh-64px)] rb:overflow-y-auto rb:py-3 rb:px-4">
|
||||
{type === 'EMOTIONAL_MEMORY' && <StatementDetail />}
|
||||
{type === 'FORGETTING_MANAGEMENT' && <ForgetDetail ref={forgetDetailRef} />}
|
||||
{type === 'FORGET_MEMORY' && <ForgetDetail ref={forgetDetailRef} />}
|
||||
{type === 'IMPLICIT_MEMORY' && <ImplicitDetail />}
|
||||
{type === 'SHORT_TERM_MEMORY' && <ShortTermDetail />}
|
||||
{type === 'PERCEPTUAL_MEMORY' && <PerceptualDetail />}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import type { FC } from 'react';
|
||||
import { Select, Button } from 'antd';
|
||||
import { Node } from '@antv/x6';
|
||||
import { Select } from 'antd';
|
||||
// import { Node } from '@antv/x6';
|
||||
import type { GraphRef } from '../types'
|
||||
import { PlusOutlined, MinusOutlined } from '@ant-design/icons'
|
||||
|
||||
interface CanvasToolbarProps {
|
||||
miniMapRef: React.RefObject<HTMLDivElement>;
|
||||
@@ -18,15 +19,16 @@ interface CanvasToolbarProps {
|
||||
const CanvasToolbar: FC<CanvasToolbarProps> = ({
|
||||
miniMapRef,
|
||||
graphRef,
|
||||
isHandMode,
|
||||
setIsHandMode,
|
||||
// isHandMode,
|
||||
// setIsHandMode,
|
||||
zoomLevel,
|
||||
canUndo,
|
||||
canRedo,
|
||||
onUndo,
|
||||
onRedo,
|
||||
// canUndo,
|
||||
// canRedo,
|
||||
// onUndo,
|
||||
// onRedo,
|
||||
}) => {
|
||||
// 整理布局函数
|
||||
/*
|
||||
const handleLayout = () => {
|
||||
if (!graphRef.current) return;
|
||||
const nodes = graphRef.current.getNodes();
|
||||
@@ -144,28 +146,14 @@ const CanvasToolbar: FC<CanvasToolbarProps> = ({
|
||||
currentY += 300; // 不同树之间的间距
|
||||
});
|
||||
};
|
||||
|
||||
*/
|
||||
return (
|
||||
<>
|
||||
{/* 小地图 */}
|
||||
<div ref={miniMapRef} className="rb:absolute rb:bottom-17 rb:left-5 rb:z-1000"></div>
|
||||
<div ref={miniMapRef} className="rb:absolute rb:bottom-15 rb:right-8 rb:z-1000 rb:rounded-lg rb:overflow-hidden"></div>
|
||||
{/* 缩放控制按钮 */}
|
||||
<div className="rb:absolute rb:bottom-5 rb:left-5 rb:flex rb:flex-row rb:gap-2 rb:z-1000">
|
||||
<Button
|
||||
type={isHandMode ? 'primary' : 'default'}
|
||||
onClick={() => {
|
||||
const newHandMode = !isHandMode;
|
||||
setIsHandMode(newHandMode);
|
||||
if (newHandMode) {
|
||||
graphRef.current?.enablePanning();
|
||||
} else {
|
||||
graphRef.current?.disablePanning();
|
||||
}
|
||||
}}
|
||||
>
|
||||
{isHandMode ? '✋' : '👆'}
|
||||
</Button>
|
||||
<Button onClick={() => graphRef.current?.zoom(0.1)}>+</Button>
|
||||
<div className="rb:h-8.5 rb:bg-[#FFFFFF] rb:border rb:border-[#DFE4ED] rb:rounded-lg rb:shadow-[0px_2px_6px_0px_rgba(33,35,50,0.15)] rb:px-3 rb:py-2 rb:absolute rb:bottom-5 rb:right-8 rb:flex rb:flex-row rb:gap-4 rb:z-1000">
|
||||
<MinusOutlined className="rb:text-[16px] rb:cursor-pointer" onClick={() => graphRef.current?.zoom(-0.1)} />
|
||||
<Select
|
||||
value={Math.round(zoomLevel * 100)}
|
||||
onChange={(value: number | string) => {
|
||||
@@ -179,7 +167,7 @@ const CanvasToolbar: FC<CanvasToolbarProps> = ({
|
||||
console.log('props', props)
|
||||
return `${props.value}%`
|
||||
}}
|
||||
className="rb:w-20"
|
||||
className="rb:w-20 rb:h-4!"
|
||||
options={[
|
||||
{ label: '25%', value: 25 },
|
||||
{ label: '50%', value: 50 },
|
||||
@@ -190,11 +178,10 @@ const CanvasToolbar: FC<CanvasToolbarProps> = ({
|
||||
{ label: '200%', value: 200 },
|
||||
{ label: '自适应', value: 'fit' },
|
||||
]}
|
||||
variant='borderless'
|
||||
size="small"
|
||||
/>
|
||||
<Button onClick={() => graphRef.current?.zoom(-0.1)}>-</Button>
|
||||
<Button disabled={!canUndo} onClick={onUndo}>撤销</Button>
|
||||
<Button disabled={!canRedo} onClick={onRedo}>重做</Button>
|
||||
<Button onClick={handleLayout}>整理</Button>
|
||||
<PlusOutlined className="rb:text-[16px] rb:cursor-pointer" onClick={() => graphRef.current?.zoom(0.1)} />
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -234,9 +234,9 @@ const PortClickHandler: React.FC<PortClickHandlerProps> = ({ graph }) => {
|
||||
filteredNodes = category.nodes.filter(nodeType => !['start', 'end', 'loop', 'cycle-start', 'iteration'].includes(nodeType.type));
|
||||
} else {
|
||||
// Original filtering for non-loop child nodes
|
||||
filteredNodes = category.nodes.filter(nodeType => !['start', 'end', 'break', 'cycle-start'].includes(nodeType.type));
|
||||
filteredNodes = category.nodes.filter(nodeType => !['start', 'break', 'cycle-start'].includes(nodeType.type));
|
||||
filteredNodes = category.nodes.filter(nodeType =>
|
||||
nodeType.type !== 'start' && nodeType.type !== 'end' && nodeType.type !== 'cycle-start' && nodeType.type !== 'break'
|
||||
nodeType.type !== 'start' && nodeType.type !== 'cycle-start' && nodeType.type !== 'break'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -422,7 +422,7 @@ export const useWorkflowGraph = ({
|
||||
graphRef.current.use(
|
||||
new MiniMap({
|
||||
container: miniMapRef.current,
|
||||
width: 100,
|
||||
width: 170,
|
||||
height: 80,
|
||||
padding: 5,
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user