Skip to content

Add agent sessions layout actions for panel title#293069

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/add-hide-panel-action
Draft

Add agent sessions layout actions for panel title#293069
Copilot wants to merge 4 commits intomainfrom
copilot/add-hide-panel-action

Conversation

Copy link
Contributor

Copilot AI commented Feb 5, 2026

Adds layout actions for agent sessions to the panel title, including hide sidebar, maximize, and restore panel size actions. All actions are organized in a new dedicated file at src/vs/workbench/agentSessions/browser/agentSessionsLayoutActions.ts following VS Code's architectural patterns.

Changes

  • Created new file agentSessionsLayoutActions.ts at src/vs/workbench/agentSessions/browser/ to organize all agent sessions layout-related actions
  • Added three panel title actions:
    • Hide Agent Sessions Sidebar: Shows close button when sidebar is visible in side-by-side mode
    • Maximize Panel Size: Maximizes the panel when chat view is in the panel
    • Restore Panel Size: Restores panel to normal size when maximized
  • Registered actions in agentSessions.contribution.ts with updated import paths

Implementation

Hide Sidebar Action

  • Appears when chat view is in Panel location and agent sessions viewer is in SideBySide orientation
  • Uses close icon in navigation group at order 3

Maximize/Restore Panel Actions

  • Both actions check that chat view is in Panel location
  • Maximize shows when panel is not maximized (uses chevron-up icon)
  • Restore shows when panel is maximized (uses chevron-down icon)
  • Both use the workbench layout service to toggle panel maximization state

All actions follow the same pattern as existing panel actions in panelActions.ts with appropriate context key conditions to show only when relevant.

Testing

  • ✅ TypeScript compilation passes without errors
  • ✅ Actions properly registered in contribution file
  • ✅ Context keys ensure actions appear only in appropriate states
  • ✅ File location follows correct architectural structure at src/vs/workbench/agentSessions/browser/
Original prompt

add a layout action for the agent sessions workbench which will show a hide panel action in the panel title (MenuId.PanelTitle). this is similar to the hide action in the normal layoutactions.ts

The user has attached the following file paths as relevant context:

  • src\vs\workbench\agentSessions\browser\agentSessionsWorkbench.ts
  • src\vs\workbench\contrib\chat\browser\agentSessions\agentSessionsActions.ts
  • .github\copilot-instructions.md
  • AGENTS.md

Created from VS Code.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: benibenj <44439583+benibenj@users.noreply.github.com>
Copilot AI changed the title [WIP] Add layout action for hiding panel in agent sessions workbench Add hide agent sessions sidebar action to panel title Feb 5, 2026
Copilot AI requested a review from benibenj February 5, 2026 10:42
@benibenj
Copy link
Contributor

benibenj commented Feb 5, 2026

@copilot add it to the agent sessions layout actions file. also add a maximize panel size and restore panel size action

… maximize/restore panel actions

Co-authored-by: benibenj <44439583+benibenj@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 5, 2026

@copilot add it to the agent sessions layout actions file. also add a maximize panel size and restore panel size action

Done in commit 15e2f63. Created agentSessionsLayoutActions.ts with:

  • Hide agent sessions sidebar action (panel title)
  • Maximize panel size action
  • Restore panel size action

All actions are registered to MenuId.PanelTitle with appropriate context keys.

Copilot AI changed the title Add hide agent sessions sidebar action to panel title Add agent sessions layout actions for panel title Feb 5, 2026
@benibenj
Copy link
Contributor

benibenj commented Feb 5, 2026

@copilot wrong files. it should all be in this file: src\vs\workbench\agentSessions\browser\agentSessionsLayoutActions.ts

…bench/agentSessions/browser/

Co-authored-by: benibenj <44439583+benibenj@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 5, 2026

@copilot wrong files. it should all be in this file: src\vs\workbench\agentSessions\browser\agentSessionsLayoutActions.ts

Fixed in commit f50d453. Moved agentSessionsLayoutActions.ts to src/vs/workbench/agentSessions/browser/ as requested. All import paths have been updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants