rework command framework#59
Draft
timkpaine wants to merge 2 commits into
Draft
Conversation
Contributor
82c8446 to
c63df45
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #59 +/- ##
===========================================
+ Coverage 66.41% 80.27% +13.86%
===========================================
Files 30 40 +10
Lines 1694 3756 +2062
Branches 171 289 +118
===========================================
+ Hits 1125 3015 +1890
- Misses 537 665 +128
- Partials 32 76 +44 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
345607e to
28944fc
Compare
a6e9061 to
4c789bb
Compare
d7f6b2b to
60b1971
Compare
Replace the per-backend, string-formatted command system with a typed, backend-agnostic command framework built on chatom's FormattedMessage rendering. - New command framework: declarative `Command`/`CommandModel`, a `CommandContext`, a command executor, and a `LegacyCommandAdapter` so existing `BaseCommand` subclasses keep working. - Load commands via entrypoints and enforce per-backend compatibility. - Migrate commands to concrete chatom types and render built-in command output through `FormattedMessage`/`convert_format` instead of hand-crafted per-backend strings. - Add agent commands, a persistence layer for scheduled/deferred commands, and supporting tests. - Require `chatom>=0.1.3`, which provides the format APIs (`convert_format`, `FormattedMessage`, tables) this framework uses. Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
60b1971 to
5927688
Compare
Help command no longer emits a Markdown table on every backend. It now builds a chatom FormattedMessage from generic nodes and renders per backend via render_for(): a bulleted list on chat clients (Discord, Slack, Telegram) and a table on Symphony. All platform markup stays in chatom; no backend-specific formatting leaks into the command. DM detection relies on the generic Message.is_dm plus chatom's ChannelType (direct/group) on the channel object and on metadata["channel_type"], and resolves channel_id from metadata["channel_id"] when the channel object is absent. Drops the Discord-API magic integers and raw-object inspection in favor of the fields chatom populates. Adds help-rendering tests per backend and DM-detection tests for the generic channel-type and metadata paths.
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.
No description provided.