mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-23 05:31:23 +00:00
fix(dashboard): display real config path on Config page
Replace the hardcoded i18n placeholder "~/.hermes/config.yaml" with the real config_path returned from api.getStatus(), falling back to the i18n string while loading or on API failure. Co-authored-by: aqilaziz <gonzes7@gmail.com>
This commit is contained in:
parent
782e3f5164
commit
80375cbe2c
1 changed files with 6 additions and 1 deletions
|
|
@ -118,6 +118,7 @@ export default function ConfigPage() {
|
||||||
const [yamlText, setYamlText] = useState("");
|
const [yamlText, setYamlText] = useState("");
|
||||||
const [yamlLoading, setYamlLoading] = useState(false);
|
const [yamlLoading, setYamlLoading] = useState(false);
|
||||||
const [yamlSaving, setYamlSaving] = useState(false);
|
const [yamlSaving, setYamlSaving] = useState(false);
|
||||||
|
const [configPath, setConfigPath] = useState<string | null>(null);
|
||||||
const [activeCategory, setActiveCategory] = useState<string>("");
|
const [activeCategory, setActiveCategory] = useState<string>("");
|
||||||
const [confirmReset, setConfirmReset] = useState(false);
|
const [confirmReset, setConfirmReset] = useState(false);
|
||||||
const { toast, showToast } = useToast();
|
const { toast, showToast } = useToast();
|
||||||
|
|
@ -177,6 +178,10 @@ export default function ConfigPage() {
|
||||||
.getDefaults()
|
.getDefaults()
|
||||||
.then(setDefaults)
|
.then(setDefaults)
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
|
api
|
||||||
|
.getStatus()
|
||||||
|
.then((resp) => setConfigPath(resp.config_path))
|
||||||
|
.catch(() => {});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// Set active category when categories load
|
// Set active category when categories load
|
||||||
|
|
@ -416,7 +421,7 @@ export default function ConfigPage() {
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Settings2 className="h-4 w-4 text-muted-foreground" />
|
<Settings2 className="h-4 w-4 text-muted-foreground" />
|
||||||
<code className="text-xs text-muted-foreground bg-muted/50 px-2 py-0.5">
|
<code className="text-xs text-muted-foreground bg-muted/50 px-2 py-0.5">
|
||||||
{t.config.configPath}
|
{configPath ?? t.config.configPath}
|
||||||
</code>
|
</code>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-1.5">
|
<div className="flex items-center gap-1.5">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue