summaryrefslogtreecommitdiff
path: root/internal/appconfig/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/appconfig/config.go')
-rw-r--r--internal/appconfig/config.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/internal/appconfig/config.go b/internal/appconfig/config.go
index f8c1827..859b2c1 100644
--- a/internal/appconfig/config.go
+++ b/internal/appconfig/config.go
@@ -124,6 +124,9 @@ type App struct {
TmuxEditPopupHeight string `json:"-" toml:"-"`
TmuxEditDefaultAgent string `json:"-" toml:"-"`
TmuxEditAgents []TmuxEditAgentCfg `json:"-" toml:"-"`
+
+ // MCP: Model Context Protocol server settings
+ MCPPromptsDir string `json:"-" toml:"-"` // Directory for prompt storage
}
// CustomAction describes a user-defined code action.
@@ -303,6 +306,7 @@ type fileConfig struct {
Stats sectionStats `toml:"stats"`
Ignore sectionIgnore `toml:"ignore"`
TmuxEdit sectionTmuxEdit `toml:"tmux_edit"`
+ MCP sectionMCP `toml:"mcp"`
}
type sectionGeneral struct {
@@ -377,6 +381,11 @@ type sectionTmuxEditAgent struct {
SubmitKeys string `toml:"submit_keys"`
}
+// sectionMCP configures the MCP server settings.
+type sectionMCP struct {
+ PromptsDir string `toml:"prompts_dir"`
+}
+
type sectionOpenAI struct {
Model string `toml:"model"`
BaseURL string `toml:"base_url"`
@@ -706,6 +715,11 @@ func (fc *fileConfig) toApp() App {
// tmux_edit
fc.applyTmuxEdit(&out)
+ // mcp
+ if strings.TrimSpace(fc.MCP.PromptsDir) != "" {
+ out.MCPPromptsDir = strings.TrimSpace(fc.MCP.PromptsDir)
+ }
+
return out
}
@@ -1580,6 +1594,12 @@ func loadFromEnv(logger *log.Logger) *App {
any = true
}
+ // MCP settings
+ if s := getenv("HEXAI_MCP_PROMPTS_DIR"); s != "" {
+ out.MCPPromptsDir = s
+ any = true
+ }
+
if !any {
return nil
}