From 22bc03484faa39c19b558dac50e2b44d4fe600da Mon Sep 17 00:00:00 2001 From: Gemini AI Date: Sun, 14 Dec 2025 02:43:03 +0400 Subject: [PATCH] feat: add 'open' command and Docker troubleshooting instructions --- bin/input.ps1 | 11 +++++++++++ bin/opencode-ink.mjs | 7 +++++++ 2 files changed, 18 insertions(+) diff --git a/bin/input.ps1 b/bin/input.ps1 index 1e7f0b3..81977ef 100644 --- a/bin/input.ps1 +++ b/bin/input.ps1 @@ -166,6 +166,17 @@ switch ($Command.ToLower()) { if (-not $found) { Write-Host "Could not find visible '$targetName' to click." } } + "open" { + if ($Params.Count -lt 1) { Write-Error "Usage: open 'Path or URL'"; exit 1 } + $target = $Params -join " " + try { + Start-Process $target + Write-Host "Opened '$target'" + } catch { + Write-Error "Failed to open '$target': $_" + } + } + "apps" { $apps = Get-Process | Where-Object { $_.MainWindowTitle -ne "" } | Select-Object Id, MainWindowTitle if ($apps) { diff --git a/bin/opencode-ink.mjs b/bin/opencode-ink.mjs index 0b092a0..389223a 100644 --- a/bin/opencode-ink.mjs +++ b/bin/opencode-ink.mjs @@ -491,10 +491,17 @@ Use it to control the mouse, keyboard, and "see" the system. ## 👁️ VISION & BLINDNESS PROTOCOL: You are a TEXT-BASED intelligence. You CANNOT see images/screenshots you take. +- **\`input.ps1 open "URL/File"\`**: Launches a website or application. - **\`input.ps1 uiclick "Name"\`**: **SMART ACTION**. Finds a VISIBLE button by name and clicks it automatically. - **\`input.ps1 find "Name"\`**: Looks for VISIBLE elements only. Returns coordinates. - **\`input.ps1 apps\`**: TEXT list of open apps. +### 🔧 TROUBLESHOOTING & RECOVERY: +- **DOCKER ERROR**: If you see "error during connect... pipe... dockerDesktopLinuxEngine", **DOCKER IS NOT RUNNING**. + - **FIX**: Run \`powershell bin/input.ps1 open "Docker Desktop"\` OR \`uiclick "Docker Desktop"\`. + - Wait 15 seconds, then try again. +- **NOT FOUND**: If \`uiclick\` fails, check \`apps\` to see if the window is named differently. + ### 📐 THE LAW OF ACTION: 1. **SMART CLICK FIRST**: To click a named thing (Start, File, Edit), use: \`powershell bin/input.ps1 uiclick "Start"\`