Keyboard Shortcuts N Next post
P Previous post
S Save / unsave
R Read aloud
T Toggle theme
/ Focus search
Esc Close panels
🔥
Ready to read...
beginner Chat Participants GitHub Copilot IMCSEIAN Tutorial

Chat Participants: @workspace, @terminal, @vscode

Reviewed & accurate
AI Summary
IMCSEIAN · GitHub Copilot Master Course

Chat Participants: @workspace, @terminal, @vscode

Direct Copilot's attention to a specific context scope.

Phase 1 — Beginner Lesson BE-10 Difficulty: Beginner 7 min read
Course: GitHub Copilot Phase 1 — Beginner 7 min read Last verified: 2026-08-30

What You Will Learn

  • Use @workspace to scope Chat to the whole repo.
  • Use @terminal to feed terminal output as context.
  • Use @vscode for editor-level actions.
  • Combine participants with slash commands.
  • Recognize when a participant adds value vs overhead.

Why This Matters

Without participants, Chat only sees your current selection. With @workspace, it sees the whole repo. With @terminal, it sees your last command's output. The right participant transforms a generic answer into a grounded one.

Concept Explained

Chat participants are scoped context injectors. They tell Copilot what additional context to gather before responding. @workspace pulls repo-wide context; @terminal pulls recent terminal output; @vscode exposes editor commands.

How It Works

Type @ in the chat box; a participant picker appears. The selected participant runs its context-gathering function (e.g. @workspace indexes your repo), assembles context, and sends it with your prompt to the model. Latency increases for broader scopes.

Step-by-Step Tutorial

1. Use @workspace

Type @workspace followed by your question. Copilot searches the repo for relevant files and includes them in context.

2. Use @terminal

After running a failing command, type @terminal followed by 'why did this fail?'. Copilot sees the terminal output.

3. Use @vscode

Type @vscode followed by an action like 'format this file'. Copilot triggers the VS Code command.

4. Combine

Type @workspace /tests — runs /tests with full repo context.

5. Recognize overhead

@workspace is slower than no participant. Use it only for cross-file questions.

Real-World Example

A developer saw a CI failure but couldn't reproduce locally. They opened Copilot Chat, typed @terminal 'why is CI failing?' with the failed CI log in their terminal scrollback. Copilot identified a missing environment variable, proposed a fix, and explained why the local environment differed from CI. Five-minute resolution instead of an hour of investigation.

Example Prompts / Commands / Code

@workspaceimcseian
@workspace How does the auth middleware connect to the user service? List the files and the data flow.
@terminalimcseian
# After `npm run build` fails:
@terminal Why did the build fail? Suggest a fix.
Combinedimcseian
@workspace /tests for the UserController — cover all public methods

Common Mistakes

  • Using @workspace for single-file questions — adds latency without value.
  • Forgetting @terminal exists — manually pasting error output instead.
  • Assuming @vscode can run any command — it's scoped to safe editor actions.
  • Mixing too many participants in one prompt — context gets noisy.

Best Practices

  • Default to no participant; add when needed.
  • Use @workspace for architecture, dependency, and cross-file questions.
  • Use @terminal for any debugging session — it sees your last command's output.
  • Combine participants with slash commands for structured output.

Troubleshooting

ProblemHow to Fix
@workspace is slowRepo is large. Narrow scope by attaching specific files instead.
@terminal sees the wrong commandRun the relevant command last, or attach the terminal output explicitly.
@vscode command not foundThe command must be a registered VS Code command. Check the command palette.

Practical Exercise

Your Turn

Open a project you know. Run a failing command in the terminal (e.g. an intentional typo). Use @terminal to ask Copilot why it failed. Then use @workspace to ask how the failing module fits into the broader architecture.

Key Takeaways

  • Participants scope Chat's context: @workspace, @terminal, @vscode.
  • @workspace is for repo-wide questions; expect higher latency.
  • @terminal is for debugging — feeds terminal output as context.
  • Combine participants with slash commands for structured, grounded output.
  • Default to no participant; add when the question demands it.

Frequently Asked Questions

Are there other participants?
Yes — Extensions register as @participants (e.g. @azure, @github). See IN-35.
Does @workspace index the whole repo every time?
No — it uses incremental indexing. First call is slowest.
Can I write my own participant?
Yes, via Copilot Extensions. Covered in PR-21.

Further Reading

Official References

Related lessons: BE-08, BE-09, IN-35

SEO Metadata

SEO title: Chat Participants: @workspace, @terminal, @vscode

Meta description: Direct Copilot's attention to a specific context scope.

Primary keyword: chat participants

Secondary keywords: chat participants: @workspace, @terminal, @vscode

Search intent: Informational

URL slug: /github-copilot-chat-participants-workspace-terminal

Categories: AI Tools, GitHub Copilot

Tags: GitHub Copilot, Beginner, Chat Participants, IMCSEIAN, Tutorial, IMCSEIAN

Featured image concept: IMCSEIAN lesson card for Chat Participants: @workspace, @terminal, @vscode

Test Your Knowledge
How did you find this?

Comments

Join the discussion! Sign in with your Google or Blogger account, or comment as Anonymous - no account needed. For quick questions, also reach me on Telegram @cytestch.

Comments