The ToolConfig UI was showing incorrect file paths for Droid, OpenCode, and AMP configurations.
Problem:
~/.codex/config.toml or ~/.claude/settings.jsonconfigFilePaths mapToolCard component hardcoded descriptionsRoot Cause:
internal/routes/config_files.go) had incorrect paths:
~/.droid/config.toml ❌ → Should be ~/.factory/settings.json ✅~/.opencode/settings.json ❌ → Should be ~/.opencode/config.json ✅~/.amp/config.toml ❌ → Should be ~/.amp/config.json ✅ToolCard component (line 1010-1013) hardcoded:
const desc = entry.language === "json" ? "~/.claude/settings.json" : "~/.codex/config.toml"
After clicking Save, the UI didn’t refresh to show updated file status or content.
Problem:
internal/routes/config_files.go)var configFilePaths = map[string]string{
"claude-code": expandHomePath("~/.claude/settings.json"),
"codex": expandHomePath("~/.codex/config.toml"),
"droid": expandHomePath("~/.factory/settings.json"), // ✅ Fixed
"opencode": expandHomePath("~/.opencode/config.json"), // ✅ Fixed
"amp": expandHomePath("~/.amp/config.json"), // ✅ Fixed
}
"droid": {
Label: "Droid Configuration",
Description: "Droid AI CLI configuration file (~/.factory/settings.json)", // ✅ Fixed
Language: "json", // ✅ Fixed
},
"opencode": {
Label: "OpenCode Settings",
Description: "OpenCode CLI configuration file (~/.opencode/config.json)", // ✅ Fixed
Language: "json",
},
"amp": {
Label: "Amp Configuration",
Description: "Amp AI CLI configuration file (~/.amp/config.json)", // ✅ Fixed
Language: "json", // ✅ Fixed
},
Added droid and amp to JSON validation:
// For JSON files, validate before saving
if name == "claude-code" || name == "opencode" || name == "droid" || name == "amp" {
var js json.RawMessage
if err := json.Unmarshal([]byte(req.Content), &js); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"error": fmt.Sprintf("Invalid JSON: %v", err)})
return
}
}
frontend/src/pages/ConfigPage.tsx)function ToolCard({
entry,
isActive,
onClick,
}: {
entry: ConfigFileEntry
isActive: boolean
onClick: () => void
}) {
const Icon = entry.language === "json" ? FileJson : FileText
// Map config names to their actual file paths
const configPaths: Record<string, string> = {
"claude-code": "~/.claude/settings.json",
"codex": "~/.codex/config.toml",
"droid": "~/.factory/settings.json", // ✅ Correct
"opencode": "~/.opencode/config.json", // ✅ Correct
"amp": "~/.amp/config.json", // ✅ Correct
}
const desc = configPaths[entry.name] || (
entry.language === "json" ? "~/.config/settings.json" : "~/.config/config.toml"
)
const handleSave = () => {
if (!activeConfig) return
const content = getContentToSave()
setSaving(true)
saveConfigFile(activeConfig, content)
.then(() => {
setOriginalContent(content)
setDirty(false)
showToast("Configuration saved", "success")
// ✅ Reload the config list to update the "exists" status
return listConfigFiles()
})
.then((r) => {
setConfigs(r.configs)
// ✅ Reload the current config to ensure we have the latest data
if (activeConfig) {
return getConfigFile(activeConfig)
}
})
.then((resp) => {
if (resp) {
setRawContent(resp.content)
setOriginalContent(resp.content)
// ✅ Re-parse structured data
if (activeConfig === "claude-code" && resp.content) {
try {
setClaudeSettings(JSON.parse(resp.content))
} catch {
setClaudeSettings(null)
}
} else if (activeConfig === "codex" && resp.content) {
try {
setCodexConfig(parseTOML(resp.content))
} catch {
setCodexConfig(null)
}
}
}
})
.catch((err: Error) => showToast(`Save failed: ${err.message}`, "error"))
.finally(() => setSaving(false))
}
When you open ToolConfig, you should now see:
| Tool | Label | Path Shown | Language |
|---|---|---|---|
| Claude Code | Claude Code Settings | ~/.claude/settings.json |
JSON |
| Codex | Codex Configuration | ~/.codex/config.toml |
TOML |
| Droid | Droid Configuration | ~/.factory/settings.json |
JSON ✅ |
| OpenCode | OpenCode Settings | ~/.opencode/config.json |
JSON ✅ |
| AMP | Amp Configuration | ~/.amp/config.json |
JSON ✅ |
After editing and clicking Save:
| File | Changes |
|---|---|
internal/routes/config_files.go |
Fixed paths, metadata, and validation for droid/opencode/amp |
frontend/src/pages/ConfigPage.tsx |
Fixed ToolCard descriptions and enhanced save to reload |
bun run omni restart --rebuild
Refresh browser to load updated frontend
Verify each config shows correct path in ToolConfig UI