@apotech-os/support-kit 10.5.0 → 10.6.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 { EVALUATION_VERDICTS, WHATSAPP_MODES, toSharedPromptUsages, promptUsageOf, REFERENCE_TAG_SOURCE, isPromptUsedIn, foldOutcomes, foldDailyOutcomes, fillMissingDays, autonomyRate, settledCount, countFailed, dashboardSignals, foldHumanReasons, foldCategoryOutcomes, toDeliveryPolicy, DEFAULT_PROMPT_USAGE, validateSettings, settingsWarnings, SUPPORT_CHANNELS, AGENT_GUARDRAILS, SYSTEM_PROMPTS, systemPromptOf, periodBoundsOf, toCategory, OUTCOME_METRICS, OUTCOME_GROUP_BY, TRIAGE_HANDOFF_GROUP_BY, CATEGORY_TRIAGE_GROUP_BY, CATEGORY_OUTCOME_GROUP_BY, ratePoints, REPLY_TIMING_METRICS, REPLY_TIMING_GROUP_BY, foldReplyTimings, DELAY_BUCKETS, toGeneratedResponse, toTriageDecision, toAgent, toResponseComparison, isGeneratedResponseStatus, isInvalidatableStatus, toCategoryGroup, followupIntegrationName, FOLLOWUP_WEBHOOK_TRIGGER, followupWebhookPath, FOLLOWUP_WEBHOOK_FORM, readConversationEnd, DEFAULT_CONVERSATION_END_TAG, NODE_NAMES, settingsToProfile, hasNoDraftNode, isPromptUsage, buildTimelineSteps, conversationEndEffects, outcomeTags, DEFAULT_LLM_PROVIDER, computeWordDiff, isSendableVerdict, COLLISION_GUARDRAILS, DEFAULT_MAX_TOOL_CALLS, DEFAULT_MIN_CONFIDENCE, DEFAULT_ESCALATION_ENABLED } from '../chunk-CHOOLNZW.js';
1
+ import { EVALUATION_VERDICTS, WHATSAPP_MODES, toSharedPromptUsages, promptUsageOf, REFERENCE_TAG_SOURCE, isPromptUsedIn, foldOutcomes, foldDailyOutcomes, fillMissingDays, autonomyRate, settledCount, countFailed, dashboardSignals, foldHumanReasons, foldCategoryOutcomes, toDeliveryPolicy, DEFAULT_PROMPT_USAGE, validateSettings, settingsWarnings, SUPPORT_CHANNELS, AGENT_GUARDRAILS, SYSTEM_PROMPTS, systemPromptOf, periodBoundsOf, toCategory, OUTCOME_METRICS, OUTCOME_GROUP_BY, TRIAGE_HANDOFF_GROUP_BY, CATEGORY_TRIAGE_GROUP_BY, CATEGORY_OUTCOME_GROUP_BY, ratePoints, REPLY_TIMING_METRICS, REPLY_TIMING_GROUP_BY, foldReplyTimings, DELAY_BUCKETS, toGeneratedResponse, toTriageDecision, toAgent, toResponseComparison, isGeneratedResponseStatus, isInvalidatableStatus, toCategoryGroup, followupIntegrationName, FOLLOWUP_WEBHOOK_TRIGGER, followupWebhookPath, FOLLOWUP_WEBHOOK_FORM, readConversationEnd, DEFAULT_CONVERSATION_END_TAG, NODE_NAMES, settingsToProfile, hasNoDraftNode, isPromptUsage, buildTimelineSteps, conversationEndEffects, outcomeTags, DEFAULT_LLM_PROVIDER, computeWordDiff, isSendableVerdict, COLLISION_GUARDRAILS, DEFAULT_MAX_TOOL_CALLS, DEFAULT_MIN_CONFIDENCE, DEFAULT_ESCALATION_ENABLED } from '../chunk-CQQANQLB.js';
2
2
  import { forwardRef, useMemo, useRef, useState, useEffect, useCallback, useId } from 'react';
3
3
  import { cn, Textarea, useAppContext, useAppApi, useAppSettings, useAppPageHref, DateRangeCompare, Link, Card, CardHeader, CardTitle, CardContent, AreaChart, StackedBarChart, Badge, useToast, Button, Select, DataTable, Spinner, Switch, Checkbox, Input, comparisonRange, SidePanel, Modal, Tooltip, buttonVariants, useAppRun, AppInvokeError, CopyButton, relativeDelta, Table, TableHeader, TableRow, TableHead, TableBody, TableCell, downloadBlob } from '@apotech-os/ui-sdk';
4
4
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -2156,7 +2156,7 @@ var PIPELINE_STEPS = [
2156
2156
  {
2157
2157
  key: "draft",
2158
2158
  label: "R\xE9daction",
2159
- description: "pr\xE9pare un projet de r\xE9ponse",
2159
+ description: "pr\xE9pare un projet de r\xE9ponse \u2014 mod\xE8le et effort par d\xE9faut des agents qui n'en pr\xE9cisent pas",
2160
2160
  requires: null,
2161
2161
  blockedReason: null
2162
2162
  },
@@ -2170,7 +2170,7 @@ var PIPELINE_STEPS = [
2170
2170
  {
2171
2171
  key: "revise",
2172
2172
  label: "R\xE9vision",
2173
- description: "r\xE9\xE9crit la r\xE9ponse si l'\xE9valuation la juge insuffisante",
2173
+ description: "r\xE9\xE9crit la r\xE9ponse si l'\xE9valuation la juge insuffisante, avec le mod\xE8le et l'effort de l'agent qui l'a r\xE9dig\xE9e \u2014 ceux-ci \xE0 d\xE9faut",
2174
2174
  requires: "evaluate",
2175
2175
  blockedReason: "Sans \xE9valuation, rien ne d\xE9clenche une r\xE9vision."
2176
2176
  }
@@ -2867,6 +2867,7 @@ function emptyForm() {
2867
2867
  name: "",
2868
2868
  modelId: "",
2869
2869
  provider: DEFAULT_LLM_PROVIDER,
2870
+ reasoningEffort: "",
2870
2871
  status: "available",
2871
2872
  promptName: "",
2872
2873
  promptLabel: "",
@@ -2878,12 +2879,14 @@ function formFromAgent(agent) {
2878
2879
  name: agent.name,
2879
2880
  modelId: agent.modelId,
2880
2881
  provider: agent.provider,
2882
+ reasoningEffort: agent.reasoningEffort ?? "",
2881
2883
  status: agent.status,
2882
2884
  promptName: agent.promptName,
2883
2885
  promptLabel: agent.promptLabel ?? "",
2884
2886
  systemPromptSnapshot: agent.systemPromptSnapshot ?? ""
2885
2887
  };
2886
2888
  }
2889
+ var STEP_EFFORT_VALUE = "__step__";
2887
2890
  var DERIVED_PROMPT_VALUE = "__derived__";
2888
2891
  var CUSTOM_PROMPT_VALUE = "__custom-prompt__";
2889
2892
  var DEFAULT_LABEL_VALUE = "__production__";
@@ -3015,6 +3018,25 @@ function AgentFormPanel({
3015
3018
  )
3016
3019
  ] })
3017
3020
  ] }),
3021
+ /* @__PURE__ */ jsxs("div", { children: [
3022
+ /* @__PURE__ */ jsx("p", { className: "mb-1 text-sm font-medium", children: "Effort de raisonnement" }),
3023
+ /* @__PURE__ */ jsx(
3024
+ Select,
3025
+ {
3026
+ "aria-label": "Effort de raisonnement",
3027
+ value: form.reasoningEffort === "" ? STEP_EFFORT_VALUE : form.reasoningEffort,
3028
+ onValueChange: (next) => setForm({ ...form, reasoningEffort: next === STEP_EFFORT_VALUE ? "" : next }),
3029
+ items: [
3030
+ { value: STEP_EFFORT_VALUE, label: "Celui de l'\xE9tape R\xE9daction" },
3031
+ ...REASONING_EFFORTS.map((effort) => ({
3032
+ value: effort.value,
3033
+ label: effort.label
3034
+ }))
3035
+ ]
3036
+ }
3037
+ ),
3038
+ /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: "Ignor\xE9 par les mod\xE8les qui ne raisonnent pas." })
3039
+ ] }),
3018
3040
  /* @__PURE__ */ jsxs("div", { children: [
3019
3041
  /* @__PURE__ */ jsx("p", { className: "mb-1 text-sm font-medium", children: "Prompt Langfuse" }),
3020
3042
  /* @__PURE__ */ jsxs("div", { className: "grid gap-2 sm:grid-cols-2", children: [
@@ -3346,6 +3368,7 @@ function AgentsPage() {
3346
3368
  name: form.name,
3347
3369
  modelId: form.modelId,
3348
3370
  provider: form.provider,
3371
+ reasoningEffort: form.reasoningEffort,
3349
3372
  systemPromptSnapshot: form.systemPromptSnapshot,
3350
3373
  // Verbatim (trim only) — empty means "derive agent/<id>", and an
3351
3374
  // empty label means "follow production" (stored null, never the
@@ -3361,6 +3384,7 @@ function AgentsPage() {
3361
3384
  name: form.name,
3362
3385
  modelId: form.modelId,
3363
3386
  provider: form.provider,
3387
+ reasoningEffort: form.reasoningEffort || null,
3364
3388
  promptName: form.promptName.trim(),
3365
3389
  promptLabel: form.promptLabel.trim() || null,
3366
3390
  ...formAgent.status !== "default" ? { status: form.status } : {}
@@ -3379,7 +3403,14 @@ function AgentsPage() {
3379
3403
  }
3380
3404
  const columns = [
3381
3405
  { key: "name", header: "Nom", cell: (row) => row.name },
3382
- { key: "model", header: "Mod\xE8le", cell: (row) => `${row.provider} / ${row.modelId}` },
3406
+ {
3407
+ key: "model",
3408
+ header: "Mod\xE8le",
3409
+ cell: (row) => {
3410
+ const effort = REASONING_EFFORTS.find((e) => e.value === row.reasoningEffort);
3411
+ return `${row.provider} / ${row.modelId}${effort ? ` \xB7 effort ${effort.label.toLowerCase()}` : ""}`;
3412
+ }
3413
+ },
3383
3414
  {
3384
3415
  key: "status",
3385
3416
  header: "Statut",