Skip to content

Comments

Feature: Tour agent#3871

Open
dshearer wants to merge 16 commits intomicrosoft:mainfrom
dshearer:dshearer/tour-agent
Open

Feature: Tour agent#3871
dshearer wants to merge 16 commits intomicrosoft:mainfrom
dshearer:dshearer/tour-agent

Conversation

@dshearer
Copy link

@dshearer dshearer commented Feb 19, 2026

Overview

Hi!!

This PR adds a custom agent called "Tour" that is meant to help orient users to a new repo by walking them through it. The flow: (1) User asks a question ("How is feature X implemented?"), (2) agent plans a tour, (3) agent goes through the steps of the tour, opening files, highlighting lines, and explaining what it's showing. The user controls the pace of the tour, and can ask questions or even redirect the tour as desired.

Advantages over the "Ask" agent

  • Instead of answering the question with paragraphs of text, it takes shows the user the code and answers the question step-by-step
  • User gets more confidence in Copilot's answer because the user can see the code
  • The prompt encourages Copilot to admit when it doesn't know the answer, and to take the user on a "voyage of discovery" --- this works because of the interactive nature of this feature
  • Shows how Copilot + VS Code work well together!

Questions

There are certainly other choices we can make in terms of UI/UX!

  • Is "Tour" a good name for the agent?
  • Do we like the highlighting?
  • Should we make it look more like CodeTour, with the commentary right in the middle of the code?

Screenshots

image image image image

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new "Tour" agent that provides guided code tours to help users understand codebases through interactive file navigation and highlighting. The Tour agent uses three new tools (openFile, highlightLines, clearHighlights) to orchestrate step-by-step walkthroughs of code, opening files, highlighting specific line ranges, and managing visual highlights.

Changes:

  • Adds three new tools for file navigation and highlighting (openFile, highlightLines, clearHighlights)
  • Implements TourAgentProvider with embedded prompt instructions for guided code tours
  • Registers tools in the toolset and contributes tool definitions to package.json

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
src/extension/tools/vscode-node/openFileTool.ts New tool to open files in the editor
src/extension/tools/vscode-node/highlightLinesTool.ts New tool to open files and highlight specific line ranges with visual decorations
src/extension/tools/vscode-node/clearHighlightsTool.ts New tool to clear all highlights from a file
src/extension/tools/vscode-node/allTools.ts Registers the three new tools for loading
src/extension/tools/common/toolNames.ts Adds enum entries and categorization for the three new tools
src/extension/agents/vscode-node/tourAgentProvider.ts Implements the Tour agent provider with dynamic configuration and prompt generation
src/extension/agents/vscode-node/promptFileContrib.ts Registers the Tour agent provider
package.json Adds tool definitions with schemas for the three new tools
package-lock.json Dependency tree updates (peer flags and optional dependency cleanup)
Comments suppressed due to low confidence (5)

src/extension/agents/vscode-node/tourAgentProvider.ts:133

  • Spacing issue: Missing space after "focused." and before "Aim". Should be "Keep tours focused. Aim for".
- Keep tours focused.Aim for 3-7 stops unless the topic genuinely requires more.

src/extension/agents/vscode-node/tourAgentProvider.ts:113

  • Markdown formatting inconsistency: Should be "How to tell the difference:" (no space between asterisks and text).
** How to tell the difference:**

src/extension/agents/vscode-node/tourAgentProvider.ts:128

  • Markdown formatting inconsistency: Should be "Example:" (no space between asterisks and text).
** Example:**

src/extension/agents/vscode-node/tourAgentProvider.ts:65

  • Spacing issue: Missing space after "stop" and before the opening parenthesis. Should be "this stop (with the #tool:todo tool)".
4. Before moving to the next stop, check off the todo item corresponding to this stop(with the #tool:todo tool)

src/extension/agents/vscode-node/tourAgentProvider.ts:82

  • Markdown formatting inconsistency: The examples use "** Good example:" and " Bad example (too terse):**" with double asterisks and a space, which is non-standard Markdown. Standard Markdown bold formatting should be "Good example:" (no space between asterisks and text) or use a different format like "Good example:" if the bold should only apply to "Good example".
** Good example:**

@dshearer dshearer marked this pull request as draft February 19, 2026 23:32
dshearer and others added 9 commits February 19, 2026 18:33
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@dshearer dshearer changed the title Tour agent Feature: Tour agent Feb 19, 2026
@dshearer dshearer marked this pull request as ready for review February 20, 2026 13:45
@dshearer
Copy link
Author

@dshearer please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

I am making Submissions in the course of work for my employer (Microsoft/GitHub). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.

@microsoft-github-policy-service agree company="Microsoft/GitHub"

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants