The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
fix(mcp): handle empty JSON gracefully in editor
Steven Enamakelbd79d83cc416
diff --git a/app/src/components/channels/mcp/McpJsonEditor.tsx b/app/src/components/channels/mcp/McpJsonEditor.tsxindex ebef174ad3..fb0ca14b29 100644--- a/app/src/components/channels/mcp/McpJsonEditor.tsx+++ b/app/src/components/channels/mcp/McpJsonEditor.tsx@@ -56,9 +56,10 @@ const McpJsonEditor = ({ onSaved }: McpJsonEditorProps) => {// Only the newest read may write its answer.const generation = useRef(0);+ // The initial state is already `loading`; a retry sets it again before+ // calling this, so the read itself never has to.const refresh = useCallback(async () => {const mine = ++generation.current;- setLoad('loading');try {const doc = await mcpClientsApi.configGet();if (generation.current !== mine) return;@@ -126,7 +127,13 @@ const McpJsonEditor = ({ onSaved }: McpJsonEditorProps) => {<AlertTitle>{t('mcp.json.loadFailedTitle')}</AlertTitle><AlertDescription>{t('mcp.json.loadFailedBody')}{' '}- <Button variant="tertiary" size="xs" onClick={() => void refresh()}>+ <Button+ variant="tertiary"+ size="xs"+ onClick={() => {+ setLoad('loading');+ void refresh();+ }}>{t('common.retry')}</Button></AlertDescription>