github / github/copilot-cli

Open IDE in Session Working Directory (`/ide` enhancement or keyboard shortcut)

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

描述

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

When working with multiple Copilot CLI sessions across different repositories, worktrees, or branches, there's no quick way to open an IDE directly in the session's working context. Currently, users must manually navigate to the correct directory and launch their IDE, breaking the workflow.

The existing `/ide` command does not open a new IDE instance in the session's CWD - this gap leads to friction when reviewing diffs, code changes, or making manual edits in the context of a specific agent session.

### Proposed solution

Extend the `/ide` command (or add a new keyboard shortcut like `Ctrl+I`) to launch the user's preferred IDE in the session's working directory.

**Key capabilities:**
- **Multiple IDE support** - Allow users to configure their preferred IDE (VS Code, Visual Studio, JetBrains, etc.)
- **Flexible context options:**
- **Session CWD** - Open IDE at the current working directory of the session
- **Repository root** - Open IDE at the git repository root
- **Invocation directory** - Open IDE at the original directory where Copilot CLI was started
- **Dual triggers:**
- Keyboard shortcut (e.g., `Ctrl+I` or `Ctrl+Shift+O`)
- Slash command `/ide` or `/ide open`

**Configuration example:**
```
copilot config set ide.editor "code" # or "code-insiders", "devenv", "idea"
copilot config set ide.default-context "cwd" # or "repo-root", "invocation-dir"
```

### Example prompts or workflows

1. **Multi-worktree workflow:**
- User has 3 terminals with Copilot CLI in different git worktrees
- In session 2, agent makes changes to `src/auth/login.ts`
- User presses `Ctrl+I` → VS Code opens at that worktree's root
- User reviews diff in IDE, makes tweaks, returns to CLI

2. **Branch-specific review:**
- Copilot CLI session is in `feature/new-api` branch
- User types `/ide` to open IDE in current context
- IDE opens with the branch already checked out at the correct directory

3. **Quick file inspection:**
- Agent reports "I've updated `package.json`"
- User types `/ide .` or presses keyboard shortcut
- IDE opens in session CWD, user can immediately see the file

4. **Configurable context:**
- User prefers VS Code: `copilot config set ide.editor "code"`
- User types `/ide --repo-root` to open at repository root instead of CWD

5. **Cross-IDE support:**
- Team member uses Visual Studio: `copilot config set ide.editor "devenv"`
- Same `/ide` command works, opens Visual Studio instead

### Additional context

**Current behavior gap:**
The `/ide` command exists but does not open a new IDE instance in the session's working directory context. Users discovering this command expect it to solve this exact use case.

**User pain points addressed:**
- Managing multiple CLI sessions across different repos/worktrees/branches
- Context-switching friction when needing to review code in an IDE
- Having to manually `cd` and launch IDE loses the mental model of "this session = this context"

**Similar patterns in other tools:**
- VS Code's "Open in Terminal" opens terminal at file location
- GitHub Desktop's "Open in VS Code" opens IDE at repo root
- `code .` command already exists but requires knowing the correct directory

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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