github / github/copilot-cli

Support activation welcome cards for custom Copilot CLI agents

未关闭
#4,798 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

triage
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

Describe the feature or problem you'd like to solve

Problem Custom Copilot CLI agents are selected with /agent <agent-name>, but selection only changes the active profile. The CLI does not show an immediate, agent-defined welcome or onboarding message. This creates a discoverability problem for specialized workflow agents. A new user can successfully select an agent but still not know what it is for, which goals it supports, or how to begin. The user must already know an appropriate first prompt before the agent can help.

Proposed solution

Add a first-class optional welcome declaration to custom-agent metadata and
render it directly in the Copilot CLI UI after a user successfully selects an
agent with /agent.

Illustrative agent profile:


name: analysis-agent
description: "Helps investigate reports, inputs, and execution results."
welcome:
title: "Welcome"
message: >
This agent can help investigate existing results, analyse supplied inputs,
and prepare focused follow-up work.
suggestedPrompts:
- "Investigate an existing report or execution result"
- "Analyse a supplied input"
- "Help me understand an existing failure"

CLI behavior:

  1. The user selects a custom agent with /agent <agent-id>.
  2. Once selection succeeds, the CLI reads the selected agent's optional
    welcome metadata.
  3. If present, the CLI renders a lightweight terminal welcome card immediately.
  4. The card displays the title, message, and optional suggested prompts.
  5. Selecting a suggested prompt deliberately submits that text as a normal user
    prompt. The user may instead dismiss the card and enter any free-form prompt.
  6. The welcome card is UI-only:
    • it does not invoke the model;
    • it does not consume AI credits;
    • it does not create synthetic user or assistant messages;
    • it does not alter conversation history.
  7. Agents without welcome metadata retain today's behavior unchanged.

Suggested terminal rendering:

┌ Welcome ───────────────────────────────────────────────┐
│ This agent can help investigate existing results, │
│ analyse supplied inputs, and prepare focused work. │
│ │
│ What would you like to do? │
│ │
│ 1. Investigate an existing report or execution result │
│ 2. Analyse a supplied input │
│ 3. Help me understand an existing failure │
│ │
│ Press a number, or Esc to enter your own prompt. │
└────────────────────────────────────────────────────────┘

Example prompts or workflows

Consider two custom agents supplied by a plugin:

  • An analysis-oriented agent for investigating existing artifacts, reports,
    execution results, and input data.
  • A developer-oriented agent that includes those capabilities plus source editing,
    validation, review, and delivery workflows.

After selecting the analysis agent with /agent, the CLI could immediately show:

Welcome

This agent can help investigate existing results, analyse supplied inputs, and
prepare focused follow-up work.

What would you like to do?

  • Investigate an existing report or execution result
  • Analyse an input or dataset
  • Prepare focused follow-up work
  • Understand an existing failure

The developer-oriented agent could show the same concise user goals with one short
additional note that it also supports implementation, validation, and delivery.

Requested behavior

Please add an optional custom-agent activation/welcome contract that the CLI renders
immediately after a successful interactive /agent selection.

Suggested shape (illustrative only):

welcome:
title: "Welcome"
message: "This agent can help with..."
suggestedPrompts:
- "Investigate an existing report"
- "Analyse a supplied input"

Additional context

No response

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先定位 Copilot CLI 中 custom-agent 元数据的解析逻辑,以及交互式 /agent 选择流程。跟踪选择操作如何更新活动配置,然后确定仅用于 UI 的欢迎卡片和建议提示词提交应插入的位置;完成标准是:成功选择后渲染欢迎元数据,同时不改变没有该元数据的 agent 的历史记录或行为。

由索引模型根据 Issue 内容生成。

评估

技术栈
shell
领域
cli
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
活跃
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。