A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://code.visualstudio.com/docs/copilot/chat/chat-ask-mode below:

Use ask mode in VS Code

Use ask mode in VS Code

Chat in Visual Studio Code lets you use natural language to interact with large language models (LLMs) to get help with your code. Ask mode for chat is optimized for asking questions about your codebase, coding, and general technology concepts. Ask mode is particularly useful for getting a better understanding of your codebase, brainstorming ideas, and getting help with coding tasks.

Prerequisites Why use ask mode?

Ask mode is optimized for answering questions about your codebase, coding, and general technology concepts. You can use it to:

In ask mode, the response can contain code blocks, which you can apply to your codebase. This works well for smaller edits within a single file. However, edit mode and agent mode are better suited for making larger changes across multiple files or for more complex coding tasks.

Use ask mode

Follow these steps to get started with ask mode in VS Code:

  1. Open the Chat view (⌃⌘I (Windows, Linux Ctrl+Alt+I)) and select Ask from the chat mode selector.

    Directly open ask mode in VS Code Stable or Insiders.

  2. Type your question in the chat input field and select Send () to submit it.

    Experiment with some of these example questions to get started:

  3. Add context to your chat prompt by using Add Context or #-mentioning specific workspace files or predefined context items like #codebase.

    By adding context, you can get more relevant responses. For example, to ask questions that are specific to your current project, you can use the #codebase context item. Type # in the chat input field to view the list of available context items.

    Here are some example prompts that use context:

    Learn more about adding context to your chat prompt.

  4. Notice that, based on your question, the response might include different types of rich content, such as code blocks, terminal commands, links, and references to symbols in your code.

    Learn how you can apply code blocks to your codebase, or run terminal commands directly in the integrated terminal.

Apply a code block from chat

When your chat response contains code blocks, you can apply them individually to the corresponding file in your workspace. VS Code performs a smart apply and inserts the changes in the right location within the file.

To apply a code block to your codebase, hover over the code block and select the Apply in Editor button. VS Code tries to apply the proposed changes to your existing code.

Alternatively, you can also copy the code or insert it at the current cursor position. Hover over the code block and select the corresponding action.

Depending on the language extension, code blocks in chat responses might support IntelliSense, similar to the experience in the editor.

If a code block contains a shell command, you can run it directly in the integrated terminal with the Insert into Terminal (⌃⌥Enter (Windows, Linux Ctrl+Alt+Enter)) action.

Tip

Navigate between code blocks with the Chat: Next Code Block (⌥⌘PageDown (Windows, Linux Ctrl+Alt+PageDown)) and Chat Previous Code Block (⌥⌘PageUp (Windows, Linux Ctrl+Alt+PageUp)) commands.

Quick chat

Use Quick Chat to ask a quick question without starting a full chat session on the side. Quick Chat is a lightweight chat experience that lets you open a Quick Pick to ask a question.

To open Quick Chat, select Quick Chat from the Copilot menu in the title bar, or use the ⇧⌥⌘L (Windows, Linux Ctrl+Shift+Alt+L) keyboard shortcut.

You can ask a question in Quick Chat, and if you want to keep the conversation going, promote it to a full chat session with the Open in Chat View button.

Special keywords

In your prompt, you can use special keywords to get more relevant responses:

08/07/2025


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4