()
| 828 | } |
| 829 | |
| 830 | async function uninstall() { |
| 831 | header("Uninstall"); |
| 832 | |
| 833 | const osName = platform(); |
| 834 | const hostDirs = getNativeHostDirs(osName); |
| 835 | for (const dir of hostDirs) { |
| 836 | const p = nativeHostManifestPath(dir); |
| 837 | if (!existsSync(p)) continue; |
| 838 | try { |
| 839 | unlinkSync(p); |
| 840 | success(`Removed native host manifest: ${p}`); |
| 841 | } catch { |
| 842 | warn(`Could not remove: ${p}`); |
| 843 | } |
| 844 | } |
| 845 | |
| 846 | for (const p of [BROKER_DST, NATIVE_HOST_DST, CONFIG_DST, join(BASE_DIR, "broker.sock")]) { |
| 847 | if (!existsSync(p)) continue; |
| 848 | try { |
| 849 | unlinkSync(p); |
| 850 | success(`Removed: ${p}`); |
| 851 | } catch { |
| 852 | // ignore |
| 853 | } |
| 854 | } |
| 855 | |
| 856 | log(` |
| 857 | ${color("bright", "Note:")} |
| 858 | - The unpacked extension folder remains at: ${EXTENSION_DIR} |
| 859 | - Remove it manually in ${color("cyan", "chrome://extensions")} |
| 860 | - Remove ${color("bright", "@different-ai/opencode-browser")} from your opencode.json/opencode.jsonc plugin list if desired. |
| 861 | `); |
| 862 | } |
| 863 | |
| 864 | main().catch((e) => { |
| 865 | error(e.message || String(e)); |
no test coverage detected