Fix deferred restart review findings.
Drop phantom pending records when provider disconnect removes nothing and when Behavior AGENTS.md payloads are not deferred. Clear the Apply badge after external OpenCode manual-restart guidance. Align skills and commands save toasts with deferred restart feedback, and fix French OpenCode elision. Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
This commit is contained in:
co-authored by
Serhii Dziupin
parent
7c27a39cf4
commit
0cde9e9413
@@ -243,9 +243,7 @@ export const BehaviorPage: React.FC = () => {
|
||||
}
|
||||
|
||||
const payload = await response.json().catch(() => null);
|
||||
if (!noteDeferredRestartFromPayload(payload, 'behavior', { id: 'agents-md' })) {
|
||||
recordDeferredOpenCodeRestart('behavior', { id: 'agents-md' });
|
||||
}
|
||||
const deferred = noteDeferredRestartFromPayload(payload, 'behavior', { id: 'agents-md' });
|
||||
|
||||
await saveBehaviorSetting({
|
||||
globalBehaviorPrompt: content,
|
||||
@@ -253,7 +251,11 @@ export const BehaviorPage: React.FC = () => {
|
||||
|
||||
setPrompt(content);
|
||||
setInitialPrompt(content);
|
||||
toast.success(t('settings.view.pendingRestart.saved'));
|
||||
toast.success(
|
||||
deferred
|
||||
? t('settings.view.pendingRestart.saved')
|
||||
: t('settings.behavior.page.toast.saved'),
|
||||
);
|
||||
} catch (error) {
|
||||
console.error('Failed to save behavior:', error);
|
||||
const message = error instanceof Error ? error.message : t('settings.behavior.page.toast.saveFailed');
|
||||
|
||||
Reference in New Issue
Block a user