Commit Graph

59 Commits

Author SHA1 Message Date
github-actions[bot] c0c0b1ec6f Version Packages (#53)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-18 11:40:12 -08:00
Vishal Yathish 8c50252d00 [chat] add support for slash commands (#50)
* [chat] add support for slash commands

* add comprehensive tests

* add documentation

* adding changeset
2026-02-18 08:32:44 -08:00
Malte Ubl 446df01e75 [RFC] Add Channel abstraction as first-class citizen alongside Thread (#46)
* [chat] add Channel abstraction as first-class citizen alongside Thread

Introduces a Channel concept — the container that holds threads — enabling
channel-level operations, thread-to-channel navigation, and natural support
for threadless platforms (iMessage, WhatsApp, SMS).

Design:

- Postable base interface: shared by both Thread and Channel, providing id,
  adapter, isDM, state/setState, messages (newest-first async iterator),
  post, postEphemeral, startTyping, mentionUser. Enables polymorphic code
  that works with either entity.

- Channel interface (extends Postable): adds name, threads() async iterator,
  and fetchInfo(). ChannelImpl provides the concrete implementation with
  backward message pagination, thread listing, posting, state management
  (channel-state: key prefix), and workflow serialization (chat:Channel).

- Thread updates: Thread now extends Postable and gains a `channel` getter
  (lazy-created, cached ChannelImpl) and a `messages` getter (newest-first
  backward iterator) alongside the existing `allMessages` (oldest-first).

- Channel ID format: derived from thread IDs by dropping the thread part.
  Default: first two colon-separated parts (slack:C123, gchat:spaces/ABC).
  Adapters override via optional channelIdFromThreadId() method.

- Adapter interface additions (all optional): channelIdFromThreadId,
  fetchChannelMessages, listThreads, fetchChannelInfo, postChannelMessage.

- Chat class: chat.channel(channelId) method creates a Channel by ID,
  auto-inferring adapter from the prefix. Reviver handles chat:Channel.

- Slack adapter: implements all five channel methods using
  conversations.history (vs conversations.replies for threads),
  conversations.info, and chat.postMessage without thread_ts.

- Mock adapter: updated with all channel methods for testing.

- 32 new tests covering ChannelImpl, thread.channel, deriveChannelId,
  and the backward messages iterator.

Usage:

  // Navigate from thread to channel
  const channel = thread.channel;

  // Get a channel directly
  const channel = chat.channel("slack:C123ABC");

  // Iterate messages newest first
  for await (const msg of channel.messages) { ... }

  // List threads in a channel
  for await (const t of channel.threads()) { ... }

  // Post to channel top-level
  await channel.post("Hello channel!");

TODO:
- Add replay tests for channel operations against recorded webhook data
- Implement channel methods in non-Slack adapters (GChat, Teams, Discord,
  GitHub, Linear) — currently they fall back to the default/no-op behavior

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* channel-post-sample

* Better metadata

* Fix bug

* Fixes

* Other adapters

* Fix-gchat

* Fix-discord

* Fix-discord-threads

* Discord replay

* Teams tests and fix pre-existing failures

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-16 17:09:51 -08:00
github-actions[bot] 5a7a925983 Version Packages (#48)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-15 17:25:51 -08:00
Vishal Yathish 417374b844 [chat] add inline select components (#45)
* [chat] add inline select components

* changeset

* adding radio buttons

* adding unit tests

* add documentation for the new components

* add replay tests
2026-02-15 17:18:53 -08:00
github-actions[bot] 25bf3765fd Version Packages (#44)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-14 21:53:20 -08:00
Vishal Yathish f7cdd29641 [modals] enable modals from ephemeral messages (#42)
* [modals] enable modals from ephemeral messages

* add replay tests

* edit in place
2026-02-14 21:40:58 -08:00
github-actions[bot] b670cb18b6 Version Packages (#41)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-14 17:23:32 -08:00
Nicolás Montone c7d51cb8f4 add support for privatemetadata in slack adapter (#40)
* add private metadata in chat adapter

* add test on jsx runtime

* changeset
2026-02-14 17:17:03 -08:00
github-actions[bot] 34cb4cd0da Version Packages 2026-02-12 21:34:50 +00:00
John Pham 8c03dd65e5 Fix actions fallback in all adapters and core package
Discord, Linear, GitHub adapters and core chat package each had
their own childToFallbackText with the same [label] pattern.
2026-02-12 11:17:55 -08:00
github-actions[bot] 5d9ce3044d Version Packages 2026-02-10 02:17:57 +00:00
github-actions[bot] 37783fa1a5 Version Packages 2026-02-06 20:20:05 +00:00
Fernando Rojo acf570ac40 Merge pull request #30 from vercel-labs/f/linear
feat: add Linear adapter
2026-02-06 12:42:56 -05:00
github-actions[bot] 5189f6f216 Version Packages (#31)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-05 17:41:12 -08:00
Fernando Rojo 154dda0965 linear 2026-02-05 19:52:12 -05:00
Fernando Rojo 0b4899c8fc emoji support 2026-01-31 21:33:28 -05:00
github-actions[bot] a49a7f0b18 Version Packages (#26)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-23 22:41:41 -08:00
Vishal Yathish 160f1f7d59 [chat] fetch event relatedMessage separately (#25)
* [chat] fetch event message separately

* add replay tests

* remove logs

* add changeset

* pass context between modal frames

* remove dividers

* remove unused export
2026-01-23 21:44:53 -08:00
github-actions[bot] ed493ebc78 Version Packages 2026-01-23 03:47:11 +00:00
Vishal Yathish f696f9e9e3 bugfix 2026-01-22 17:37:52 -08:00
Vishal Yathish b6521b3a4d clean up 2026-01-22 16:56:34 -08:00
Vishal Yathish 0b8822eb88 clean up 2026-01-22 15:45:27 -08:00
Vishal Yathish 660a84ee09 cleanup 2026-01-22 15:30:44 -08:00
Vishal Yathish e84cbf4187 [chat] add relatedThread and relatedMessage props to modal events 2026-01-22 13:19:09 -08:00
github-actions[bot] e528c69064 Version Packages 2026-01-21 20:08:34 +00:00
Fernando Rojo 70bca43f51 lint 2026-01-21 15:00:17 -05:00
Fernando Rojo b03cbd7130 add <LinkButton> 2026-01-21 14:54:48 -05:00
github-actions[bot] d67c9f4fa8 Version Packages 2026-01-21 18:01:03 +00:00
Fernando Rojo 8073eae795 fix: lint 2026-01-21 12:23:59 -05:00
Fernando Rojo fb11ec99a3 fix ci 2026-01-21 11:40:55 -05:00
Fernando Rojo dbc65dfd39 Merge branch 'main' into ephemeral 2026-01-21 11:34:28 -05:00
github-actions[bot] 754a3e9eba Version Packages (#17)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-20 20:05:11 -08:00
Malte Ubl 1882732df5 no chat 2026-01-20 19:54:01 -08:00
Malte Ubl 9e8f9e7425 Serde for Thread and Message (#10)
* Serde for Thread and Message

* Refactor

* serde

* message
2026-01-20 19:24:12 -08:00
Vishal Yathish 85609315d7 [chat] add private metadata/threadId to onModalClose events 2026-01-20 16:57:02 -08:00
Fernando Rojo 8d4878ec7b ephemeral messages 2026-01-20 19:50:20 -05:00
github-actions[bot] 6e9300aaf9 Version Packages 2026-01-20 20:26:20 +00:00
Vishal Yathish 60873154cb bugfixes 2026-01-20 10:41:50 -08:00
Vishal Yathish a488dbf118 [chat] add support for modals and form inputs + add to slack adapter 2026-01-20 10:20:08 -08:00
github-actions[bot] 0ecfad73f7 Version Packages (#8)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-04 19:09:42 -08:00
Malte Ubl 94eb6504d7 discord-ws12 2026-01-04 15:12:25 -08:00
Malte Ubl 07a6cafb48 discord-ws11 2026-01-04 15:06:19 -08:00
Malte Ubl 125ffa14a2 discord-ws10 2026-01-04 14:54:15 -08:00
Malte Ubl a300bc4c54 discord-ws9 2026-01-04 14:48:55 -08:00
Malte Ubl 1f127c3eea discord-ws4 2026-01-04 14:12:16 -08:00
Malte Ubl 78c27ec8f8 discord-ws3 2026-01-04 14:07:05 -08:00
Malte Ubl 50f06527e7 Add discord adapter (#7)
* Implement a discord adapter

* Integration tests
2026-01-04 12:44:34 -08:00
Malte Ubl a5464069b9 More refactoring 2026-01-04 09:32:55 -08:00
Malte Ubl 7e8826f9c2 Required-logger 2026-01-04 09:12:45 -08:00