Providers: unify history context wrappers#672
Conversation
PR SummaryCentralizes and standardizes group history context across providers; clarifies command vs prompt bodies and config overrides.
Written by Cursor Bugbot for commit 279ae30. This will update automatically on new commits. Configure here. |
|
Summary:
Testing:
|
|
Update:
Testing:
|
|
Refactor: centralized history wrapping via new history helper (append+build+clear) and applied across Slack/Discord/Telegram/Signal/iMessage/MSTeams. Tests: pnpm lint; pnpm vitest run src/auto-reply/reply/history.test.ts. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 585147ca24
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const groupHistoryLimit = | ||
| cfg.messages?.groupChat?.historyLimit ?? DEFAULT_GROUP_HISTORY_LIMIT; | ||
| cfg.whatsapp?.accounts?.[tuning.accountId ?? ""]?.historyLimit ?? | ||
| cfg.whatsapp?.historyLimit ?? |
There was a problem hiding this comment.
Honor default account historyLimit in web provider
The account-specific override lookup uses tuning.accountId ?? "", so when monitorWebProvider is called without an explicit account id (documented as defaulting to "default") or with a non-normalized id, the lookup misses whatsapp.accounts.<id>.historyLimit and silently falls back to the global/default limit. That makes per-account history tuning (including disabling with 0) ineffective for the default account in this code path. Consider indexing with the resolved/normalized account.accountId (or DEFAULT_ACCOUNT_ID) so the override is honored consistently.
Useful? React with 👍 / 👎.
ddbc9e5 to
279ae30
Compare
|
Merged via rebase onto main and fast-forwarded. Full gate: pnpm lint && pnpm build && pnpm test && pnpm docs:list. Landed commits: d41372b (feat: unify provider history context), c0a0103 (docs: document history context overrides), b977ae1 (chore: fix lint and typing), 82f71d2 (refactor: centralize history context wrapping), 801e7dd (docs: update changelog for unified history). |
Summary
Testing