增加一键重启所有网关按钮
Build / build (push) Canceled after 0s
Playwright / e2e (push) Canceled after 0s

This commit is contained in:
2026-10-21 17:21:11 +08:00
parent 8fdec02a1c
commit 421ffa0714
12 changed files with 553 additions and 1 deletions
+26
View File
@@ -250,6 +250,32 @@ export async function mockHermesApi(page: Page, options: MockHermesApiOptions =
return
}
if (pathname === '/api/hermes/profiles/gateways/restart-all') {
if (request.method() !== 'POST') {
await route.fulfill(jsonResponse({ error: 'Method not allowed' }, 405))
return
}
await route.fulfill(jsonResponse({
success: true,
restarted: ['default', 'research'],
failed: [],
}))
return
}
if (pathname === '/api/hermes/profiles/restart-all') {
if (request.method() !== 'POST') {
await route.fulfill(jsonResponse({ error: 'Method not allowed' }, 405))
return
}
await route.fulfill(jsonResponse({
success: true,
restarted: ['default', 'research'],
failed: [],
}))
return
}
if (pathname === '/api/hermes/profiles/active') {
if (request.method() !== 'PUT') {
await route.fulfill(jsonResponse({ error: 'Method not allowed' }, 405))