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.

714 B
Raw Blame
import { useParams } from 'react-router';

import AgentDocumentReader from '@/features/AgentDocumentReader';
import { getIdFromIdentifier } from '@/utils/identifier';

import { enableWorkbenchIdentity } from '../../src/shell/workbenchReplicaScope';

// A private route: the reader paints its last-read body from disk while the
// session check confirms who is signed in.
void enableWorkbenchIdentity();

export default function AgentDocReader() {
  const { aid = '', docId = '' } = useParams<{ aid: string; docId: string }>();
  const agentId = getIdFromIdentifier(aid, 'agt');
  const documentId = getIdFromIdentifier(docId, 'docs');

  return <AgentDocumentReader agentId={agentId} documentId={documentId} />;
}