github / github/copilot-cli

Configurable exit resume hint

未关闭
#4,066 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area:configuration area:sessions
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

### Describe the feature or problem you'd like to solve
Since v1.0.64, the exit message's `copilot --resume=...` hint always shows the alphanumeric session ID, even for sessions that have been renamed (via `/rename` or auto-generated naming). This was an intentional fix (#3128) to avoid ambiguity between near-duplicate AI-generated titles, but it removed the option for users who deliberately rename sessions to something memorable and would prefer to see and reuse that name at exit. There's currently no setting to restore the previous behavior.

### Proposed solution
Add a user setting, e.g. `"exitMessage.resumeHint": "id" | "name" | "auto"`, that controls what the exit hint prints:
- `"id"` (default) - current behavior, always show the session ID. Preserves the reliability fix from #3128 for users who don't opt in.
- `"name"` - show the friendly/renamed name when the session has one, falling back to ID otherwise.
- `"auto"` - same heuristic the CLI used pre-1.0.64 (ID unless renamed).

This keeps the current default intact while letting users who prefer memorable, renamed resume hints opt back in.

### Example prompts or workflows
- User runs `/rename my-feature-work`, exits, and sees `copilot --resume=my-feature-work` instead of `copilot --resume=a1b2c3d4-...`.
- User sets `"exitMessage.resumeHint": "name"` once in `settings.json`; every future session exit reflects the friendly name when one exists.
- `/settings set exitMessage.resumeHint name` toggles it from within the CLI without hand-editing settings.json.
- Users who don't set the option see no change in behavior (still ID-only, per #3128).

### Additional context
Related discussion: #3128 ("Bring back the alphanumeric Session ID") - the maintainer response there (and the v1.0.64 changelog entry "Exit message always shows the session ID in the resume command instead of the friendly name") explains the reasoning for defaulting to ID. This request isn't to revert that default, just to make it configurable for users with the opposite preference.

贡献指南

打开贡献指南

调研方向

首先跟踪退出消息如何构建其 copilot --resume 提示,以及如何读取 settings.json 中的值。检查 /settings 命令和 /rename 流程以了解可用的会话名称,然后验证 id、name-with-ID-fallback 和 auto 行为。完成的标准是默认值仍为 ID-only,并且新设置通过 settings.json 和 /settings 都能生效。

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

评估

技术栈
shell
领域
cli
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
55/100

把新 issue 发到你的邮箱

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