From c6ff84416b0ef438431c63b412802b71ffc314d1 Mon Sep 17 00:00:00 2001 From: Aviral Shukla Date: Sun, 1 Nov 2026 01:01:28 +0530 Subject: [PATCH] remove detach button and clean readme --- README.md | 32 +++++++++++++++----------------- src/gui.tsx | 21 --------------------- 2 files changed, 15 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 92de0a2..532b781 100644 --- a/README.md +++ b/README.md @@ -2,20 +2,20 @@ demo -View and control Android emulators from OpenCode Desktop on Windows, Linux, and -macOS. Includes a Device panel and agent tools. +
+ +View and control Android (for now) emulators from OpenCode Desktop on Windows, Linux, and +macOS. ## Requirements - OpenCode Desktop compatible with plugin SDK 2.2.2, using a local server. - Node 22.19+ on the 22.x line, or Node 24+, with npm. -- Android SDK Platform-Tools and Emulator, a configured Android Virtual Device, - and hardware virtualization enabled. +- Android SDK Platform-Tools and Emulator, a configured Android Virtual Device, and hardware virtualization enabled. - ffmpeg with libx264 on the desktop process's PATH. -Set `ANDROID_HOME` or `ANDROID_SDK_ROOT` if your SDK is outside the standard -Android Studio location. Set `OPENCODE_DEVICE_NODE` to your Node executable if -the desktop cannot find it. +Set `ANDROID_HOME` or `ANDROID_SDK_ROOT` if your SDK is outside the standard Android Studio location. +Set `OPENCODE_DEVICE_NODE` to your Node executable if the desktop cannot find it. ## Install @@ -28,18 +28,17 @@ Add this entry to your OpenCode configuration. ``` Restart OpenCode Desktop, then open **Add tab > Device** in a session. -First use downloads the pinned device helpers from npm. Android SDK tools, -Node and ffmpeg must already be installed. +First use downloads the pinned device helpers from npm. +Android SDK tools, Node and ffmpeg must already be installed. ## Use The panel opens the first configured emulator and starts it if needed. Use the -picker to switch devices, refresh to rescan, and detach to disconnect without -shutting down the emulator. Click or drag the screen to control it. +picker to switch devices and refresh to rescan. Agent access starts enabled. Use the switch to revoke access for the current -session. Agents can only use a device you have opened. Installing an APK or -shutting down an emulator requires a separate permission prompt. +session. Agents can only use a device you have opened. +Installing an APK or shutting down an emulator requires a separate permission prompt. Tools use `device_*` names, or `device.*` in Code Mode. They can inspect the screen, launch apps, enter text, interact with elements and take screenshots. @@ -47,8 +46,7 @@ screen, launch apps, enter text, interact with elements and take screenshots. Android emulators only (for now). [iOS, physical devices, remote servers and direct keyboard input into the panel coming soon.] -Prebuilt plugin files are included. No build step or Bun installation is needed -to install the plugin. +Prebuilt plugin files are included. ## Development @@ -61,5 +59,5 @@ bun run bundle bun run verify:package ``` -MIT license. Dependency licenses are listed in -[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md). +MIT license. +Dependency licenses are listed in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md). diff --git a/src/gui.tsx b/src/gui.tsx index 2826a9e..e6db951 100644 --- a/src/gui.tsx +++ b/src/gui.tsx @@ -212,16 +212,6 @@ export default Plugin.define({ if (!value) setSelectedDevice(attachment() ? previous : ""); }; - const detach = async () => { - const current = attachment(); - if (!current) return; - const closed = await outcome("close", () => - bridge.manual({ scope: scope(), operation: { type: "close", handle: current.handle } }), - ); - if (!closed) return; - setSelectedDevice(""); - }; - createEffect(() => { scope(); void refresh(); @@ -384,17 +374,6 @@ export default Plugin.define({ {(device) => } - - -