Defer OpenCode restarts for config mutations
Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
This commit is contained in:
co-authored by
Serhii Dziupin
parent
824d1fbbf4
commit
775da6e9f4
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Shared response shape for OpenCode config mutations.
|
||||
*
|
||||
* Settings writes persist to disk immediately but defer the OpenCode restart
|
||||
* so the UI can accumulate pending changes and apply them once via
|
||||
* api:config/reload ("Apply & Restart OpenCode").
|
||||
*/
|
||||
export function buildDeferredRestartResponse(message: string) {
|
||||
return {
|
||||
success: true,
|
||||
requiresReload: false,
|
||||
requiresRestart: true,
|
||||
restartDeferred: true,
|
||||
message,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user