From 89750c9ce39d3f827a348624f8a8b66ce3ca7469 Mon Sep 17 00:00:00 2001 From: licat <1834199672@qq.com> Date: Tue, 23 Jun 2026 19:32:39 +0800 Subject: [PATCH] fix: add tiktoken as a direct dependency @anthropic-ai/tokenizer requires tiktoken (tiktoken/lite), but tiktoken was only a transitive dependency. opencode's plugin installer does not always install it into the plugin cache, so importing the plugin entry throws "Cannot find module 'tiktoken/lite'" and opencode silently drops the whole plugin (no /dcp or /dcp-compress commands, no compress tool, and no debug logs even with debug enabled). Promoting tiktoken to a direct dependency makes the installer fetch it reliably. Closes #575 --- package-lock.json | 3 ++- package.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1496512d..526dc70f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,8 @@ "@opentui/core": "^0.2.16", "@opentui/solid": "^0.2.16", "jsonc-parser": "^3.3.1", - "solid-js": "^1.9.12" + "solid-js": "^1.9.12", + "tiktoken": "^1.0.10" }, "devDependencies": { "@opencode-ai/plugin": "^1.4.3", diff --git a/package.json b/package.json index e298720c..1fbd2def 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,8 @@ "@opentui/core": "^0.2.16", "@opentui/solid": "^0.2.16", "jsonc-parser": "^3.3.1", - "solid-js": "^1.9.12" + "solid-js": "^1.9.12", + "tiktoken": "^1.0.10" }, "devDependencies": { "@opencode-ai/plugin": "^1.4.3",