web

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindAvailablePort

func FindAvailablePort(startPort int) int

FindAvailablePort finds an available port starting from the given port

func GetDefaultDatabasePath

func GetDefaultDatabasePath() (string, error)

GetDefaultDatabasePath returns the default database path used by the CLI

func StartVisualizationServer

func StartVisualizationServer(dbPath string, port int) error

StartVisualizationServer is a convenience function to start the server

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server represents the web visualization server

func NewServer

func NewServer(database *db.Database, port int) *Server

NewServer creates a new web server instance

func (*Server) Start

func (s *Server) Start() error

Start starts the HTTP server

type TreeNode

type TreeNode struct {
	ID       string  `json:"id"`
	Content  string  `json:"content"`
	Type     string  `json:"type"`
	Parent   *string `json:"parent,omitempty"`
	Children string  `json:"children"`
	Model    *string `json:"model,omitempty"`
}

TreeNode represents a node in the conversation tree for JSON serialization

Jump to

Keyboard shortcuts

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