github / github/copilot-cli

Add `--user` to copilot argument

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

描述

### Describe the feature or problem you'd like to solve

I'd like to be able to specify which user I want to use for the session as I have both work and personal accounts

### Proposed solution

If you have a script that puts in all the startup values you like by default, would be nice to have an ability to also specify the user/account that the session should start up in. Kind of annoying to have to later specify the user via `/user`.

### Example prompts or workflows

I have a powershell alias `cs` that launches copilot with a few args like `--yolo` and a few other fields. I'd like to also be able to pass a flag like `-Personal` or `-Work` to force it to use a specific account for the new session (so I don't forget and spend personal on work or vice versa). Just relying on the last one launched gets tricky because sometimes I forget and in the morning when I get to work and I forget to switch back to work account.

### Additional context

_No response_

贡献指南

打开贡献指南

调研方向

未指定文件或测试。首先定位 CLI 参数解析以及现有的 `/user` 账户选择流程;然后跟踪所选账户如何传递到新会话。完成的标准是:startup flag 能可靠地选择请求的账户,同时保持现有行为不变,并且该选项易于发现。

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

评估

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

把新 issue 发到你的邮箱

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