Document deferred OpenCode restart contract and drop dead helper.
Add config-mutation-response.js to owning docs, describe restartDeferred and external requiresManualRestart on /api/config/reload, and remove the unused buildConfigMutationResponse export. Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
This commit is contained in:
co-authored by
Serhii Dziupin
parent
3cb02439ea
commit
395e08c683
@@ -24,21 +24,3 @@ export function buildExternalManualRestartResponse(message) {
|
||||
message,
|
||||
};
|
||||
}
|
||||
|
||||
export function buildConfigMutationResponse(refreshResult, { liveMessage, manualRestartMessage, deferredMessage }) {
|
||||
if (refreshResult && refreshResult.external) {
|
||||
return buildExternalManualRestartResponse(manualRestartMessage);
|
||||
}
|
||||
|
||||
// When callers skip the live refresh (deferred apply flow), report a pending restart.
|
||||
if (!refreshResult || refreshResult.deferred === true) {
|
||||
return buildDeferredRestartResponse(deferredMessage || liveMessage);
|
||||
}
|
||||
|
||||
return {
|
||||
success: true,
|
||||
requiresReload: true,
|
||||
message: liveMessage,
|
||||
reloadDelayMs: refreshResult.reloadDelayMs,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user