feat(agent): support Responses steering and project-aware tools
Use the dedicated TJWATER_AGENT_URL and Responses stream protocol. Keep running turns active while users steer or queue follow-ups and edit pending delivery. Refresh the model catalog before generation and preserve approval mode selection. Integrate scoped investigation messaging/presentation, geographic place selection, current Agent composer styles and supporting workbench contracts. Validation: 77 focused Vitest checks, 21 browser cases, lint, typecheck and production build. Preserve direct Server/Agent routing and project authentication.
This commit is contained in:
@@ -186,7 +186,7 @@ async function prepareDeterministicWorkbench(page: Page) {
|
||||
TJWATER_MAP_URL: "https://visual-map.invalid/geoserver",
|
||||
TJWATER_GEOSERVER_WORKSPACE: "tjwater_next",
|
||||
TJWATER_SERVER_API_BASE_URL: "https://tjwater-api.invalid",
|
||||
TJWATER_AGENT_API_BASE_URL: "http://127.0.0.1:8787",
|
||||
TJWATER_AGENT_URL: "http://127.0.0.1:8787",
|
||||
TJWATER_ENABLE_DEV_PANEL: "false",
|
||||
TJWATER_ENABLE_MSW: "false"
|
||||
};`
|
||||
@@ -248,6 +248,9 @@ async function openWorkbench(page: Page) {
|
||||
await page.waitForFunction(() =>
|
||||
Boolean(window.__waterNetworkMap?.getLayer("scada-pressure-hit"))
|
||||
);
|
||||
await expect(page.getByRole("button", {
|
||||
name: "查看待办与告警,当前 0 条待处理事项"
|
||||
})).toBeVisible();
|
||||
}
|
||||
|
||||
type BasemapLabel = "浅色" | "影像" | "天地图矢量" | "天地图影像";
|
||||
@@ -331,6 +334,7 @@ async function expectLoadedChineseFont(page: Page) {
|
||||
}
|
||||
|
||||
async function expectBodyContrast(page: Page) {
|
||||
const body = page.getByText("直接说出你想调查的问题,我会整理监测与空间证据,并将分析结果带回地图。");
|
||||
const body = page.getByRole("group", { name: "推荐问题" }).getByRole("button").first();
|
||||
await expect(body).toBeVisible();
|
||||
expect(await readRenderedContrast(body)).toBeGreaterThanOrEqual(4.5);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user