Use the Chat view

Use the Chat view

The Chat view is a code-first interface for asking questions and working with agents in the main Visual Studio Code window. Use it when your task centers on the current project and you want the editor, debugger, tests, extensions, and notebooks available alongside the conversation.

In this article, you learn how to open the Chat view, choose a layout, understand its interface, and start a workspace-scoped session. To compare it with other interfaces, see Ways to work with agents. For conversation mechanics shared with the Agents window, see Use chat in VS Code.

Prerequisites

Open the Chat view

The Chat view opens in the Secondary Side Bar, next to your editor. To open the Chat view, use one of the following methods:

  • Select the Chat menu in the VS Code title bar, and then select Open Chat.

  • Use the keyboard shortcut ⌃⌘I (Windows, Linux Ctrl+Alt+I).

  • Run code chat from the command line to start chat from outside VS Code. Learn more about starting chat from the command line.

Layout options

The Chat view offers several layout options within the main VS Code window. Choose the layout that best fits your workflow:

  • Side bar (default): select New Chat (+) > New Chat, or run the Chat: New Chat command. Best for keeping chat visible alongside your code.

  • Editor tab: select New Chat (+) > New Chat Editor, or run the Chat: New Chat Editor command. Best for giving chat more space or comparing sessions side by side.

  • Separate window: select New Chat (+) > New Chat Window, or run the Chat: New Chat Window command. Best for multi-monitor setups.

Interface overview

The Chat view keeps the agent next to your code, so you can prompt, review, and edit in the same window. The Chat view has the following main areas:

  1. Sessions list: at the top of the view, where you can view and manage your sessions for the current workspace. Learn more about the sessions list.

  2. Chat conversation: in the center, where you see the conversation history and the agent's responses, including the changes it makes to your code.

  3. Chat input: at the bottom, where you type prompts and configure the session with the agent target, agent, language model, and permission pickers.

Screenshot showing the Chat view with the sessions list, conversation, and chat input.

The Chat view operates in two modes: compact and side-by-side. Use the toggle control in the top-right corner of the Chat view to switch between them. In compact mode, the sessions list and conversation share the same panel. In side-by-side mode, the sessions list stays visible next to the conversation. Learn more about sessions list layout options.

Start a session

To start a workspace-scoped session, select New Chat (+) or press ⌘N (Windows, Linux Ctrl+N). Before you send the first prompt, use the chat input controls to choose an agent target, agent, language model, and permission level. Learn more about configuring an agent session.

Type a prompt and press Enter. For shared request, context, and conversation controls, see Use chat in VS Code. For session context, history, and organization, see Manage agent sessions.

Work with the agent

Because the Chat view runs in the main VS Code window, you can inspect agent edits in the editor, follow terminal activity, debug the application, and run tasks or tests without switching surfaces. The agent also has access to supported extensions and can work with Jupyter notebooks. When you connect to a remote workspace, the session uses the same remote project context and tools.

Select a changed file in the response to inspect its diff, or set chat.checkpoints.showFileChanges Open in VS Code Open in VS Code Insiders to show a changed-files summary after each request. For revisions, checkpoints, and integrating changes, see Review AI-generated code edits.

Next steps