Skip to content

feat(core): add message delete endpoint#14417

Merged
jlongster merged 1 commit intoanomalyco:devfrom
shantur:feature/delete-message2
Feb 25, 2026
Merged

feat(core): add message delete endpoint#14417
jlongster merged 1 commit intoanomalyco:devfrom
shantur:feature/delete-message2

Conversation

@shantur
Copy link
Contributor

@shantur shantur commented Feb 20, 2026

Issue for this PR

New feature, no issue

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Implements a new endpoint to delete a message

If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!

How did you verify your code works?

successfully deleted a message from session ses_3856a441fffeNPKUMd59ZhzdA0.

Fetched session OK: GET /session/ses_3856a441fffeNPKUMd59ZhzdA0 returned 200.
Listed messages: 4 total.
Deleted this message:
DELETE /session/ses_3856a441fffeNPKUMd59ZhzdA0/message/msg_c7a95e59d001P9Kkp9FE4jm1ED
Response: 200 with body true

Screenshots / recordings

If this is a UI change, please include a screenshot or recording.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

@github-actions
Copy link
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • No issue referenced. Please add Closes #<number> linking to the relevant issue.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. contributor needs:issue labels Feb 20, 2026
@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions bot closed this Feb 20, 2026
@rekram1-node rekram1-node reopened this Feb 20, 2026
@rekram1-node rekram1-node removed needs:issue needs:compliance This means the issue will auto-close after 2 hours. labels Feb 20, 2026
@shantur shantur force-pushed the feature/delete-message2 branch from 204d23c to bcc4c3c Compare February 20, 2026 20:20
@github-actions github-actions bot added needs:issue needs:compliance This means the issue will auto-close after 2 hours. labels Feb 20, 2026
@R44VC0RP R44VC0RP removed the needs:compliance This means the issue will auto-close after 2 hours. label Feb 20, 2026
@R44VC0RP R44VC0RP requested a review from jlongster February 20, 2026 20:24
.from(MessageTable)
.where(and(eq(MessageTable.id, input.messageID), eq(MessageTable.session_id, input.sessionID)))
.get()
if (!row) throw new NotFoundError({ message: `Message not found: ${input.messageID}` })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this changed? the delete won't error, is there a use case you have for making this error? we don't have this pattern anywhere else in session

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API could delete message that didn't belong to session by providing a message id from different session

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're right to fix that, but I think it's good enough to add the session_id to the where clause. We don't check and error like this in any of the other APIs, can you change that?

Can you also add session_id to the where clause in removePart too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jlongster - Done

@shantur shantur force-pushed the feature/delete-message2 branch from bcc4c3c to 8a2a43f Compare February 20, 2026 23:35
@github-actions github-actions bot added the needs:compliance This means the issue will auto-close after 2 hours. label Feb 20, 2026
@github-actions
Copy link
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions bot closed this Feb 20, 2026
@R44VC0RP R44VC0RP removed the needs:compliance This means the issue will auto-close after 2 hours. label Feb 21, 2026
@R44VC0RP R44VC0RP reopened this Feb 21, 2026
@jlongster jlongster added the beta label Feb 23, 2026
@jlongster jlongster merged commit 79b5ce5 into anomalyco:dev Feb 25, 2026
12 of 15 checks passed
neostfox pushed a commit to neostfox/opencode that referenced this pull request Feb 26, 2026
sebishogun pushed a commit to sebishogun/opencode that referenced this pull request Feb 26, 2026
jonathanmiddleton pushed a commit to jonathanmiddleton/opencode that referenced this pull request Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants