Skip to content

feat(state): add removeFromList to StateAdapter#234

Closed
matchai wants to merge 2 commits intoslack-at-mentions-from-markdownfrom
feat/state-remove-from-list
Closed

feat(state): add removeFromList to StateAdapter#234
matchai wants to merge 2 commits intoslack-at-mentions-from-markdownfrom
feat/state-remove-from-list

Conversation

@matchai
Copy link
Member

@matchai matchai commented Mar 13, 2026

Adds removeFromList(key, value) to the StateAdapter interface, completing the list CRUD (appendToList, getList, removeFromList).

Removes the first occurrence of value from the list at key. Returns true if an element was removed, false if not found.

Implementations

  • memory: JSON.stringify comparison + splice
  • redis: Lua LREM key 1 value
  • ioredis: Lua LREM key 1 value
  • pg: DELETE ... WHERE ctid = (SELECT ctid ... LIMIT 1)
  • mock adapters: same as memory

Stacks on #230.

@vercel
Copy link
Contributor

vercel bot commented Mar 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat Ready Ready Preview, Comment, Open in v0 Mar 13, 2026 5:19am
chat-sdk-nextjs-chat Ready Ready Preview, Comment, Open in v0 Mar 13, 2026 5:19am

@matchai matchai changed the title Add removeFromList to StateAdapter feat(state): add removeFromList to StateAdapter Mar 13, 2026
@matchai
Copy link
Member Author

matchai commented Mar 13, 2026

Superseded by combined PR — removeFromList no longer needed for this fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant