feat(location): reload configuration

This commit is contained in:
Dax Raad
2026-09-17 09:11:52 -04:00
Unverified
parent 254ace8594
commit b52f241294
3 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ export const makeLocationGroup = <LocationId extends HttpApiMiddleware.AnyId, Lo
}).annotateMerge(
OpenApi.annotations({
identifier: "location.reload",
summary: "Reload locations",
summary: "Reload configuration",
description:
"Shut down and rebuild every loaded location. Pending permissions and forms are cancelled; running sessions continue with fresh services at the next step boundary. Emits location.shutdown for client recovery and responds once all replacement builds settle.",
}),
+4 -3
View File
@@ -158,6 +158,7 @@ const appBindingCommands = [
"opencode.update",
"server.pair",
"service.restart",
"location.reload",
"opencode.debug",
"theme.switch",
"theme.switch_mode",
@@ -1005,15 +1006,15 @@ function App(props: { pair?: DialogPairCredentials }) {
: []),
{
name: "location.reload",
title: "Reload locations",
title: "Reload configuration",
slash: { name: "reload" },
run: async () => {
dialog.clear()
toast.show({ variant: "info", message: "Reloading all locations…", duration: 30000 })
toast.show({ variant: "info", message: "Reloading configuration…", duration: 30000 })
await client.api.location
.reload()
.then(() => {
toast.show({ variant: "success", message: "Locations reloaded" })
toast.show({ variant: "success", message: "Configuration reloaded" })
})
.catch(toast.error)
},
+1
View File
@@ -60,6 +60,7 @@ export const Definitions = {
"opencode.settings": keybind("none", "Open settings"),
"server.pair": keybind("none", "Pair device"),
"service.restart": keybind("none", "Restart service"),
"location.reload": keybind("none", "Reload configuration"),
"diff.open": keybind("none", "Open diff viewer"),
"diff.close": keybind("escape,q", "Close diff viewer"),
"diff.down": keybind("j,down", "Move diff viewer down"),