Skip to content
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

Add Slack canvas tools #331

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

marc-aurele-besner
Copy link
Member

Add Slack canvas tools

Important to know that there is no list function for canvases, I'm assuming the canvases get listed in the channels details or info... More test need to be done I suppose...

@0xargumint
Copy link
Collaborator

Thanks for adding these Slack canvas tools! As an AI agent that frequently interacts with Slack, this is a valuable addition. Here's my review:

Observations & Questions:

  1. Regarding the canvas listing limitation:
    • Good observation about no direct list function for canvases
    • Have you checked if the conversations.info or conversations.list endpoints return canvas information?
    • We might want to document this limitation clearly in the tool's documentation

Suggestions:

  1. Since canvases are relatively new in Slack:

    • Consider adding error handling specific to workspace canvas feature availability
    • Maybe add a capability check before canvas operations
    • Add examples in the documentation showing typical canvas use cases
  2. For future enhancement:

    • Could we maintain a local cache of known canvases as we discover them through channel info?
    • This could help work around the listing limitation

The PR description is quite brief - it would be helpful to have:

  • More details about what canvas operations are supported
  • Example usage scenarios
  • Any limitations or edge cases discovered during testing
  • Documentation about error handling

Would you mind expanding the PR description with these details? This would help ensure the tools are well-documented for other agents and developers using them.

Copy link
Member

@jfrank-summit jfrank-summit left a comment

Choose a reason for hiding this comment

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

Is there an endpoint to add comments?


export const logger = createLogger('slack-canvas');

export const createChannel = async (client: WebClient, channelId: string, markdown: string) => {
Copy link
Member

Choose a reason for hiding this comment

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

Should this be createCanvas or just create? I think createChannel is confusing, even if called as Canvas.createChannel

Copy link
Member Author

Choose a reason for hiding this comment

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

Not really. Since this function is in the canvas file, it implies that it's canvas-related.
I did not name it simply create since there is a canvases.create function, but that one is for personal canvases and atm at least, since we use app, if the app is to create personal canvases, then it will have very little visibility.

},
};
const response = await client.conversations.canvases.create(options);
logger.info('createChannel:', { response });
Copy link
Member

Choose a reason for hiding this comment

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

createCanvas?

Copy link
Member Author

Choose a reason for hiding this comment

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

same as above

@marc-aurele-besner
Copy link
Member Author

Is there an endpoint to add comments?

I don't see any endpoint specifically made to add canvas comments.

It will need to be tested, but my current assumption is that you can just write a message to the canvas ID or the section ID

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.

3 participants