wip(app): settings

This commit is contained in:
Adam
2026-01-20 07:33:44 -06:00
parent df094a10ff
commit 924fc9ed80
9 changed files with 488 additions and 102 deletions
+39
View File
@@ -32,6 +32,9 @@ import type {
FindSymbolsResponses,
FindTextResponses,
FormatterStatusResponses,
GlobalConfigGetResponses,
GlobalConfigUpdateErrors,
GlobalConfigUpdateResponses,
GlobalDisposeResponses,
GlobalEventResponses,
GlobalHealthResponses,
@@ -249,6 +252,42 @@ export class Global extends HeyApiClient {
...options,
})
}
/**
* Get global configuration
*
* Retrieve the global OpenCode configuration settings and preferences.
*/
public configGet<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>) {
return (options?.client ?? this.client).get<GlobalConfigGetResponses, unknown, ThrowOnError>({
url: "/global/config",
...options,
})
}
/**
* Update global configuration
*
* Update global OpenCode configuration settings and preferences.
*/
public configUpdate<ThrowOnError extends boolean = false>(
parameters?: {
config?: Config2
},
options?: Options<never, ThrowOnError>,
) {
const params = buildClientParams([parameters], [{ args: [{ key: "config", map: "body" }] }])
return (options?.client ?? this.client).patch<GlobalConfigUpdateResponses, GlobalConfigUpdateErrors, ThrowOnError>({
url: "/global/config",
...options,
...params,
headers: {
"Content-Type": "application/json",
...options?.headers,
...params.headers,
},
})
}
}
export class Project extends HeyApiClient {