MemoryPanel
Let the user read and edit the instruction files the agent loads as memory. Files are grouped by scope in a fixed order: User, Project, Local and Agent (agent files show the agent name). The list is searchable by path, agent name and content. Selecting a file opens MemoryFileDetail with the rendered Markdown. From breakpoint (720px of panel width by default) the list and the file sit side by side, with a placeholder when nothing is selected; below it the file replaces the list and a back button returns. The panel fills its container, so give it a height. Edit appears only with onSave; a rejected save keeps the editor open with the message, and leaving a file with unsaved edits asks for confirmation. onOpenLocation and onCreate add Open location and New file actions. States: loading shows skeleton rows, error shows an alert with Retry (onRetry), an empty files list shows an empty state. selectedId can be controlled, for example to open the file named in a Saved to memory notice. Helpers: sortMemoryFiles, matchesMemoryQuery, getMemoryFileName, formatMemoryUpdatedAt.
$pnpm add @sinups/ai-kit @mantine/core @mantine/hooks @tabler/icons-react