rework config

This commit is contained in:
Dax Raad
2025-06-18 22:20:03 -04:00
parent 1e8a681de9
commit e5e9b3e3c0
14 changed files with 785 additions and 203 deletions

View File

@@ -15,6 +15,7 @@ import { NamedError } from "../util/error"
import { ModelsDev } from "../provider/models"
import { Ripgrep } from "../external/ripgrep"
import { Installation } from "../installation"
import { Config } from "../config/config"
const ERRORS = {
400: {
@@ -140,6 +141,25 @@ export namespace Server {
return c.json(App.info())
},
)
.post(
"/config_get",
describeRoute({
description: "Get config info",
responses: {
200: {
description: "Get config info",
content: {
"application/json": {
schema: resolver(Config.Info),
},
},
},
},
}),
async (c) => {
return c.json(await Config.get())
},
)
.post(
"/app_initialize",
describeRoute({