diff --git a/src/app/chat/Apps.tsx b/src/app/chat/Apps.tsx
index 85b7316f..4b6f064c 100644
--- a/src/app/chat/Apps.tsx
+++ b/src/app/chat/Apps.tsx
@@ -1,23 +1,17 @@
-import { AgentPanel, DancePanel, RolePanel } from '@/panels';
+import { DancePanel, MarketPanel } from '@/panels';
import { useConfigStore } from '@/store/config';
import { PanelKey } from '@/types/config';
export const apps = [
- {
- component: ,
- key: 'agent',
- label: '角色',
- },
{
component: ,
key: 'dance',
label: '跳舞',
},
-
{
- component: ,
- key: 'role',
- label: '编辑',
+ component: ,
+ key: 'market',
+ label: '发现',
},
];
diff --git a/src/app/chat/SideBar/Header/index.tsx b/src/app/chat/SideBar/Header/index.tsx
index 7bc5dc6a..be21c914 100644
--- a/src/app/chat/SideBar/Header/index.tsx
+++ b/src/app/chat/SideBar/Header/index.tsx
@@ -2,7 +2,7 @@ import { TabsNav } from '@lobehub/ui';
import React, { useState } from 'react';
import { Flexbox } from 'react-layout-kit';
-import Agent from '@/features/Actions/Agent';
+import Market from '@/features/Actions/Market';
import { useStyles } from './style';
@@ -18,7 +18,7 @@ const Index = () => {
return (
-
+
);
};
diff --git a/src/app/role/Apps.tsx b/src/app/role/Apps.tsx
deleted file mode 100644
index c5274756..00000000
--- a/src/app/role/Apps.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import { MarketPanel, RolePanel } from '@/panels';
-import { useConfigStore } from '@/store/config';
-import { PanelKey } from '@/types/config';
-
-export const apps = [
- {
- component: ,
- key: 'market',
- label: '发现',
- },
- {
- component: ,
- key: 'role',
- label: '编辑',
- },
-];
-
-export default () => {
- const [panel] = useConfigStore((s) => [s.panel]);
-
- return (
- <>
- {apps.map((app) => {
- const open = panel[app.key as PanelKey].open;
- const component = app.component;
- return (
-
- {component}
-
- );
- })}
- >
- );
-};
diff --git a/src/app/role/layout.tsx b/src/app/role/layout.tsx
index 2b5f97ee..5463a39c 100644
--- a/src/app/role/layout.tsx
+++ b/src/app/role/layout.tsx
@@ -2,7 +2,6 @@
import { ReactNode, memo } from 'react';
-import Apps from '@/app/role/Apps';
import AppLayout from '@/layout/AppLayout';
import { HeaderNavKey } from '@/layout/type';
@@ -13,11 +12,7 @@ export interface LayoutProps {
const LayoutDesktop = (props: LayoutProps) => {
const { children } = props;
- return (
-
- {children}
-
- );
+ return {children};
};
export default memo(LayoutDesktop);
diff --git a/src/app/role/page.tsx b/src/app/role/page.tsx
index 12dc8f4b..91470758 100644
--- a/src/app/role/page.tsx
+++ b/src/app/role/page.tsx
@@ -5,6 +5,7 @@ import { Flexbox } from 'react-layout-kit';
import TopBanner from '@/components/TopBanner';
import RoleDisplay from '@/features/AgentViewer/RoleDisplay/index';
+import RoleInfo from '@/features/RoleInfo';
import RoleEdit from '@/panels/RolePanel/RoleEdit';
import SideBar from './SideBar';
@@ -15,15 +16,18 @@ const Role = () => {
return (
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
);
};
diff --git a/src/app/role/style.ts b/src/app/role/style.ts
index 75c46739..1de2e0bc 100644
--- a/src/app/role/style.ts
+++ b/src/app/role/style.ts
@@ -2,8 +2,8 @@ import { createStyles } from 'antd-style';
export const useStyles = createStyles(({ css }) => ({
preview: css`
- width: 100%;
- margin: 64px;
+ width: 80rem;
+ margin: 32px auto;
`,
edit: css`
padding: 0 24px;
diff --git a/src/features/Actions/Agent.tsx b/src/features/Actions/Agent.tsx
index 0d2ee296..f218987c 100644
--- a/src/features/Actions/Agent.tsx
+++ b/src/features/Actions/Agent.tsx
@@ -2,17 +2,7 @@ import { ActionIcon } from '@lobehub/ui';
import { PlusCircle } from 'lucide-react';
import { DESKTOP_HEADER_ICON_SIZE } from '@/constants/common';
-import { useConfigStore } from '@/store/config';
export default () => {
- const openPanel = useConfigStore((s) => s.openPanel);
-
- return (
- openPanel('agent')}
- title={'新的会话'}
- size={DESKTOP_HEADER_ICON_SIZE}
- />
- );
+ return ;
};
diff --git a/src/features/AgentViewer/RoleDisplay/style.ts b/src/features/AgentViewer/RoleDisplay/style.ts
index d02680d0..f4d8eaaa 100644
--- a/src/features/AgentViewer/RoleDisplay/style.ts
+++ b/src/features/AgentViewer/RoleDisplay/style.ts
@@ -14,8 +14,10 @@ export const useStyles = createStyles(({ css, token }) => ({
`,
canvas: css`
display: block;
+
width: 100%;
max-width: 100%;
+ height: 720px;
max-height: 100%;
`,
}));
diff --git a/src/features/RoleInfo/index.tsx b/src/features/RoleInfo/index.tsx
index d74bc2d5..6a0ca074 100644
--- a/src/features/RoleInfo/index.tsx
+++ b/src/features/RoleInfo/index.tsx
@@ -1,7 +1,6 @@
'use client';
import { DraggablePanel } from '@lobehub/ui';
-import { Button } from 'antd';
import { createStyles } from 'antd-style';
import React, { memo, useState } from 'react';
@@ -11,8 +10,6 @@ import { SIDEBAR_MAX_WIDTH, SIDEBAR_WIDTH } from '@/constants/common';
import Chat from '@/features/Actions/Chat';
import UnSubscribeButton from '@/features/Actions/UnSubscribeButton';
import { agentListSelectors, useAgentStore } from '@/store/agent';
-import { useConfigStore } from '@/store/config';
-import { useSessionStore } from '@/store/session';
const useStyles = createStyles(({ css, token }) => ({
content: css`
@@ -33,9 +30,7 @@ const Header = () => {
s.activateAgent,
s.deactivateAgent,
]);
- const [openPanel] = useConfigStore((s) => [s.openPanel, s.closePanel]);
const currentAgent = useAgentStore((s) => agentListSelectors.currentAgentItem(s));
- const createSession = useSessionStore((s) => s.createSession);
return (
{
placement={'right'}
>
,
- ,
- ,
- ]}
+ actions={[, ]}
agent={currentAgent}
footer={}
/>
diff --git a/src/features/RoleList/index.tsx b/src/features/RoleList/index.tsx
index 3f438ffe..e1fd1e7b 100644
--- a/src/features/RoleList/index.tsx
+++ b/src/features/RoleList/index.tsx
@@ -6,7 +6,7 @@ import React, { useState } from 'react';
import { Flexbox } from 'react-layout-kit';
import { HEADER_HEIGHT } from '@/constants/common';
-import Market from '@/features/Actions/Market';
+import Agent from '@/features/Actions/Agent';
import Elsa from '@/features/RoleList/List/Elsa';
import List from './List';
@@ -67,7 +67,7 @@ const SideBar = () => {
type={'block'}
value={searchName}
/>
-
+
diff --git a/src/features/SessionList/index.tsx b/src/features/SessionList/index.tsx
index 0fe084ed..c95b4426 100644
--- a/src/features/SessionList/index.tsx
+++ b/src/features/SessionList/index.tsx
@@ -4,7 +4,7 @@ import React, { useState } from 'react';
import { Flexbox } from 'react-layout-kit';
import { HEADER_HEIGHT } from '@/constants/common';
-import Agent from '@/features/Actions/Agent';
+import Market from '@/features/Actions/Market';
import V from './Elsa';
import List from './List';
@@ -65,7 +65,7 @@ const SideBar = () => {
type={'block'}
value={searchName}
/>
-
+
diff --git a/src/panels/AgentPanel/Agent/index.tsx b/src/panels/AgentPanel/Agent/index.tsx
index 24ef4b60..8c013dd6 100644
--- a/src/panels/AgentPanel/Agent/index.tsx
+++ b/src/panels/AgentPanel/Agent/index.tsx
@@ -3,7 +3,6 @@ import classNames from 'classnames';
import React, { memo } from 'react';
import TopBanner from '@/components/TopBanner';
-import RoleInfo from '@/features/RoleInfo';
import AgentList from './List';
@@ -40,7 +39,6 @@ const Agent = (props: AgentProps) => {
-
);
};