"use client"; import { useState } from "react"; import { CreateWorkspaceDialog } from "./create-workspace-dialog"; export function EmptyState({ workspaceExists, expectedPath, onWorkspaceCreated, }: { workspaceExists: boolean; /** The resolved workspace path to display (e.g. from the tree API). */ expectedPath?: string | null; /** Called after a workspace is created from this empty state. */ onWorkspaceCreated?: () => void; }) { const [showCreate, setShowCreate] = useState(false); 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. Create one to get started, or start a conversation and the agent will set it up automatically. > )}
{expectedPath
? expectedPath.replace(/^\/Users\/[^/]+/, "~")
: "~/.openclaw/workspace"}