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:
@@ -2,6 +2,7 @@ import { z } from "zod";
|
||||
import type { FeatureCollection, Geometry, Position } from "geojson";
|
||||
import type { AccessTokenProvider } from "@/shared/auth/keycloak-auth";
|
||||
import { env } from "@/shared/config/env";
|
||||
import { formatDateTime } from "@/shared/utils/date-time";
|
||||
import type {
|
||||
ScheduledConditionRecord,
|
||||
ScheduledWorkOrderItem,
|
||||
@@ -427,8 +428,7 @@ function getStatusTone(status: string) {
|
||||
}
|
||||
|
||||
function formatRuntimeAlertTime(value: string) {
|
||||
const date = new Date(value);
|
||||
return `${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")} ${String(date.getHours()).padStart(2, "0")}:${String(date.getMinutes()).padStart(2, "0")}`;
|
||||
return formatRuntimeDateTime(value).replace("/", "-");
|
||||
}
|
||||
|
||||
function getConditionDataSource(
|
||||
@@ -452,13 +452,12 @@ function resolveOperationalRuntimeSource(
|
||||
}
|
||||
|
||||
function formatRuntimeDateTime(value: string) {
|
||||
return new Intl.DateTimeFormat("zh-CN", {
|
||||
return formatDateTime(value, {
|
||||
month: "2-digit",
|
||||
day: "2-digit",
|
||||
hour: "2-digit",
|
||||
minute: "2-digit",
|
||||
hour12: false
|
||||
}).format(new Date(value));
|
||||
minute: "2-digit"
|
||||
});
|
||||
}
|
||||
|
||||
function isGeoJsonFeatureCollection(value: unknown): value is FeatureCollection<Geometry> {
|
||||
|
||||
Reference in New Issue
Block a user