Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

1.0 KB
Raw Blame
import { createStaticStyles, cssVar, Text } from '@lobehub/ui';
import { memo } from 'react';
import { useMatches } from 'react-router';

import { devDockPanelStyles } from '@/features/DevDock/panelStyles';
import { densityVars } from '@/styles/densityVars';

import { Controls } from './Controls';

const styles = createStaticStyles(({ css }) => ({
  notice: css`
    display: block;
    flex-shrink: 0;
    padding: ${densityVars.contentGap};
    border-block-end: 1px solid ${cssVar.colorBorderSecondary};
  `,
}));

const AgentMockPanel = memo(() => {
  const matches = useMatches();
  const isAgentTopicRoute = matches.some((m) => 'topicId' in m.params);

  return (
    <div className={devDockPanelStyles.root}>
      {!isAgentTopicRoute && (
        <Text className={styles.notice} fontSize={12} type={'secondary'}>
          Open an agent topic conversation to replay mock cases into it.
        </Text>
      )}
      <Controls />
    </div>
  );
});

AgentMockPanel.displayName = 'AgentMockPanel';

export default AgentMockPanel;