refactor(server): serve raw filesystem content (#31911)

This commit is contained in:
Dax
2026-06-11 11:20:11 -04:00
committed by GitHub
parent 31b233e9db
commit 31c5454ee6
12 changed files with 67 additions and 93 deletions
+4 -15
View File
@@ -5964,31 +5964,20 @@ export class Fs extends HeyApiClient {
/**
* Read file
*
* Read one file relative to the requested location.
* Serve one file relative to the requested location.
*/
public read<ThrowOnError extends boolean = false>(
parameters: {
parameters?: {
location?: {
directory?: string
workspace?: string
}
path: string
},
options?: Options<never, ThrowOnError>,
) {
const params = buildClientParams(
[parameters],
[
{
args: [
{ in: "query", key: "location" },
{ in: "query", key: "path" },
],
},
],
)
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }])
return (options?.client ?? this.client).get<V2FsReadResponses, V2FsReadErrors, ThrowOnError>({
url: "/api/fs/read",
url: "/api/fs/read/*",
...options,
...params,
})