Improve upgrade command with installation method detection (#158)

This commit is contained in:
Dax
2025-06-17 00:07:17 -04:00
committed by GitHub
parent b929b4f4b9
commit d054f88130
6 changed files with 153 additions and 122 deletions

View File

@@ -15,6 +15,7 @@ import { NamedError } from "../util/error"
import { Fzf } from "../external/fzf"
import { ModelsDev } from "../provider/models"
import { Ripgrep } from "../external/ripgrep"
import { Installation } from "../installation"
const ERRORS = {
400: {
@@ -466,6 +467,25 @@ export namespace Server {
return c.json(result)
},
)
.post(
"installation_info",
describeRoute({
description: "Get installation info",
responses: {
200: {
description: "Get installation info",
content: {
"application/json": {
schema: resolver(Installation.Info),
},
},
},
},
}),
async (c) => {
return c.json(Installation.info())
},
)
return result
}