@f5-sales-demo/xcsh 21.47.2 → 21.49.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -50,6 +50,7 @@ const EXCLUDED_INTENT =
50
50
  const THIRD_PARTY_SCOPE = /\b(?:aws|amazon|azure|gcp|google cloud|kubernetes)\b/i;
51
51
  const F5_XC_SCOPE = /\b(?:f5(?:\s+distributed\s+cloud)?|xc)\b/i;
52
52
  const ANAPHORIC_RESOURCE = /\b(?:its|it|that|this)\b/i;
53
+ const DOCUMENTATION_ROUTE = /xcsh:\/\/documentation(?:\/|\?)/i;
53
54
  const API_METADATA_INTENT =
54
55
  /\b(?:endpoint|api\s+path|http\s+method|method|payload|request\s+body|required\s+fields?|enum|allowed\s+values?|constraints?|limits?|maximum|max(?:imum)?|minimum|min(?:imum)?|how\s+many|create|creates|creating|get|gets|list|lists|update|updates|replace|replaces|delete|deletes|clone|import)\b/i;
55
56
  const EXPLICIT_API_INTENT = /\b(?:api|endpoint|method|payload|schema)\b/i;
@@ -113,7 +114,7 @@ export function classifyApiCatalogPreflight(
113
114
  prompt: string,
114
115
  options: ApiCatalogPreflightOptions,
115
116
  ): ApiCatalogPreflightIntent | null {
116
- if (!options.toolsEnabled || EXCLUDED_INTENT.test(prompt)) return null;
117
+ if (!options.toolsEnabled || DOCUMENTATION_ROUTE.test(prompt) || EXCLUDED_INTENT.test(prompt)) return null;
117
118
  if (THIRD_PARTY_SCOPE.test(prompt) && !F5_XC_SCOPE.test(prompt)) return null;
118
119
  if (/\bterraform\b/i.test(prompt) && !EXPLICIT_API_INTENT.test(prompt)) return null;
119
120
  if (!API_METADATA_INTENT.test(prompt)) return null;