fix(core): revert form service and mcp elicitation (#35080)

This commit is contained in:
Aiden Cline
2026-07-03 00:32:10 -05:00
committed by GitHub
parent 1de3c6e4a6
commit ef2140d121
73 changed files with 5874 additions and 5779 deletions
-12
View File
@@ -17,7 +17,6 @@ export interface MockServerConfig {
todos?: (sessionID: string) => unknown[]
permissions?: unknown[] | (() => unknown[])
questions?: unknown[] | (() => unknown[])
forms?: unknown[] | (() => unknown[])
}
export async function mockOpenCodeServer(page: Page, config: MockServerConfig) {
@@ -54,17 +53,6 @@ export async function mockOpenCodeServer(page: Page, config: MockServerConfig) {
return json(route, typeof config.permissions === "function" ? config.permissions() : (config.permissions ?? []))
if (path === "/question")
return json(route, typeof config.questions === "function" ? config.questions() : (config.questions ?? []))
if (path === "/api/form/request")
return json(route, {
location: { directory: config.directory, project: config.project },
data: typeof config.forms === "function" ? config.forms() : (config.forms ?? []),
})
if (/^\/api\/session\/[^/]+\/form$/.test(path))
return json(route, {
location: { directory: config.directory, project: config.project },
data: typeof config.forms === "function" ? config.forms() : (config.forms ?? []),
})
if (/^\/api\/session\/[^/]+\/form\/[^/]+\/(reply|cancel)$/.test(path)) return json(route, undefined, undefined, 204)
if (path === "/vcs/diff" && config.vcsDiff) return json(route, config.vcsDiff)
if (emptyObject.has(path)) return json(route, {})
if (emptyList.has(path)) return json(route, [])