454acf757c
The hook used exact string equality (agentName !== "prometheus") which fails when display names like "Prometheus (Plan Builder)" are stored in session state. Replace with case-insensitive substring matching via isPrometheusAgent() helper, consistent with the pattern used in keyword-detector hook. Closes #1764 (Bug 3)
6 lines
196 B
TypeScript
6 lines
196 B
TypeScript
import { PROMETHEUS_AGENT } from "./constants"
|
|
|
|
export function isPrometheusAgent(agentName: string | undefined): boolean {
|
|
return agentName?.toLowerCase().includes(PROMETHEUS_AGENT) ?? false
|
|
}
|