Menu

Chat SDK adds message subjects and direct SDK access - Vercel
📰
0

Chat SDK adds message subjects and direct SDK access - Vercel

Vercel News·Ben Sabic·4 days ago
#JVtn9iw6
#vercel#subject#issue#message#await#slack
Reading 0:00
15s threshold

You can now read the parent issue or pull request when your bot is mentioned in a Linear or GitHub comment. message.subject resolves to that parent with title, status, URL, and the full typed payload. bot . onNewMention ( async ( thread , message ) => { const subject = await message . subject ; if ( subject ) { await thread . post ( ` This is about: ${ subject . title } ( ${ subject . status } )\n ${ subject . url } ` ) ; } } ) ; Reply to a mention with the parent issue's title, status, and URL message.subject is cached per message, so repeated access only hits the API once. It resolves to null on Slack and other chat platforms, where there's no parent resource. Link to heading Direct access to platform SDKs The GitHub, Linear, and Slack adapters now expose their underlying platform SDKs. Use them to extend your bot by calling provider APIs directly. // Add a "triaged" label to issue #42 const { octokit } = bot . getAdapter ( "github" ) ; await octokit . rest . issues .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More