Files
plugins/packages/tabbit/package.json
T
yetone af7b4cc765 tabbit 0.1.4: a turn's prompt stays under Tabbit's character limit, so long transcripts stop coming back as 492 (#833)
Tabbit refuses a turn whose content is 20,500 characters or more. The answer is code 492 inside the SSE stream, after about 40s. The reporter measured it on 0.1.3: 20,490 characters pass and 20,500 fail. The limit counts characters, not bytes: 61 KB of Chinese at 20,410 characters passed. Concurrency of 2 and 4 didn't reproduce it. An OpenCode agent's system prompt plus the flattened history reaches that size quickly.

flatten now keeps a new room's prompt within 18,000 characters. It keeps, in order, the final user message (at most two thirds), the system prompt (up to 60% of what is left when there are earlier turns), and the earlier turns newest first. A turn that doesn't fit is clipped to its head and tail, or left out with an "[earlier conversation omitted]" note. A continued room's single message is clipped to the same limit.

Run: on a separate test Mac, `npm test` in packages/tabbit passed 88 of 88, and `bun scripts/check.mjs tabbit` was ok.

Broken by hand: with 0.1.3's index.mjs, the 4 new limit tests fail. A property test over system, turn-count and length sizes first caught two budget slips (18,029 and 18,016 characters), both fixed.

Not tried: a real Tabbit turn. I have no Tabbit account. The reporter offered to run their OpenCode case again.

Reported-by: Beyfish <Beyfish@users.noreply.github.com>
2026-11-13 00:26:53 +08:00

52 lines
1.2 KiB
JSON

{
"name": "@magpie-community/opencode-tabbit-auth",
"version": "0.1.4",
"description": "Tabbit (web.tabbit.com and web.tabbit.ai) as a magpie / OpenCode provider: live model catalog, cookie sign-in, chat completions, cycle usage and the daily check-in",
"type": "module",
"main": "./opencode.mjs",
"exports": {
".": "./opencode2.mjs"
},
"files": [
"index.mjs",
"opencode.mjs",
"opencode2.mjs",
"src/",
"README.md",
"LICENSE"
],
"keywords": [
"magpie",
"magpie-plugin",
"opencode",
"opencode-plugin",
"tabbit",
"provider",
"llm-gateway"
],
"license": "MIT",
"engines": {
"node": ">=22"
},
"scripts": {
"test": "node --test tests/*.test.mjs"
},
"magpie": {
"icon": "https://web.tabbit.com/favicon.ico",
"maxConcurrency": 1
},
"homepage": "https://github.com/magpie-community/plugins/tree/main/packages/tabbit#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/magpie-community/plugins.git",
"directory": "packages/tabbit"
},
"bugs": {
"url": "https://github.com/magpie-community/plugins/issues"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
}
}