@apotech-os/support-kit 2.7.1 → 2.8.0

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.
package/dist/ui/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { GENERATED_RESPONSE_STATUSES, EVALUATION_VERDICTS, WHATSAPP_MODES, validateSettings, AGENT_GUARDRAILS, toCategory, toTriageDecision, toAgent, toGeneratedResponse, isGeneratedResponseStatus, toCategoryGroup, toResponseComparison, toDiffAnalysis, NODE_NAMES, settingsToProfile, hasNoDraftNode, guardrailBucket, computeWordDiff, DEFAULT_LLM_PROVIDER, isSendableVerdict, DEFAULT_MAX_TOOL_CALLS, DEFAULT_MIN_CONFIDENCE, DEFAULT_ESCALATION_ENABLED } from '../chunk-HE7Q4VCS.js';
1
+ import { GENERATED_RESPONSE_STATUSES, EVALUATION_VERDICTS, WHATSAPP_MODES, validateSettings, AGENT_GUARDRAILS, toCategory, toTriageDecision, toAgent, toGeneratedResponse, isGeneratedResponseStatus, toCategoryGroup, toResponseComparison, toDiffAnalysis, NODE_NAMES, settingsToProfile, hasNoDraftNode, guardrailBucket, computeWordDiff, DEFAULT_LLM_PROVIDER, isSendableVerdict, DEFAULT_MAX_TOOL_CALLS, DEFAULT_MIN_CONFIDENCE, DEFAULT_ESCALATION_ENABLED } from '../chunk-47QWWJBP.js';
2
2
  import { useState, useMemo, useRef, useEffect, useCallback, useId } from 'react';
3
3
  import { useAppContext, useAppSettings, Card, CardContent, Button, Link, KpiCard, BarChart, StackedBarChart, DataTable, Select, useAppApi, useToast, Badge, FunnelChart, Spinner, LineChart, Input, Switch, Checkbox, Textarea, cn, SidePanel, CopyButton, Modal, Tooltip, AppInvokeError } from '@apotech-os/ui-sdk';
4
4
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -1985,12 +1985,14 @@ function CategoryFormModal({
1985
1985
  groupId,
1986
1986
  agentId: category?.agentId ?? "",
1987
1987
  extraTags: category?.extraTags.join(", ") ?? "",
1988
+ description: category?.description ?? "",
1988
1989
  examples: category?.examples ?? ""
1989
1990
  });
1990
1991
  const nameId = useId();
1991
1992
  const tagId = useId();
1992
1993
  const agentSelectId = useId();
1993
1994
  const extraTagsId = useId();
1995
+ const descriptionId = useId();
1994
1996
  const examplesId = useId();
1995
1997
  const isValid = form.name.trim() !== "" && form.tagName.trim() !== "";
1996
1998
  async function submit(event) {
@@ -2040,6 +2042,18 @@ function CategoryFormModal({
2040
2042
  }
2041
2043
  )
2042
2044
  ] }),
2045
+ /* @__PURE__ */ jsxs("div", { children: [
2046
+ /* @__PURE__ */ jsx("label", { htmlFor: descriptionId, className: "mb-1 block text-sm font-medium", children: "Description" }),
2047
+ /* @__PURE__ */ jsx(
2048
+ Textarea,
2049
+ {
2050
+ id: descriptionId,
2051
+ value: form.description,
2052
+ onChange: (e) => setForm({ ...form, description: e.target.value })
2053
+ }
2054
+ ),
2055
+ /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: "Ce que le tri montre au mod\xE8le pour choisir cette cat\xE9gorie. Les \xAB Exemples \xBB ci-dessous restent des messages clients types \u2014 les deux sont envoy\xE9s s\xE9par\xE9ment." })
2056
+ ] }),
2043
2057
  /* @__PURE__ */ jsxs("div", { children: [
2044
2058
  /* @__PURE__ */ jsx("label", { htmlFor: examplesId, className: "mb-1 block text-sm font-medium", children: "Exemples" }),
2045
2059
  /* @__PURE__ */ jsx(
@@ -2121,6 +2135,10 @@ function CategoriesPage() {
2121
2135
  groupId: form.groupId || null,
2122
2136
  agentId: form.agentId || null,
2123
2137
  extraTags: form.extraTags.split(",").map((t) => t.trim()).filter(Boolean),
2138
+ // Explicit, `null` when blank — never omitted: the platform validates a
2139
+ // record write against the declared fields, and a declared-but-absent
2140
+ // key is a 422 (same trap as the graph-dry-run payload fixed in 2.7.1).
2141
+ description: form.description.trim() || null,
2124
2142
  examples: form.examples
2125
2143
  };
2126
2144
  try {