feat: screen viewing, Jarvis sees the whole screen, a monitor or a window for registered people
- screenView tool (screen_view.spec.md): whole screen, monitor by number, window by part of its title or program, or the list of monitors and windows; fast, normal or detailed pictures. - The app captures with Windows Graphics Capture (app/src/screen.rs, admin.spec.md "Screen viewing"), decides for the asker (only people registered for PC control), never picks, lists or shows excluded programs (pcControl.screenExclude, password managers by default), refuses minimised windows and black pictures, and records screen.view in the activity log. - Pictures ride on the tool message (ToolExecutionResult.images); llm.py sends them to OpenAI-compatible servers as image parts after the tool messages. They stay in that reply only: not in the tool carryover, logs or prompt dumps. - The LLM reads pictures only when screen viewing is available (--vision gpu normally, cpu in a game), measured apart for the placement; otherwise screenView is a disabled tool. - Worker: screen_action / screen_action_result, 4 MiB messages. - Eval evals/test_screen_view_tool.py; Windows check tests/screen_windows.rs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -171,7 +171,7 @@ fn uninstall(_driver: &Path) -> Result<(), String> {
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
pub use win::{attach, detach, run_elevated, settle_windows, status};
|
||||
pub use win::{attach, detach, run_elevated, settle_windows, status, virtual_display_name};
|
||||
#[cfg(windows)]
|
||||
use win::{install, uninstall};
|
||||
|
||||
@@ -297,6 +297,12 @@ mod win {
|
||||
current(&v.name).filter(|r| r.w > 0).ok_or_else(|| "가상 모니터가 켜지지 않았습니다".into())
|
||||
}
|
||||
|
||||
/// The virtual monitor's display name (`\\.\DISPLAY<n>`) while it is on the desktop: screen
|
||||
/// viewing leaves it out (admin.spec.md, "Screen viewing").
|
||||
pub fn virtual_display_name() -> Option<String> {
|
||||
adapter().filter(|d| d.attached).map(|d| text(&d.name))
|
||||
}
|
||||
|
||||
/// Take the virtual monitor off the desktop (when it is ours and on it).
|
||||
pub fn detach() {
|
||||
if !ours() {
|
||||
|
||||
Reference in New Issue
Block a user