mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-19 17:01:37 +03:00
feat(location): reload configuration
This commit is contained in:
@@ -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.",
|
||||
}),
|
||||
|
||||
@@ -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)
|
||||
},
|
||||
|
||||
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user