@iota-uz/sdk 0.4.29 → 0.4.30

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.
@@ -2,7 +2,7 @@ import React, { createContext, memo, useRef, useEffect, useCallback, useState, u
2
2
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
3
  import ReactApexChart from 'react-apexcharts';
4
4
  import ApexCharts from 'apexcharts';
5
- import { CaretUp, CaretDown, DotsThreeVertical, Check, Copy, X, Columns, ArrowsIn, ArrowsOut, Warning, ArrowClockwise, Paperclip, Stop, PaperPlaneRight, ChartBar, FileText, Lightbulb, CircleNotch, ArrowUUpLeft, PencilSimple, Bookmark, ArrowsClockwise, Archive, Trash, UsersThree, DotsThree, Image, MagnifyingGlass, DownloadSimple, ArrowCounterClockwise, Bug, ArrowUp, ArrowDown, Stack, ImageBroken, CaretLeft, CaretRight, Info, CheckCircle, XCircle, Spinner, WarningCircle, FilePdf, FileXls, FileCsv, FileDoc, FileCode, File as File$1, MagnifyingGlassMinus, MagnifyingGlassPlus, Download, ChatCircleDots, PencilSimpleLine, ArrowLeft, PaperPlaneTilt, ArrowRight, Timer, Lightning, Database, ArrowSquareOut, Wrench, ClockCounterClockwise, Package, Plus, Crown, UserPlus, ArrowsCounterClockwise, ChatCircle, Gear, Users, List, CaretLineLeft, CaretLineRight, Code, Table, SpinnerGap, FloppyDisk, ShareNetwork, Sidebar } from '@phosphor-icons/react';
5
+ import { CaretUp, CaretDown, DotsThreeVertical, Check, Copy, X, Columns, ArrowsIn, ArrowsOut, Warning, ArrowClockwise, Paperclip, Stop, PaperPlaneRight, ChartBar, FileText, Lightbulb, CircleNotch, ArrowUUpLeft, PencilSimple, Bookmark, ArrowsClockwise, Archive, Trash, UsersThree, DotsThree, Image, MagnifyingGlass, DownloadSimple, ArrowCounterClockwise, Bug, ArrowUp, ArrowDown, Stack, Brain, CaretUpDown, ImageBroken, CaretLeft, CaretRight, Info, CheckCircle, XCircle, Spinner, WarningCircle, FilePdf, FileXls, FileCsv, FileDoc, FileCode, File as File$1, MagnifyingGlassMinus, MagnifyingGlassPlus, Download, ChatCircleDots, PencilSimpleLine, ArrowLeft, PaperPlaneTilt, ArrowRight, Timer, Lightning, Database, ArrowSquareOut, Wrench, ClockCounterClockwise, Package, Plus, Crown, UserPlus, ArrowsCounterClockwise, ChatCircle, Gear, Users, List, CaretLineLeft, CaretLineRight, Code, Table, SpinnerGap, FloppyDisk, ShareNetwork, Sidebar } from '@phosphor-icons/react';
6
6
  import { Prism } from 'react-syntax-highlighter';
7
7
  import { vscDarkPlus, vs } from 'react-syntax-highlighter/dist/esm/styles/prism';
8
8
  import ReactMarkdown from 'react-markdown';
@@ -7989,10 +7989,33 @@ function AssistantMessage({
7989
7989
  /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-primary-700 dark:text-primary-300", children: t("BiChat.InlineQuestion.InputNeeded") }),
7990
7990
  /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-gray-500 dark:text-gray-400", children: t("BiChat.InlineQuestion.WaitingForDetails") })
7991
7991
  ] }),
7992
- renderMode === "hitl_resuming" && /* @__PURE__ */ jsxs("div", { className: "animate-slide-up rounded-2xl border border-emerald-200 dark:border-emerald-700/40 bg-gradient-to-b from-emerald-50/80 to-white dark:from-emerald-950/20 dark:to-gray-900/80 shadow-sm p-4", children: [
7993
- /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-emerald-700 dark:text-emerald-300", children: pendingQuestion?.status === "REJECT_SUBMITTED" ? "Dismissal submitted" : "Answer submitted" }),
7994
- /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-gray-500 dark:text-gray-400", children: "Continuing the run. This state will update automatically when the resume finishes." })
7995
- ] }),
7992
+ renderMode === "hitl_resuming" && /* @__PURE__ */ jsxs(
7993
+ "div",
7994
+ {
7995
+ role: "status",
7996
+ "aria-live": "polite",
7997
+ className: "animate-slide-up flex items-center gap-2 rounded-xl border border-emerald-100/80 bg-emerald-50/60 px-3 py-2 text-xs text-emerald-800 dark:border-emerald-900/60 dark:bg-emerald-950/20 dark:text-emerald-200",
7998
+ children: [
7999
+ /* @__PURE__ */ jsx(
8000
+ "span",
8001
+ {
8002
+ className: "inline-flex h-2 w-2 flex-shrink-0 rounded-full bg-emerald-500 animate-pulse",
8003
+ "aria-hidden": "true"
8004
+ }
8005
+ ),
8006
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: pendingQuestion?.status === "REJECT_SUBMITTED" ? t("BiChat.InlineQuestion.DismissalSubmitted") : t("BiChat.InlineQuestion.AnswerSubmitted") }),
8007
+ /* @__PURE__ */ jsx(
8008
+ "span",
8009
+ {
8010
+ className: "text-emerald-400/80 dark:text-emerald-500/80",
8011
+ "aria-hidden": "true",
8012
+ children: "\u2022"
8013
+ }
8014
+ ),
8015
+ /* @__PURE__ */ jsx("span", { className: "text-emerald-700/80 dark:text-emerald-300/80", children: t("BiChat.InlineQuestion.ResumeInProgress") })
8016
+ ]
8017
+ }
8018
+ ),
7996
8019
  renderMode === "hitl_form" && pendingQuestion && /* @__PURE__ */ jsx(InlineQuestionForm, { pendingQuestion }),
7997
8020
  hasContent && !hideActions && /* @__PURE__ */ jsx(
7998
8021
  "div",
@@ -9370,22 +9393,52 @@ function ReasoningEffortSelector({ options, value, onChange, disabled }) {
9370
9393
  const { t } = useTranslation();
9371
9394
  const selected = value || options[1] || options[0];
9372
9395
  const label = t("BiChat.Input.ReasoningEffort");
9373
- return /* @__PURE__ */ jsxs("div", { className: "flex-shrink-0 self-center flex items-center gap-1.5", children: [
9374
- /* @__PURE__ */ jsx("span", { className: "text-[10px] text-gray-400 dark:text-gray-500 font-medium whitespace-nowrap select-none", children: label }),
9375
- /* @__PURE__ */ jsx(
9376
- "select",
9396
+ const selectedLabel = t(EFFORT_LABEL_KEYS[selected] ?? selected);
9397
+ return /* @__PURE__ */ jsxs(Menu, { as: "div", className: "relative flex-shrink-0 self-center", children: [
9398
+ /* @__PURE__ */ jsxs(
9399
+ MenuButton,
9377
9400
  {
9378
- value: selected,
9379
9401
  disabled,
9380
- onChange: (event) => onChange(event.target.value),
9381
9402
  className: [
9382
- "cursor-pointer h-8 rounded-lg border border-gray-200 dark:border-gray-600",
9383
- "bg-gray-50 dark:bg-gray-700/50 px-2.5 text-[11px] font-medium leading-none",
9384
- "text-gray-700 dark:text-gray-200 focus:outline-none focus:ring-2 focus:ring-primary-500/25",
9385
- "disabled:opacity-40 disabled:cursor-not-allowed"
9403
+ "cursor-pointer inline-flex h-8 items-center gap-1.5 rounded-xl border border-gray-200/80 dark:border-gray-600/70",
9404
+ "bg-white dark:bg-gray-800 px-2.5 text-[11px] font-medium leading-none text-gray-700 dark:text-gray-200",
9405
+ "shadow-sm transition-colors hover:border-gray-300 hover:bg-white dark:hover:border-gray-500 dark:hover:bg-gray-800",
9406
+ "focus:outline-none focus:ring-2 focus:ring-primary-500/20",
9407
+ "disabled:cursor-not-allowed disabled:opacity-40"
9386
9408
  ].join(" "),
9387
9409
  "aria-label": label,
9388
- children: options.map((opt) => /* @__PURE__ */ jsx("option", { value: opt, children: t(EFFORT_LABEL_KEYS[opt] ?? opt) }, opt))
9410
+ title: `${label}: ${selectedLabel}`,
9411
+ children: [
9412
+ /* @__PURE__ */ jsx(Brain, { size: 14, weight: "duotone", className: "text-primary-600 dark:text-primary-400" }),
9413
+ /* @__PURE__ */ jsx("span", { className: "max-w-[72px] truncate", children: selectedLabel }),
9414
+ /* @__PURE__ */ jsx(CaretUpDown, { size: 12, className: "text-gray-400 dark:text-gray-500" })
9415
+ ]
9416
+ }
9417
+ ),
9418
+ /* @__PURE__ */ jsx(
9419
+ MenuItems,
9420
+ {
9421
+ anchor: "top end",
9422
+ className: "isolate z-30 min-w-[148px] rounded-xl border border-gray-200 bg-white p-1 shadow-xl ring-1 ring-black/5 dark:border-gray-700 dark:bg-gray-900 dark:ring-white/10 [--anchor-gap:8px]",
9423
+ children: options.map((opt) => {
9424
+ const optionLabel = t(EFFORT_LABEL_KEYS[opt] ?? opt);
9425
+ const isSelected = opt === selected;
9426
+ return /* @__PURE__ */ jsx(MenuItem, { children: ({ focus }) => /* @__PURE__ */ jsxs(
9427
+ "button",
9428
+ {
9429
+ type: "button",
9430
+ onClick: () => onChange(opt),
9431
+ className: [
9432
+ "flex w-full items-center gap-2 rounded-lg px-2.5 py-2 text-left text-[11px] font-medium transition-colors",
9433
+ focus ? "bg-primary-50 text-primary-700 dark:bg-primary-950/40 dark:text-primary-200" : "text-gray-700 dark:text-gray-200"
9434
+ ].join(" "),
9435
+ children: [
9436
+ /* @__PURE__ */ jsx("span", { className: "flex-1 truncate", children: optionLabel }),
9437
+ isSelected && /* @__PURE__ */ jsx(Check, { size: 12, weight: "bold", className: "text-primary-600 dark:text-primary-400" })
9438
+ ]
9439
+ }
9440
+ ) }, opt);
9441
+ })
9389
9442
  }
9390
9443
  )
9391
9444
  ] });