"use client"; function shortenPath(p: string): string { return p .replace(/^\/Users\/[^/]+/, "~") .replace(/^\/home\/[^/]+/, "~") .replace(/^[A-Za-z]:[/\\]Users[/\\][^/\\]+/, "~"); } export function EmptyState({ workspaceExists, expectedPath, }: { workspaceExists: boolean; /** The resolved workspace path to display (e.g. from the tree API). */ expectedPath?: string | null; }) { return (
{/* Icon */}
{/* Text */}

{workspaceExists ? "Workspace is empty" : "No workspace found"}

{workspaceExists ? ( <> The workspace exists but has no knowledge tree yet. Ask the CRM agent to create objects and documents to populate it. ) : ( <> The workspace directory was not found. Run the ironclaw bootstrap flow or start a conversation and the agent will set it up automatically in the managed profile. )}

{/* Hint */}
Expected location:{" "} {expectedPath ? shortenPath(expectedPath) : "~/.openclaw/workspace"}
{/* Back link */} Back to Home
); }