Coding agent save button fix (#825)
This commit is contained in:
committed by
GitHub
parent
f93b954068
commit
9edf528967
@@ -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);
|
||||
}
|
||||
}, []);
|
||||
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user