server

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GroupedMessage

type GroupedMessage struct {
	message.Message
	IsGroupStart bool // True if this is the first message in a group from this sender
	IsGroupEnd   bool // True if this is the last message in a group from this sender
}

GroupedMessage wraps a message with grouping metadata for the UI.

type Server

type Server struct {

	// RepoURLs maps workspace names (e.g., "mc-agent-chat") to GitHub URLs.
	RepoURLs map[string]string
	// contains filtered or unexported fields
}

Server handles HTTP requests for the chat UI.

func New

func New(agg *message.Aggregator, repoURLs map[string]string) (*Server, error)

New creates a new server with the given message aggregator. repoURLs maps workspace names (e.g., "mc-agent-chat") to GitHub URLs.

func (*Server) Handler

func (s *Server) Handler() http.Handler

Handler returns an http.Handler for the server.

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start begins broadcasting messages from the aggregator to SSE subscribers.

type WorkspaceInfo

type WorkspaceInfo struct {
	Name          string
	LatestMsgTime int64 // Unix milliseconds for JavaScript compatibility
	MessageCount  int
}

WorkspaceInfo contains workspace metadata for the UI.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL