mirror of
https://github.com/Tencent/BrowserSkill.git
synced 2026-09-10 13:01:23 +08:00
feat: support Agent Window sizing (session start --width/--height, window resize) (#52)
- `bsk session start --width <px> --height <px>` opens the Agent Window with the given outer size (chrome.windows.create) - new `bsk window resize --session <id> --width <px> --height <px>` resizes the Agent Window at runtime (chrome.windows.update) - both validated on CLI, daemon and extension sides (100..=7680 CSS px) - protocol: new tool.window_resize method (BrowserMutation) and optional width/height on tool.session_start params; schemas regenerated
This commit is contained in:
@@ -30,6 +30,7 @@ pub mod status;
|
||||
pub mod tab;
|
||||
pub mod update;
|
||||
pub mod waits;
|
||||
pub mod window;
|
||||
|
||||
use clap::{Args, Parser, Subcommand};
|
||||
|
||||
@@ -50,6 +51,7 @@ use crate::cli::snapshot::SnapshotArgs;
|
||||
use crate::cli::tab::TabCmd;
|
||||
use crate::cli::update::UpdateArgs;
|
||||
use crate::cli::waits::{WaitForNavigationArgs, WaitMsArgs};
|
||||
use crate::cli::window::WindowCmd;
|
||||
|
||||
/// Tool calls wait slightly longer than the daemon's 30s tool timeout so
|
||||
/// callers receive the structured daemon timeout instead of dropping the
|
||||
@@ -118,6 +120,9 @@ pub enum Command {
|
||||
/// Tab management commands.
|
||||
Tab(TabCmd),
|
||||
|
||||
/// Agent Window management commands.
|
||||
Window(WindowCmd),
|
||||
|
||||
/// Capture a PNG of the active tab or a snapshot ref element.
|
||||
Screenshot(ScreenshotArgs),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user