Files
plugins/packages/workbuddy/package.json
T
yetone b5cc78266f workbuddy 0.2.5: the filter's line is taken out with the newlines around it (#540)
itspig (#540, 2026-10-30) ran 0.2.4 against copilot.tencent.com and the
refusal still reached the agent. The real chunk's content is
"\nSorry, I can't respond to this question.\n" with finish_reason
content_filter. filterSaid trimmed only the start, so the trailing "\n"
made the text longer than FILTER_SAYS, the prefix test failed, and the
chunk went out as an ordinary answer.

filterSaid now trims both sides, and text that is only white space so
far may still be the line (so a "\n" sent in a chunk of its own is held,
not passed on). The reporter's suggested `t.startsWith(s)` is not taken:
it would treat the line followed by real words as the filter's and drop
those words at content_filter. `without` already removes the whole
content field, so the newlines go with it.

Run (on mote, mote-run):
- HOME=$(mktemp -d) bun test packages/workbuddy: 286 pass, 0 fail.
- bun scripts/check.mjs: ok.
- filtered.test.mjs has itspig's literal last three SSE events (the
  " node" reasoning chunk, the refusal chunk, [DONE]), cut every 1, 7
  and 1MiB bytes, plus newline-in-its-own-chunk, line-then-more-words
  and newline-then-answer cases.

Broken by hand:
- 0.2.4's trimStart filterSaid: the 3 literal-bytes tests and the
  own-chunk newline test go red (4 of 15).
- The reporter's trim() + t.startsWith(s) with t !== "": the own-chunk
  newline and line-then-more-words tests go red (2 of 15).

Not tried: a live WorkBuddy account; the trigger prompt was not run.
2026-10-31 07:11:51 +08:00

25 lines
611 B
JSON

{
"name": "@magpie-community/opencode-workbuddy-auth",
"version": "0.2.5",
"description": "OpenCode provider plugins for WorkBuddy's plans: WorkBuddy (CodeBuddy, copilot.tencent.com) and WorkBuddy AI (www.workbuddy.ai)",
"type": "module",
"main": "./index.mjs",
"exports": "./index.mjs",
"files": [
"index.mjs",
"README.md"
],
"keywords": [
"opencode",
"opencode-plugin",
"workbuddy",
"codebuddy"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/magpie-community/plugins.git",
"directory": "packages/workbuddy"
}
}