Show server version in logs and UI
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/local-mcp/local-mcp-go/internal/config"
|
||||
"github.com/local-mcp/local-mcp-go/internal/models"
|
||||
)
|
||||
|
||||
@@ -57,6 +58,7 @@ func handleStatus(stores Stores) http.HandlerFunc {
|
||||
"server": map[string]any{
|
||||
"status": "up",
|
||||
"started_at": serverStartTime.Format(time.RFC3339Nano),
|
||||
"version": config.AppVersion,
|
||||
},
|
||||
"agent": agent,
|
||||
"queue": map[string]any{
|
||||
|
||||
@@ -6,7 +6,10 @@ import (
|
||||
"strconv"
|
||||
)
|
||||
|
||||
const DefaultEmptyResponse = "call this tool `get_user_request` again to fetch latest user input..."
|
||||
const (
|
||||
AppVersion = "1.0.0"
|
||||
DefaultEmptyResponse = "call this tool `get_user_request` again to fetch latest user input..."
|
||||
)
|
||||
|
||||
// Config holds all runtime configuration values for local-mcp.
|
||||
type Config struct {
|
||||
|
||||
@@ -53,7 +53,7 @@ func New(
|
||||
broker *events.Broker,
|
||||
) *Handler {
|
||||
h := &Handler{
|
||||
MCP: server.NewMCPServer("local-mcp", "1.0.0"),
|
||||
MCP: server.NewMCPServer("local-mcp", config.AppVersion),
|
||||
instStore: instStore,
|
||||
settStore: settStore,
|
||||
agentStore: agentStore,
|
||||
|
||||
Reference in New Issue
Block a user