-
Notifications
You must be signed in to change notification settings - Fork 1
feat(slack): webClientOptions + @mention-in-URL fix + stable link-button action_id (chat@4.31) #155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
7a9638d
a6b29b0
30c6842
0170d85
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,6 +49,23 @@ class SlackAdapterConfig: | |
| # ``slackApiUrl`` (vercel/chat 6b17c60). Useful for proxies, Slack-API | ||
| # mocks in tests, or Enterprise-routed deployments. | ||
| api_url: str | None = None | ||
| # Extra keyword arguments forwarded to every ``slack_sdk`` client the | ||
| # adapter builds — the default ``AsyncWebClient``, the per-token async | ||
| # cache, and the synchronous ``WebClient`` escape hatch. Gated on | ||
| # ``is not None`` so an explicit empty ``{}`` still spreads (a no-op). | ||
| # | ||
| # DIVERGENCE (vercel/chat 8336a3e): upstream forwards ``webClientOptions`` | ||
| # to ``@slack/web-api``'s ``WebClient`` (an axios-backed client), so its | ||
| # most useful keys are ``retryConfig`` and ``timeout``. There is no 1:1 | ||
| # mapping in ``slack_sdk``: it has no ``retryConfig``/``rejectRateLimitedCalls`` | ||
| # — retry behavior is configured via ``retry_handlers`` (a list of | ||
| # ``slack_sdk.http_retry.RetryHandler``), and ``timeout`` is an int of | ||
| # seconds. So these map to **slack_sdk WebClient kwargs**, not axios options. | ||
| # Example: ``web_client_options={"timeout": 15, "retry_handlers": [...]}``. | ||
| # ``headers`` (a dict) is deep-copied per client so cached per-token clients | ||
| # never share a mutable dict and caller input is never mutated. See the | ||
| # ``webClientOptions`` divergence row in docs/UPSTREAM_SYNC.md. | ||
| web_client_options: dict[str, Any] | None = None | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Because Useful? React with 👍 / 👎. |
||
| # App-level token (xapp-...). Required when ``mode == "socket"``. | ||
| app_token: str | None = None | ||
| # Bot token (xoxb-...). Required for single-workspace mode. Omit for multi-workspace. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Truncate explicit
idbefore assigning Slackaction_id.Line 242 applies truncation only in the URL-fallback branch; a provided
idis used unbounded. Very long ids can exceed Slack’saction_idlimit and fail at runtime. Please enforce one shared max-length path for both explicit-id and fallback-id generation.Suggested fix
🤖 Prompt for AI Agents