[Feat] Allow the agent to send input to a running background terminal (send_to_terminal)

Đang mở
#512 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java
Lĩnh vực
cli, developer-experience

Hướng nghiên cứu

Start by locating IRunInTerminalTool and RunInTerminalTool.executeCommand(); the issue identifies these entry points and notes that sendCommand() already uses ITerminalViewControl.pasteString(). Trace how background terminals are opened and how get_terminal_output selects a terminal, then determine how input should target the running process. Done means the agent can send abc to a background interactive terminal and receive got: abc.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Problem
The copilot agent can start a long-running interactive process with
run_in_terminal (isBackground=true) and read it with get_terminal_output,
but it cannot send further input to that process. Interactive CLIs (debugger
consoles, serial monitors) therefore cannot be driven step by step:
the model has to pre-script all input (stdin pipe + sleeps) and cannot react
to intermediate replies.

Evidence (0.21.0)

  • IRunInTerminalTool only exposes executeCommand, getBackgroundCommandOutput,
    cancelCurrentCommand.
  • RunInTerminalTool.executeCommand() opens a new Copilot-<id> terminal per
    background call; a new foreground call first runs
    closeRunningForegroundTerminal(...).
  • Internally sendCommand() already uses ITerminalViewControl.pasteString().

Repro

  1. Ask the agent to run in background:
    powershell -NoProfile -Command 'while ($true) { $l = Read-Host ''input''; Write-Output (''got: '' + $l) }'
  2. Ask it to send abc to that terminal and show got: abc.

Observed
Eclipse Copilot: the agent can't type into the running terminal. It ends up writing one script that pipes all input with sleeps and only sees the output at the end.
VS Code Copilot: send_to_terminal works, I get got: abc back.

Ngôn ngữ chính
Java
Star
129
Fork
70
Merge trung bình
3 ngày 2 giờ
Pull request đã merge (30 ngày)
15

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/copilot-for-eclipse

Tất cả issue của microsoft/copilot-for-eclipse

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.