Hardcode Go default empty response

This commit is contained in:
Brandon Zhang
2026-03-27 17:55:05 +08:00
parent 372e30ff6f
commit f437f6939c
6 changed files with 26 additions and 59 deletions

View File

@@ -6,6 +6,8 @@ import (
"strconv"
)
const 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 {
Host string
@@ -13,7 +15,6 @@ type Config struct {
DBPath string
LogLevel string
DefaultWaitSeconds int
DefaultEmptyResponse string
AgentStaleAfterSeconds int
MCPStateless bool
APIToken string
@@ -27,7 +28,6 @@ func Load() Config {
DBPath: getEnv("DB_PATH", "data/local_mcp.sqlite3"),
LogLevel: getEnv("LOG_LEVEL", "INFO"),
DefaultWaitSeconds: getEnvInt("DEFAULT_WAIT_SECONDS", 10),
DefaultEmptyResponse: getEnv("DEFAULT_EMPTY_RESPONSE", ""),
AgentStaleAfterSeconds: getEnvInt("AGENT_STALE_AFTER_SECONDS", 30),
MCPStateless: getEnvBool("MCP_STATELESS", true),
APIToken: getEnv("API_TOKEN", ""),
@@ -58,4 +58,3 @@ func getEnvBool(key string, defaultVal bool) bool {
}
return defaultVal
}