Coding agent save button fix (#825)

This commit is contained in:
Louis Knight-Webb
2025-09-23 19:19:53 +01:00
committed by GitHub
parent f93b954068
commit 9edf528967
2 changed files with 14 additions and 16 deletions

View File

@@ -164,7 +164,6 @@ export function UserSystemProvider({ children }: UserSystemProviderProps) {
);
const reloadSystem = useCallback(async () => {
setLoading(true);
try {
const userSystemInfo: UserSystemInfo = await configApi.getConfig();
setConfig(userSystemInfo.config);
@@ -180,8 +179,6 @@ export function UserSystemProvider({ children }: UserSystemProviderProps) {
);
} catch (err) {
console.error('Error reloading user system:', err);
} finally {
setLoading(false);
}
}, []);

View File

@@ -565,20 +565,21 @@ export function AgentSettings() {
</CardContent>
</Card>
{/* Sticky Save bar (used for both editors) */}
<div className="sticky bottom-0 z-10 bg-background/80 backdrop-blur-sm border-t py-4">
<div className="flex justify-end">
<Button
onClick={handleSaveProfiles}
disabled={!isDirty || profilesSaving || !!profilesError}
>
{profilesSaving && (
<Loader2 className="mr-2 h-4 w-4 animate-spin" />
)}
{t('settings.agents.save.button')}
</Button>
{!useFormEditor && (
<div className="sticky bottom-0 z-10 bg-background/80 backdrop-blur-sm border-t py-4">
<div className="flex justify-end">
<Button
onClick={handleSaveProfiles}
disabled={!isDirty || profilesSaving || !!profilesError}
>
{profilesSaving && (
<Loader2 className="mr-2 h-4 w-4 animate-spin" />
)}
{t('settings.agents.save.button')}
</Button>
</div>
</div>
</div>
)}
</div>
);
}