Repository navigation
fix: Telegram plugin binding, push dedupe, model list, /current - #1
Merged
Merged
Conversation
Correct several V2 plugin bugs: unbind chats on session switch,
deliver session.text.ended using event text with ordinal keys,
share pending/delivered locks between event and wait fallback paths,
parse ctx.model.list() as { data }, resolve /current via session.viewed
plus order=desc, start the bot on any lock-winning location, escape
Markdown, and surface permission.asked with inline replies.
Co-authored-by: HenryYannis <HenryYannis@users.noreply.github.com>
Add Node 20/22 CI with syntax check, unit tests for binding/delivery helpers, package convention validation, smoke import, and pack dry-run. Extract pure helpers to src/util.js so CI can cover them without a live OpenCode host. Co-authored-by: HenryYannis <HenryYannis@users.noreply.github.com>
Bash does not expand ** without globstar, so Node 20 treated test/**/*.test.js as a literal path. Use test/*.test.js instead. Co-authored-by: HenryYannis <HenryYannis@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the high-priority bugs found in the OpenCode V2 plugin review, and adds a conventional CI pipeline.
Bug fixes
bindChatnow removes the chat from the previous session’ssessionToChatsset.session.text.ended’sdata.textwithmsgID:ordinaldedupe so multi-segment assistant replies are not dropped; event +wait()fallback share delivery locks to avoid duplicates.ctx.model.list()and correctly reads{ data: ModelInfo[] }; config parse is fallback only. Pins@opencode/pluginto^2.2.0.session.viewed, lists withorder: "desc"(not limited to home), and no longer requires the home location to start the bot (file lock singleton).permission.askednotifies bound chats with once/always/reject buttons;drop_pending_updates: trueon bot start.CI
push/pull_requesttomainengines.node >= 20)npm ci→ syntax check → unit tests → OpenCode package validation → smoke import →npm pack --dry-runsrc/util.jswithnode:testcoverageTest plan
telegram.jsonconfigured, reload OpenCode and confirm the bot starts from a project directory (not only$HOME)./currentattaches to the last viewed / most recently updated session across projects./sessionsthen reply in the old desktop session — phone should not receive that old session’s messages./modellists models via API even whenopencode.jsonhas no per-model overrides.