Add a debug-only (`cfg(debug_assertions)`) action `DumpWorkspaceInfo` that opens a read-only buffer with a dump of all workspace state. This is useful for debugging the sidebar's view of workspaces and threads, since the sidebar is currently the only way to see workspace-related state. For each workspace in the MultiWorkspace it shows: - **Workspace DB ID** — for cross-referencing with persistence - **All worktrees** with their paths, branches, and visibility - **Whether each worktree is a git linked worktree** and where it links to - **Active agent thread** with title, session ID, status, and entry count - **Background agent threads** with the same detail - **A warning** if the agent panel's workspace ID doesn't match the workspace Example output: ``` MultiWorkspace: 3 workspace(s) Active workspace index: 1 --- Workspace 0 --- Workspace DB ID: WorkspaceId(42) Worktrees: - /Users/eric/repo/scratch3 [branch: refs/heads/scratch3] [linked worktree -> /Users/eric/repo/scratch] Active thread: Git Worktree Path Consistency Check (session: 575b4349-...) [idle, 42 entries] --- Workspace 1 (active) --- Workspace DB ID: WorkspaceId(57) Worktrees: - /Users/eric/repo/worktrees/zed/my-branch/zed [branch: refs/heads/my-branch] [linked worktree -> /Users/eric/repo/zed] Active thread: Sidebar Not Displaying Git Worktree (session: 8f337c5c-...) [generating, 17 entries, awaiting confirmation] Background threads (1): - Previous Investigation (session: abc12345-...) [idle, 83 entries] --- Workspace 2 --- Workspace DB ID: WorkspaceId(63) Worktrees: - /Users/eric/repo/ex [branch: refs/heads/main] Active thread: (none) ``` ### Implementation The action and handler live in the `sidebar` crate (close to what they debug), following the same pattern as `language_tools` owning `OpenLanguageServerLogs` and `debugger_tools` owning `OpenDebugAdapterLogs`. The `zed` crate has only a one-line registration. Two small public accessors were added to `AgentPanel`: - `workspace_id()` — exposes the panel's workspace ID for mismatch detection - `background_threads()` — exposes retained background conversation views Release Notes: - N/A
3 files changedLine totals unavailable