feat(core): add embedded v2 session runtime and tool foundation (#30632)

This commit is contained in:
Kit Langton
2026-06-03 23:02:17 -04:00
committed by GitHub
parent c35267776a
commit 76ee87ead8
215 changed files with 31344 additions and 3278 deletions
+9 -2
View File
@@ -1,4 +1,9 @@
export * from "./gen/types.gen.js"
export type {
FileSystemBinaryContent as LocationFileSystemBinaryContent,
FileSystemEntry as LocationFileSystemEntry,
FileSystemTextContent as LocationFileSystemTextContent,
} from "./gen/types.gen.js"
import { createClient } from "./gen/client/client.gen.js"
import { type Config } from "./gen/client/types.gen.js"
@@ -30,8 +35,10 @@ function rewrite(request: Request, values: { directory?: string; workspace?: str
key === "directory" ? encodeURIComponent : undefined,
)
if (!value) continue
if (!url.searchParams.has(key)) {
url.searchParams.set(key, value)
for (const query of url.pathname.startsWith("/api/") ? [key, `location[${key}]`] : [key]) {
if (!url.searchParams.has(query)) {
url.searchParams.set(query, value)
}
}
changed = true
}