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:
2026-10-19 18:46:58 +08:00
parent 2c5bf15cce
commit ec23d44b02
131 changed files with 6663 additions and 1204 deletions
@@ -9,7 +9,25 @@ import { MapDevPanel } from "./map-dev-panel";
afterEach(cleanup);
describe("MapDevPanel flow controls", () => {
describe("MapDevPanel", () => {
it("defaults to following investigations and allows disabling it", async () => {
const user = userEvent.setup();
const onFollowChange = vi.fn();
render(
<MapDevPanel
commands={createCommands()}
controllerState={createControllerState()}
detailFeature={null}
onClose={vi.fn()}
onInvestigationFollowChange={onFollowChange}
/>
);
const follow = screen.getByRole("checkbox", { name: "跟随所选调查" });
expect(follow).toBeChecked();
await user.click(follow);
expect(onFollowChange).toHaveBeenCalledWith(false);
});
it("updates a pipe with its signed velocity", async () => {
const user = userEvent.setup();
const commands = createCommands();
@@ -23,6 +41,7 @@ describe("MapDevPanel flow controls", () => {
/>
);
await user.click(screen.getByText("水流调试"));
const pipeId = screen.getByLabelText("管道 ID");
const velocity = screen.getByLabelText("有符号流速");
await user.clear(pipeId);
@@ -37,7 +56,8 @@ describe("MapDevPanel flow controls", () => {
});
});
it("shows the current flow direction counts", () => {
it("shows the current flow direction counts", async () => {
const user = userEvent.setup();
render(
<MapDevPanel
commands={createCommands()}
@@ -55,9 +75,12 @@ describe("MapDevPanel flow controls", () => {
/>
);
expect(screen.getByRole("status", {
name: ""
})).toHaveTextContent("已赋值 4 · 正向 2 · 反向 1 · 停止 1");
await user.click(screen.getByText("水流调试"));
expect(
screen.getByRole("status", {
name: ""
})
).toHaveTextContent("已赋值 4 · 正向 2 · 反向 1 · 停止 1");
});
});