Documentation
¶
Overview ¶
Package slack provides Slack integration via Socket Mode
Index ¶
- type Client
- func (c *Client) AddReaction(channel, timestamp, emoji string) error
- func (c *Client) PostMessage(channel, text, threadTS string) error
- func (c *Client) PostMessageAsAgent(channel, agentName, text, threadTS string) error
- func (c *Client) Run() error
- func (c *Client) Start(ctx context.Context, handler func([]*IncomingMessage))
- type Config
- type Handler
- type IncomingMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client handles Slack communication
func (*Client) AddReaction ¶
AddReaction adds a reaction to a message
func (*Client) PostMessage ¶
PostMessage sends a message to a channel
func (*Client) PostMessageAsAgent ¶
PostMessageAsAgent sends a message with agent identity
type Config ¶
type Config struct {
BotToken string
AppToken string
WaitSeconds int // Wait time before processing (default 120)
}
Config holds Slack configuration
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler processes Slack messages with the AI team
func NewHandler ¶
func NewHandler(client *Client, agents *agent.Agents, logMgr *logger.Manager, workDir string) *Handler
NewHandler creates a new Slack message handler
func (*Handler) HandleMessages ¶
func (h *Handler) HandleMessages(msgs []*IncomingMessage)
HandleMessages processes a batch of messages from a customer
type IncomingMessage ¶
type IncomingMessage struct {
Channel string
User string
UserName string
Text string
Timestamp string
ThreadTS string
IsFromBot bool // true if message is from a bot (agent)
SenderAgent string // agent name if from bot (e.g., "Mei Chen")
}
IncomingMessage represents a message from Slack
Click to show internal directories.
Click to hide internal directories.