mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
This PR introduces screen recording of the computer use agent using the virtual desktop. - Screen recording is triggered by a `wait_agent` tool call. Recording is stopped by a successful `wait_agent` tool call or when there hasn't been any desktop activity for 10 minutes. - Recordings are handled by the `portabledesktop` cli via the `record` command. The videos are sped up in periods of inactivity. - Recordings are saved to the database to the `chat_files` table. There's a hard limit of 100MB per recording. Larger recordings are dropped. - A successful `wait_agent` on a computer use subagent tool call returns a `recording_file_id`, later allowing the frontend to display the corresponding video.
11 lines
298 B
Go
11 lines
298 B
Go
package agentdesktop
|
|
|
|
import "os"
|
|
|
|
// interruptRecordingProcess kills the recording process directly
|
|
// because os.Process.Signal(os.Interrupt) is not supported on
|
|
// Windows and returns an error without delivering a signal.
|
|
func interruptRecordingProcess(p *os.Process) error {
|
|
return p.Kill()
|
|
}
|