"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 (
{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. > )}
{expectedPath
? shortenPath(expectedPath)
: "~/.openclaw/workspace"}