diff --git a/bun.lock b/bun.lock index b0d71da6a7..32bf651ccf 100644 --- a/bun.lock +++ b/bun.lock @@ -335,8 +335,8 @@ "@opencode-ai/sdk": "workspace:*", "@opencode-ai/util": "workspace:*", "@openrouter/ai-sdk-provider": "1.5.4", - "@opentui/core": "0.0.0-20260303-946d7494", - "@opentui/solid": "0.0.0-20260303-946d7494", + "@opentui/core": "0.0.0-20260303-1dd94f99", + "@opentui/solid": "0.0.0-20260303-1dd94f99", "@parcel/watcher": "2.5.1", "@pierre/diffs": "catalog:", "@solid-primitives/event-bus": "1.1.2", @@ -1437,7 +1437,7 @@ "@opentui/core-win32-x64": ["@opentui/core-win32-x64@0.1.86", "", { "os": "win32", "cpu": "x64" }, "sha512-HRfgAUlcu71/MrtgfX4Gj7PsDtfXZiuC506Pkn1OnRN1Xomcu10BVRDweUa0/g8ldU9i9kLjMGGnpw6/NjaBFg=="], - "@opentui/solid": ["@opentui/solid@0.0.0-20260303-946d7494", "", { "dependencies": { "@babel/core": "7.28.0", "@babel/preset-typescript": "7.27.1", "@opentui/core": "0.0.0-20260303-946d7494", "babel-plugin-module-resolver": "5.0.2", "babel-preset-solid": "1.9.9", "s-js": "^0.4.9" }, "peerDependencies": { "solid-js": "1.9.9" } }, "sha512-q6md0VvqpWwxw9BlDeiGSuVbG2UU9qrRdcOBYs8+HH3/VRef87RtteaNn++GhYutODN+NNT8s+fgIN3I27YGkw=="], + "@opentui/solid": ["@opentui/solid@0.0.0-20260303-1dd94f99", "", { "dependencies": { "@babel/core": "7.28.0", "@babel/preset-typescript": "7.27.1", "@opentui/core": "0.0.0-20260303-1dd94f99", "babel-plugin-module-resolver": "5.0.2", "babel-preset-solid": "1.9.9", "s-js": "^0.4.9" }, "peerDependencies": { "solid-js": "1.9.9" } }, "sha512-k1sxI+zBK4M2ansTOysyNtPe1YqYAmJfUXp8KXNYK2P/uhWVuGJkUdp/YkF1o15D76CnTvvbh3v3diiuVIgeOw=="], "@oslojs/asn1": ["@oslojs/asn1@1.0.0", "", { "dependencies": { "@oslojs/binary": "1.0.0" } }, "sha512-zw/wn0sj0j0QKbIXfIlnEcTviaCzYOY3V5rAyjR6YtOByFtJiT574+8p9Wlach0lZH9fddD4yb9laEAIl4vXQA=="], @@ -5175,7 +5175,7 @@ "@opentui/solid/@babel/core": ["@babel/core@7.28.0", "", { "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.0", "@babel/helper-compilation-targets": "^7.27.2", "@babel/helper-module-transforms": "^7.27.3", "@babel/helpers": "^7.27.6", "@babel/parser": "^7.28.0", "@babel/template": "^7.27.2", "@babel/traverse": "^7.28.0", "@babel/types": "^7.28.0", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", "json5": "^2.2.3", "semver": "^6.3.1" } }, "sha512-UlLAnTPrFdNGoFtbSXwcGFQBtQZJCNjaN6hQNP3UPvuNXT1i82N26KL3dZeIpNalWywr9IuQuncaAfUaS1g6sQ=="], - "@opentui/solid/@opentui/core": ["@opentui/core@0.0.0-20260303-946d7494", "", { "dependencies": { "bun-ffi-structs": "0.1.2", "diff": "8.0.2", "jimp": "1.6.0", "marked": "17.0.1", "yoga-layout": "3.2.1" }, "optionalDependencies": { "@dimforge/rapier2d-simd-compat": "^0.17.3", "@opentui/core-darwin-arm64": "0.0.0-20260303-946d7494", "@opentui/core-darwin-x64": "0.0.0-20260303-946d7494", "@opentui/core-linux-arm64": "0.0.0-20260303-946d7494", "@opentui/core-linux-x64": "0.0.0-20260303-946d7494", "@opentui/core-win32-arm64": "0.0.0-20260303-946d7494", "@opentui/core-win32-x64": "0.0.0-20260303-946d7494", "bun-webgpu": "0.1.5", "planck": "^1.4.2", "three": "0.177.0" }, "peerDependencies": { "web-tree-sitter": "0.25.10" } }, "sha512-QXA4qUQT9ZV4lD7ckY3Zxh92WpYrO5OU0pNfSKQyokLRxSRT1IWhEk3Fy/4hl+4M9T8EiLQJ2exTCw6WyN1AXg=="], + "@opentui/solid/@opentui/core": ["@opentui/core@0.0.0-20260303-1dd94f99", "", { "dependencies": { "bun-ffi-structs": "0.1.2", "diff": "8.0.2", "jimp": "1.6.0", "marked": "17.0.1", "yoga-layout": "3.2.1" }, "optionalDependencies": { "@dimforge/rapier2d-simd-compat": "^0.17.3", "@opentui/core-darwin-arm64": "0.0.0-20260303-1dd94f99", "@opentui/core-darwin-x64": "0.0.0-20260303-1dd94f99", "@opentui/core-linux-arm64": "0.0.0-20260303-1dd94f99", "@opentui/core-linux-x64": "0.0.0-20260303-1dd94f99", "@opentui/core-win32-arm64": "0.0.0-20260303-1dd94f99", "@opentui/core-win32-x64": "0.0.0-20260303-1dd94f99", "bun-webgpu": "0.1.5", "planck": "^1.4.2", "three": "0.177.0" }, "peerDependencies": { "web-tree-sitter": "0.25.10" } }, "sha512-iIX7oXBSVephXE5vJyZfEZ8N3bqprHgL5dM5aA4F2vxIKMSkPcZvLV2REnlHYoLW+IGllt2HBshu0dZZzKRr2A=="], "@opentui/solid/babel-preset-solid": ["babel-preset-solid@1.9.9", "", { "dependencies": { "babel-plugin-jsx-dom-expressions": "^0.40.1" }, "peerDependencies": { "@babel/core": "^7.0.0", "solid-js": "^1.9.8" }, "optionalPeers": ["solid-js"] }, "sha512-pCnxWrciluXCeli/dj5PIEHgbNzim3evtTn12snjqqg8QZWJNMjH1AWIp4iG/tbVjqQ72aBEymMSagvmgxubXw=="], @@ -5535,7 +5535,7 @@ "opencode/@ai-sdk/openai-compatible": ["@ai-sdk/openai-compatible@1.0.32", "", { "dependencies": { "@ai-sdk/provider": "2.0.1", "@ai-sdk/provider-utils": "3.0.20" }, "peerDependencies": { "zod": "^3.25.76 || ^4.1.8" } }, "sha512-YspqqyJPzHjqWrjt4y/Wgc2aJgCcQj5uIJgZpq2Ar/lH30cEVhgE+keePDbjKpetD9UwNggCj7u6kO3unS23OQ=="], - "opencode/@opentui/core": ["@opentui/core@0.0.0-20260303-946d7494", "", { "dependencies": { "bun-ffi-structs": "0.1.2", "diff": "8.0.2", "jimp": "1.6.0", "marked": "17.0.1", "yoga-layout": "3.2.1" }, "optionalDependencies": { "@dimforge/rapier2d-simd-compat": "^0.17.3", "@opentui/core-darwin-arm64": "0.0.0-20260303-946d7494", "@opentui/core-darwin-x64": "0.0.0-20260303-946d7494", "@opentui/core-linux-arm64": "0.0.0-20260303-946d7494", "@opentui/core-linux-x64": "0.0.0-20260303-946d7494", "@opentui/core-win32-arm64": "0.0.0-20260303-946d7494", "@opentui/core-win32-x64": "0.0.0-20260303-946d7494", "bun-webgpu": "0.1.5", "planck": "^1.4.2", "three": "0.177.0" }, "peerDependencies": { "web-tree-sitter": "0.25.10" } }, "sha512-QXA4qUQT9ZV4lD7ckY3Zxh92WpYrO5OU0pNfSKQyokLRxSRT1IWhEk3Fy/4hl+4M9T8EiLQJ2exTCw6WyN1AXg=="], + "opencode/@opentui/core": ["@opentui/core@0.0.0-20260303-1dd94f99", "", { "dependencies": { "bun-ffi-structs": "0.1.2", "diff": "8.0.2", "jimp": "1.6.0", "marked": "17.0.1", "yoga-layout": "3.2.1" }, "optionalDependencies": { "@dimforge/rapier2d-simd-compat": "^0.17.3", "@opentui/core-darwin-arm64": "0.0.0-20260303-1dd94f99", "@opentui/core-darwin-x64": "0.0.0-20260303-1dd94f99", "@opentui/core-linux-arm64": "0.0.0-20260303-1dd94f99", "@opentui/core-linux-x64": "0.0.0-20260303-1dd94f99", "@opentui/core-win32-arm64": "0.0.0-20260303-1dd94f99", "@opentui/core-win32-x64": "0.0.0-20260303-1dd94f99", "bun-webgpu": "0.1.5", "planck": "^1.4.2", "three": "0.177.0" }, "peerDependencies": { "web-tree-sitter": "0.25.10" } }, "sha512-iIX7oXBSVephXE5vJyZfEZ8N3bqprHgL5dM5aA4F2vxIKMSkPcZvLV2REnlHYoLW+IGllt2HBshu0dZZzKRr2A=="], "opencontrol/@modelcontextprotocol/sdk": ["@modelcontextprotocol/sdk@1.6.1", "", { "dependencies": { "content-type": "^1.0.5", "cors": "^2.8.5", "eventsource": "^3.0.2", "express": "^5.0.1", "express-rate-limit": "^7.5.0", "pkce-challenge": "^4.1.0", "raw-body": "^3.0.0", "zod": "^3.23.8", "zod-to-json-schema": "^3.24.1" } }, "sha512-oxzMzYCkZHMntzuyerehK3fV6A2Kwh5BD6CGEJSVDU2QNEhfLOptf2X7esQgaHZXHZY0oHmMsOtIDLP71UJXgA=="], @@ -6029,17 +6029,17 @@ "@opentui/solid/@babel/core/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], - "@opentui/solid/@opentui/core/@opentui/core-darwin-arm64": ["@opentui/core-darwin-arm64@0.0.0-20260303-946d7494", "", { "os": "darwin", "cpu": "arm64" }, "sha512-JULjCOqUskZ/v2a7rpZb7kmlh9Z7Io2ajiqKWQ/DwZy+wwykQLydlOyIg4VzK+5z6cTD0KFTiadatEgg3b3o8Q=="], + "@opentui/solid/@opentui/core/@opentui/core-darwin-arm64": ["@opentui/core-darwin-arm64@0.0.0-20260303-1dd94f99", "", { "os": "darwin", "cpu": "arm64" }, "sha512-qbj+17If3Zjt7DTZgmnP6IsGZ9eTUg0sdKBqHme2b/Y3jUQfX5sxZnxCt99WdVhzVAcEN8F2/syCL9QPt+9NRg=="], - "@opentui/solid/@opentui/core/@opentui/core-darwin-x64": ["@opentui/core-darwin-x64@0.0.0-20260303-946d7494", "", { "os": "darwin", "cpu": "x64" }, "sha512-ybwyEU+GlR/M2YfS9IHF9yzmLTixxUb2qw5UqIMZoEF1vCABq20O8vdypJRCz75rm4LqRXTajJ1w5LAsN3OQTA=="], + "@opentui/solid/@opentui/core/@opentui/core-darwin-x64": ["@opentui/core-darwin-x64@0.0.0-20260303-1dd94f99", "", { "os": "darwin", "cpu": "x64" }, "sha512-sZ9gu4v7qSQdZqMxpR7iXwOINAEln7wGi4KnWgm1VyyC203Bghyi8Zl6dUr/VBmjo4cXttfvZuPUFDB9VIl6qQ=="], - "@opentui/solid/@opentui/core/@opentui/core-linux-arm64": ["@opentui/core-linux-arm64@0.0.0-20260303-946d7494", "", { "os": "linux", "cpu": "arm64" }, "sha512-fzXnDfcoGE2OHWut6gjAtaTAXcKaNX0DS3RXOsJ4ZhwzurOaoULJRAXOWwVmdWqncftz2ao4cXeDK1dr8kqNqQ=="], + "@opentui/solid/@opentui/core/@opentui/core-linux-arm64": ["@opentui/core-linux-arm64@0.0.0-20260303-1dd94f99", "", { "os": "linux", "cpu": "arm64" }, "sha512-c94/B9IDETYuXspNVXOHPEE3yQUTfmQYkd8tsLWJRrgmR/BaIbDVRLCoFwBehsFwLGQPKq+AcUKMNB5uz+5uzQ=="], - "@opentui/solid/@opentui/core/@opentui/core-linux-x64": ["@opentui/core-linux-x64@0.0.0-20260303-946d7494", "", { "os": "linux", "cpu": "x64" }, "sha512-YPJ4aEz1O/7P9FX78rlh++ClTn/LgVlyG5FLXXUDACWafnyuu0Vdoj2SddYJaNnnhk21UpmHzfBR0cuTZUVlSw=="], + "@opentui/solid/@opentui/core/@opentui/core-linux-x64": ["@opentui/core-linux-x64@0.0.0-20260303-1dd94f99", "", { "os": "linux", "cpu": "x64" }, "sha512-SmMPDKb/SVLPxz8XL3kFWsh+1FAbXC9RAQZEBn+la3RmVlwFJ2xawLAw1VOLCNRXxz+PhRuiUbbN1zmA+nSY8Q=="], - "@opentui/solid/@opentui/core/@opentui/core-win32-arm64": ["@opentui/core-win32-arm64@0.0.0-20260303-946d7494", "", { "os": "win32", "cpu": "arm64" }, "sha512-mRoS5WJkMs40VzhWRAjA56ZPc8e7EwT91tNSpSvAYa15T0d5T55T7t2DuCWzn5Vor/JBPzPMlIHmTnX19raY5Q=="], + "@opentui/solid/@opentui/core/@opentui/core-win32-arm64": ["@opentui/core-win32-arm64@0.0.0-20260303-1dd94f99", "", { "os": "win32", "cpu": "arm64" }, "sha512-hZ3uV4GKlSOw57ZBjIc/5/+3Kr/Y+tkPwdQBnfgbm1sp9WQ3E6fXYsvML9TYhAkvOz+akw2fBuefI+suXN0J0A=="], - "@opentui/solid/@opentui/core/@opentui/core-win32-x64": ["@opentui/core-win32-x64@0.0.0-20260303-946d7494", "", { "os": "win32", "cpu": "x64" }, "sha512-mqCjwP7k460oDIy6nj3FfAz+CzPlICyv1Ksl23VQ0uV3r55SqtiWL/g8LlxCV6gwG1a2tA+FO5YGRPtrzC0xaA=="], + "@opentui/solid/@opentui/core/@opentui/core-win32-x64": ["@opentui/core-win32-x64@0.0.0-20260303-1dd94f99", "", { "os": "win32", "cpu": "x64" }, "sha512-+hVSk32sMGvZbktSrREloWOlOg8xn6g8+FdyIjID1+2LfkzkIbh7irHXoYFD+/Ia6oyn/wlB+jjoODSVdFmOeg=="], "@pierre/diffs/@shikijs/transformers/@shikijs/core": ["@shikijs/core@3.20.0", "", { "dependencies": { "@shikijs/types": "3.20.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4", "hast-util-to-html": "^9.0.5" } }, "sha512-f2ED7HYV4JEk827mtMDwe/yQ25pRiXZmtHjWF8uzZKuKiEsJR7Ce1nuQ+HhV9FzDcbIo4ObBCD9GPTzNuy9S1g=="], @@ -6199,17 +6199,17 @@ "opencode/@ai-sdk/openai-compatible/@ai-sdk/provider-utils": ["@ai-sdk/provider-utils@3.0.20", "", { "dependencies": { "@ai-sdk/provider": "2.0.1", "@standard-schema/spec": "^1.0.0", "eventsource-parser": "^3.0.6" }, "peerDependencies": { "zod": "^3.25.76 || ^4.1.8" } }, "sha512-iXHVe0apM2zUEzauqJwqmpC37A5rihrStAih5Ks+JE32iTe4LZ58y17UGBjpQQTCRw9YxMeo2UFLxLpBluyvLQ=="], - "opencode/@opentui/core/@opentui/core-darwin-arm64": ["@opentui/core-darwin-arm64@0.0.0-20260303-946d7494", "", { "os": "darwin", "cpu": "arm64" }, "sha512-JULjCOqUskZ/v2a7rpZb7kmlh9Z7Io2ajiqKWQ/DwZy+wwykQLydlOyIg4VzK+5z6cTD0KFTiadatEgg3b3o8Q=="], + "opencode/@opentui/core/@opentui/core-darwin-arm64": ["@opentui/core-darwin-arm64@0.0.0-20260303-1dd94f99", "", { "os": "darwin", "cpu": "arm64" }, "sha512-qbj+17If3Zjt7DTZgmnP6IsGZ9eTUg0sdKBqHme2b/Y3jUQfX5sxZnxCt99WdVhzVAcEN8F2/syCL9QPt+9NRg=="], - "opencode/@opentui/core/@opentui/core-darwin-x64": ["@opentui/core-darwin-x64@0.0.0-20260303-946d7494", "", { "os": "darwin", "cpu": "x64" }, "sha512-ybwyEU+GlR/M2YfS9IHF9yzmLTixxUb2qw5UqIMZoEF1vCABq20O8vdypJRCz75rm4LqRXTajJ1w5LAsN3OQTA=="], + "opencode/@opentui/core/@opentui/core-darwin-x64": ["@opentui/core-darwin-x64@0.0.0-20260303-1dd94f99", "", { "os": "darwin", "cpu": "x64" }, "sha512-sZ9gu4v7qSQdZqMxpR7iXwOINAEln7wGi4KnWgm1VyyC203Bghyi8Zl6dUr/VBmjo4cXttfvZuPUFDB9VIl6qQ=="], - "opencode/@opentui/core/@opentui/core-linux-arm64": ["@opentui/core-linux-arm64@0.0.0-20260303-946d7494", "", { "os": "linux", "cpu": "arm64" }, "sha512-fzXnDfcoGE2OHWut6gjAtaTAXcKaNX0DS3RXOsJ4ZhwzurOaoULJRAXOWwVmdWqncftz2ao4cXeDK1dr8kqNqQ=="], + "opencode/@opentui/core/@opentui/core-linux-arm64": ["@opentui/core-linux-arm64@0.0.0-20260303-1dd94f99", "", { "os": "linux", "cpu": "arm64" }, "sha512-c94/B9IDETYuXspNVXOHPEE3yQUTfmQYkd8tsLWJRrgmR/BaIbDVRLCoFwBehsFwLGQPKq+AcUKMNB5uz+5uzQ=="], - "opencode/@opentui/core/@opentui/core-linux-x64": ["@opentui/core-linux-x64@0.0.0-20260303-946d7494", "", { "os": "linux", "cpu": "x64" }, "sha512-YPJ4aEz1O/7P9FX78rlh++ClTn/LgVlyG5FLXXUDACWafnyuu0Vdoj2SddYJaNnnhk21UpmHzfBR0cuTZUVlSw=="], + "opencode/@opentui/core/@opentui/core-linux-x64": ["@opentui/core-linux-x64@0.0.0-20260303-1dd94f99", "", { "os": "linux", "cpu": "x64" }, "sha512-SmMPDKb/SVLPxz8XL3kFWsh+1FAbXC9RAQZEBn+la3RmVlwFJ2xawLAw1VOLCNRXxz+PhRuiUbbN1zmA+nSY8Q=="], - "opencode/@opentui/core/@opentui/core-win32-arm64": ["@opentui/core-win32-arm64@0.0.0-20260303-946d7494", "", { "os": "win32", "cpu": "arm64" }, "sha512-mRoS5WJkMs40VzhWRAjA56ZPc8e7EwT91tNSpSvAYa15T0d5T55T7t2DuCWzn5Vor/JBPzPMlIHmTnX19raY5Q=="], + "opencode/@opentui/core/@opentui/core-win32-arm64": ["@opentui/core-win32-arm64@0.0.0-20260303-1dd94f99", "", { "os": "win32", "cpu": "arm64" }, "sha512-hZ3uV4GKlSOw57ZBjIc/5/+3Kr/Y+tkPwdQBnfgbm1sp9WQ3E6fXYsvML9TYhAkvOz+akw2fBuefI+suXN0J0A=="], - "opencode/@opentui/core/@opentui/core-win32-x64": ["@opentui/core-win32-x64@0.0.0-20260303-946d7494", "", { "os": "win32", "cpu": "x64" }, "sha512-mqCjwP7k460oDIy6nj3FfAz+CzPlICyv1Ksl23VQ0uV3r55SqtiWL/g8LlxCV6gwG1a2tA+FO5YGRPtrzC0xaA=="], + "opencode/@opentui/core/@opentui/core-win32-x64": ["@opentui/core-win32-x64@0.0.0-20260303-1dd94f99", "", { "os": "win32", "cpu": "x64" }, "sha512-+hVSk32sMGvZbktSrREloWOlOg8xn6g8+FdyIjID1+2LfkzkIbh7irHXoYFD+/Ia6oyn/wlB+jjoODSVdFmOeg=="], "opencontrol/@modelcontextprotocol/sdk/express": ["express@5.2.1", "", { "dependencies": { "accepts": "^2.0.0", "body-parser": "^2.2.1", "content-disposition": "^1.0.0", "content-type": "^1.0.5", "cookie": "^0.7.1", "cookie-signature": "^1.2.1", "debug": "^4.4.0", "depd": "^2.0.0", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "etag": "^1.8.1", "finalhandler": "^2.1.0", "fresh": "^2.0.0", "http-errors": "^2.0.0", "merge-descriptors": "^2.0.0", "mime-types": "^3.0.0", "on-finished": "^2.4.1", "once": "^1.4.0", "parseurl": "^1.3.3", "proxy-addr": "^2.0.7", "qs": "^6.14.0", "range-parser": "^1.2.1", "router": "^2.2.0", "send": "^1.1.0", "serve-static": "^2.2.0", "statuses": "^2.0.1", "type-is": "^2.0.1", "vary": "^1.1.2" } }, "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw=="], diff --git a/packages/opencode/package.json b/packages/opencode/package.json index 2953a3e8c8..91b262666f 100644 --- a/packages/opencode/package.json +++ b/packages/opencode/package.json @@ -91,8 +91,8 @@ "@opencode-ai/sdk": "workspace:*", "@opencode-ai/util": "workspace:*", "@openrouter/ai-sdk-provider": "1.5.4", - "@opentui/core": "0.0.0-20260303-946d7494", - "@opentui/solid": "0.0.0-20260303-946d7494", + "@opentui/core": "0.0.0-20260303-1dd94f99", + "@opentui/solid": "0.0.0-20260303-1dd94f99", "@parcel/watcher": "2.5.1", "@pierre/diffs": "catalog:", "@solid-primitives/event-bus": "1.1.2", diff --git a/packages/opencode/src/cli/cmd/tui/plugin.ts b/packages/opencode/src/cli/cmd/tui/plugin.ts index 15f8851e43..d1b53ac3d8 100644 --- a/packages/opencode/src/cli/cmd/tui/plugin.ts +++ b/packages/opencode/src/cli/cmd/tui/plugin.ts @@ -15,8 +15,6 @@ import { BunProc } from "@/bun" import { Instance } from "@/project/instance" import { registerThemes } from "./context/theme" import { existsSync } from "fs" -import { tmpdir } from "os" -import { fileURLToPath, pathToFileURL } from "url" export namespace TuiPlugin { const log = Log.create({ service: "tui.plugin" }) @@ -36,34 +34,6 @@ export namespace TuiPlugin { return BunProc.install(pkg, version) } - async function module(path: string) { - if (!path.startsWith("file://")) { - return import(path) - } - const file = fileURLToPath(path) - if (!file.endsWith(".tsx") && !file.endsWith(".jsx")) { - return import(path) - } - const build = await Bun.build({ - entrypoints: [file], - target: "bun", - format: "esm", - minify: false, - write: false, - }) - if (!build.success || !build.outputs[0]) { - log.error("failed to build local tui plugin", { - path, - logs: build.logs, - }) - return - } - const text = await build.outputs[0].text() - const out = `${tmpdir()}/opencode-tui-plugin-${Bun.hash(path)}-${Date.now()}.mjs` - await Bun.write(out, text) - return import(pathToFileURL(out).href) - } - function slot(entry: unknown) { if (!entry || typeof entry !== "object") return if ("id" in entry && typeof entry.id === "string" && "slots" in entry && typeof entry.slots === "object") { @@ -122,7 +92,7 @@ export namespace TuiPlugin { }) if (!path) continue - const mod = await module(path).catch((error) => { + const mod = await import(path).catch((error) => { log.error("failed to load tui plugin", { path: spec, error }) return })