@axiom-lattice/react-sdk 6.0.0 → 6.1.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.
Files changed (72) hide show
  1. package/dist/{AgentDetailSideApp-QZPV7MNB.mjs → AgentDetailSideApp-6FBJVX34.mjs} +8 -8
  2. package/dist/AgentGovernanceWorkbench-EOHBGBDO.mjs +20 -0
  3. package/dist/{MessageGraph-JX6Y3VFH.mjs → MessageGraph-W3ZJZWQX.mjs} +4 -4
  4. package/dist/{ReactChart-LYUXL5M6.mjs → ReactChart-WZM5FNED.mjs} +4 -4
  5. package/dist/{SkillFlow-7OCWAF5V.mjs → SkillFlow-IEUMMNOL.mjs} +4 -4
  6. package/dist/{TasksSideApp-TWDLVB4D.mjs → TasksSideApp-LV4XG5T3.mjs} +5 -5
  7. package/dist/{TeamWorkspace-FGFAUD5Z.mjs → TeamWorkspace-Y5BLJDDP.mjs} +4 -4
  8. package/dist/{TopologyRuntimeView-O3VL4A7R.mjs → TopologyRuntimeView-6QPO555O.mjs} +5 -5
  9. package/dist/{WorkflowAutomationView-D4YMZLRJ.mjs → WorkflowAutomationView-PJAN5335.mjs} +7 -7
  10. package/dist/{chunk-UZWBRDTU.mjs → chunk-APWKT32P.mjs} +6 -6
  11. package/dist/{chunk-QABSNIMF.mjs → chunk-CEKDKFK4.mjs} +3 -3
  12. package/dist/{chunk-IODHU3BD.mjs → chunk-CTWP76BZ.mjs} +3 -3
  13. package/dist/{chunk-IFRTNJ2P.mjs → chunk-ED5Z75BU.mjs} +2 -2
  14. package/dist/{chunk-UDSGQ7R7.mjs → chunk-ENDMVOPK.mjs} +3 -3
  15. package/dist/{chunk-466FV4VM.mjs → chunk-FJHVMIR4.mjs} +3 -3
  16. package/dist/{chunk-7JDWJZ5M.mjs → chunk-OZPJVRTV.mjs} +278 -42
  17. package/dist/chunk-OZPJVRTV.mjs.map +1 -0
  18. package/dist/{chunk-JJIGSAPR.mjs → chunk-QYAJFSZG.mjs} +6 -6
  19. package/dist/{chunk-3ZEMSWAC.mjs → chunk-TXYO3AFN.mjs} +4 -4
  20. package/dist/{chunk-6BWBE7MR.mjs → chunk-WUPFAL2J.mjs} +7 -7
  21. package/dist/{embed-page-AgentDetailSideApp-JYVZKSUU.js → embed-page-AgentDetailSideApp-2UFH4RJG.js} +1 -1
  22. package/dist/{embed-page-AgentGovernanceWorkbench-SD2EHW2B.js → embed-page-AgentGovernanceWorkbench-3JOSRW2V.js} +1 -1
  23. package/dist/{embed-page-MessageGraph-GLQXKAVC.js → embed-page-MessageGraph-SPB75EHC.js} +1 -1
  24. package/dist/{embed-page-ReactChart-74MHCE2K.js → embed-page-ReactChart-EE4A5WKS.js} +1 -1
  25. package/dist/{embed-page-SkillFlow-NDAK3GAD.js → embed-page-SkillFlow-H2ARZGEX.js} +1 -1
  26. package/dist/{embed-page-TasksSideApp-DA4LUTMD.js → embed-page-TasksSideApp-BQMOLOUF.js} +1 -1
  27. package/dist/{embed-page-TeamWorkspace-DUB3L6V6.js → embed-page-TeamWorkspace-QXMRVXWU.js} +1 -1
  28. package/dist/{embed-page-TopologyRuntimeView-NFBHAICN.js → embed-page-TopologyRuntimeView-OSV75P6Y.js} +1 -1
  29. package/dist/{embed-page-WorkflowAutomationView-43YGTXGF.js → embed-page-WorkflowAutomationView-KJ6HJ5UT.js} +1 -1
  30. package/dist/{embed-page-chunk-UHH575CK.js → embed-page-chunk-DBUC6J4G.js} +1 -1
  31. package/dist/{embed-page-chunk-C4ZV4IXK.js → embed-page-chunk-E6F5YZBR.js} +1 -1
  32. package/dist/{embed-page-chunk-BVSC3MSO.js → embed-page-chunk-FGKHXQAJ.js} +1 -1
  33. package/dist/{embed-page-chunk-2PFKLMTR.js → embed-page-chunk-GSCVATOA.js} +1 -1
  34. package/dist/{embed-page-chunk-GKHIPXZ2.js → embed-page-chunk-IIEDLN7W.js} +1 -1
  35. package/dist/{embed-page-chunk-P477ZTUO.js → embed-page-chunk-U4XSGC4Y.js} +163 -163
  36. package/dist/{embed-page-chunk-DWIBLGBW.js → embed-page-chunk-VXWRPT33.js} +1 -1
  37. package/dist/{embed-page-en-S4MXFPIU.js → embed-page-en-X6B6RVNL.js} +1 -1
  38. package/dist/{embed-page-zh-SSMSF5LE.js → embed-page-zh-EQ5X2M32.js} +1 -1
  39. package/dist/embed-page.js +1 -1
  40. package/dist/{en-4IN5LWNF.mjs → en-DQDMGSNU.mjs} +21 -1
  41. package/dist/{en-4IN5LWNF.mjs.map → en-DQDMGSNU.mjs.map} +1 -1
  42. package/dist/index.d.mts +31 -1
  43. package/dist/index.d.ts +31 -1
  44. package/dist/index.js +1760 -1482
  45. package/dist/index.js.map +1 -1
  46. package/dist/index.mjs +10 -10
  47. package/dist/web-app.js +40 -0
  48. package/dist/web-app.js.map +1 -1
  49. package/dist/web-app.mjs +1 -1
  50. package/dist/{zh-RAN4V57S.mjs → zh-BKAP45UO.mjs} +21 -1
  51. package/dist/{zh-RAN4V57S.mjs.map → zh-BKAP45UO.mjs.map} +1 -1
  52. package/package.json +3 -3
  53. package/dist/AgentGovernanceWorkbench-25C3AKQI.mjs +0 -20
  54. package/dist/chunk-7JDWJZ5M.mjs.map +0 -1
  55. /package/dist/{AgentDetailSideApp-QZPV7MNB.mjs.map → AgentDetailSideApp-6FBJVX34.mjs.map} +0 -0
  56. /package/dist/{AgentGovernanceWorkbench-25C3AKQI.mjs.map → AgentGovernanceWorkbench-EOHBGBDO.mjs.map} +0 -0
  57. /package/dist/{MessageGraph-JX6Y3VFH.mjs.map → MessageGraph-W3ZJZWQX.mjs.map} +0 -0
  58. /package/dist/{ReactChart-LYUXL5M6.mjs.map → ReactChart-WZM5FNED.mjs.map} +0 -0
  59. /package/dist/{SkillFlow-7OCWAF5V.mjs.map → SkillFlow-IEUMMNOL.mjs.map} +0 -0
  60. /package/dist/{TasksSideApp-TWDLVB4D.mjs.map → TasksSideApp-LV4XG5T3.mjs.map} +0 -0
  61. /package/dist/{TeamWorkspace-FGFAUD5Z.mjs.map → TeamWorkspace-Y5BLJDDP.mjs.map} +0 -0
  62. /package/dist/{TopologyRuntimeView-O3VL4A7R.mjs.map → TopologyRuntimeView-6QPO555O.mjs.map} +0 -0
  63. /package/dist/{WorkflowAutomationView-D4YMZLRJ.mjs.map → WorkflowAutomationView-PJAN5335.mjs.map} +0 -0
  64. /package/dist/{chunk-UZWBRDTU.mjs.map → chunk-APWKT32P.mjs.map} +0 -0
  65. /package/dist/{chunk-QABSNIMF.mjs.map → chunk-CEKDKFK4.mjs.map} +0 -0
  66. /package/dist/{chunk-IODHU3BD.mjs.map → chunk-CTWP76BZ.mjs.map} +0 -0
  67. /package/dist/{chunk-IFRTNJ2P.mjs.map → chunk-ED5Z75BU.mjs.map} +0 -0
  68. /package/dist/{chunk-UDSGQ7R7.mjs.map → chunk-ENDMVOPK.mjs.map} +0 -0
  69. /package/dist/{chunk-466FV4VM.mjs.map → chunk-FJHVMIR4.mjs.map} +0 -0
  70. /package/dist/{chunk-JJIGSAPR.mjs.map → chunk-QYAJFSZG.mjs.map} +0 -0
  71. /package/dist/{chunk-3ZEMSWAC.mjs.map → chunk-TXYO3AFN.mjs.map} +0 -0
  72. /package/dist/{chunk-6BWBE7MR.mjs.map → chunk-WUPFAL2J.mjs.map} +0 -0
@@ -9,7 +9,7 @@ import {
9
9
  useAuthOptional,
10
10
  useClient,
11
11
  useLatticeChatShellContext
12
- } from "./chunk-IFRTNJ2P.mjs";
12
+ } from "./chunk-ED5Z75BU.mjs";
13
13
  import {
14
14
  XMarkdown_default,
15
15
  formatErrorMessage,
@@ -18,7 +18,7 @@ import {
18
18
  import {
19
19
  useLocale,
20
20
  useT
21
- } from "./chunk-IODHU3BD.mjs";
21
+ } from "./chunk-CTWP76BZ.mjs";
22
22
 
23
23
  // src/AppRegistry.ts
24
24
  var AppRegistryImpl = class {
@@ -6393,6 +6393,8 @@ import {
6393
6393
  Eye,
6394
6394
  EyeOff,
6395
6395
  Info,
6396
+ Lightbulb,
6397
+ LightbulbOff,
6396
6398
  Plus as Plus3,
6397
6399
  RefreshCw,
6398
6400
  Trash2
@@ -6409,13 +6411,19 @@ function toModelOption(model, providerLabels = /* @__PURE__ */ new Map()) {
6409
6411
  // which is why this falls back to the key itself.
6410
6412
  model: parseModelKey(model.modelKey)?.modelId ?? model.modelKey,
6411
6413
  providerLabel: providerLabels.get(model.providerId),
6412
- isDefault: model.isDefault
6414
+ isDefault: model.isDefault,
6415
+ kind: model.kind
6413
6416
  };
6414
6417
  }
6415
- function isRunnable(model, disabledProviderIds) {
6416
- return model.enabled && !model.stale && !disabledProviderIds.has(model.providerId);
6418
+ function isRunnable(model, disabledProviderIds, kind) {
6419
+ return (
6420
+ // An absent kind is read as chat. Rows predate the column and the server
6421
+ // defaults to chat, so a thinner payload must not empty every picker — the
6422
+ // same tolerance this projection already shows for a partial provider list.
6423
+ (model.kind ?? "chat") === kind && model.enabled && !model.stale && !disabledProviderIds.has(model.providerId)
6424
+ );
6417
6425
  }
6418
- function toModelOptions(catalog) {
6426
+ function toModelOptions(catalog, kind = "chat") {
6419
6427
  const models = catalog?.models;
6420
6428
  if (!Array.isArray(models)) {
6421
6429
  return [];
@@ -6429,7 +6437,7 @@ function toModelOptions(catalog) {
6429
6437
  // an absent flag is not a disabled provider.
6430
6438
  providers.filter((provider) => provider.enabled === false).map((provider) => provider.id)
6431
6439
  );
6432
- return models.filter((model) => isRunnable(model, disabledProviderIds)).map((model) => toModelOption(model, providerLabels));
6440
+ return models.filter((model) => isRunnable(model, disabledProviderIds, kind)).map((model) => toModelOption(model, providerLabels));
6433
6441
  }
6434
6442
  function modelOptionLabel(option) {
6435
6443
  const label = option.displayName || option.model || option.key;
@@ -6462,6 +6470,20 @@ var PROVIDER_TEMPLATES = [
6462
6470
  baseURL: "https://api.moonshot.cn/v1",
6463
6471
  name: "kimi"
6464
6472
  },
6473
+ {
6474
+ key: "dashscope",
6475
+ label: "Alibaba Cloud",
6476
+ // The OpenAI-compatible surface, not DashScope's native one: tenant
6477
+ // providers are pinned to `llmProvider: "openai"`.
6478
+ baseURL: "https://dashscope.aliyuncs.com/compatible-mode/v1",
6479
+ name: "dashscope"
6480
+ },
6481
+ {
6482
+ key: "volcengine",
6483
+ label: "Volcengine",
6484
+ baseURL: "https://ark.cn-beijing.volces.com/api/v3",
6485
+ name: "volcengine"
6486
+ },
6465
6487
  {
6466
6488
  key: "openai",
6467
6489
  label: "OpenAI",
@@ -6546,11 +6568,16 @@ function modelIdOf(model) {
6546
6568
  return parseModelKey2(model.modelKey)?.modelId ?? model.modelKey;
6547
6569
  }
6548
6570
  function hasExtraConfig(extra) {
6549
- return Object.keys(extra ?? {}).some((key) => key !== "supportsVision");
6571
+ return Object.keys(extra ?? {}).some(
6572
+ (key) => key !== "supportsVision" && key !== "disableThinking"
6573
+ );
6550
6574
  }
6551
6575
  function readsImages(extra) {
6552
6576
  return extra?.supportsVision === true;
6553
6577
  }
6578
+ function thinkingDisabled(extra) {
6579
+ return extra?.disableThinking === true;
6580
+ }
6554
6581
  function dedupeById(models) {
6555
6582
  const byId = /* @__PURE__ */ new Map();
6556
6583
  for (const model of models) {
@@ -6579,7 +6606,9 @@ var ProviderModelsModal = ({
6579
6606
  onToggleModel,
6580
6607
  onRemoveModel,
6581
6608
  onEditModel,
6582
- onToggleVision
6609
+ onToggleVision,
6610
+ onToggleThinking,
6611
+ onTestModel
6583
6612
  }) => {
6584
6613
  const t = useT();
6585
6614
  const isSync = state2.kind === "sync";
@@ -6667,6 +6696,21 @@ var ProviderModelsModal = ({
6667
6696
  List2.Item,
6668
6697
  {
6669
6698
  actions: [
6699
+ ...model.kind === "embedding" ? [
6700
+ /* @__PURE__ */ jsx18(
6701
+ Button6,
6702
+ {
6703
+ type: "text",
6704
+ size: "small",
6705
+ icon: /* @__PURE__ */ jsx18(Activity, { size: 14 }),
6706
+ "aria-label": t(
6707
+ "auth.modelProviders.embeddingTestAria"
6708
+ ),
6709
+ onClick: () => onTestModel(modelId)
6710
+ },
6711
+ "test"
6712
+ )
6713
+ ] : [],
6670
6714
  /* @__PURE__ */ jsx18(
6671
6715
  Button6,
6672
6716
  {
@@ -6716,6 +6760,7 @@ var ProviderModelsModal = ({
6716
6760
  }
6717
6761
  ),
6718
6762
  /* @__PURE__ */ jsx18(Text3, { children: modelId }),
6763
+ model.kind !== "chat" && /* @__PURE__ */ jsx18(Tag, { color: "blue", children: model.kind === "embedding" ? t("auth.modelProviders.kindEmbedding") : t("auth.modelProviders.kindAsr") }),
6719
6764
  model.source === "snapshot" && /* @__PURE__ */ jsx18(
6720
6765
  Popover,
6721
6766
  {
@@ -6762,6 +6807,54 @@ var ProviderModelsModal = ({
6762
6807
  )
6763
6808
  }
6764
6809
  ),
6810
+ model.source === "snapshot" && /* @__PURE__ */ jsx18(
6811
+ Popover,
6812
+ {
6813
+ trigger: "hover",
6814
+ title: /* @__PURE__ */ jsxs11(Space2, { size: 8, children: [
6815
+ /* @__PURE__ */ jsx18("span", { children: t("auth.modelProviders.thinkingTitle") }),
6816
+ /* @__PURE__ */ jsx18(
6817
+ Tag,
6818
+ {
6819
+ color: thinkingDisabled(model.extra) ? "default" : "green",
6820
+ children: thinkingDisabled(model.extra) ? t("auth.modelProviders.thinkingOff") : t("auth.modelProviders.thinkingOn")
6821
+ }
6822
+ )
6823
+ ] }),
6824
+ content: /* @__PURE__ */ jsxs11(
6825
+ Space2,
6826
+ {
6827
+ direction: "vertical",
6828
+ size: 8,
6829
+ style: { maxWidth: 280 },
6830
+ children: [
6831
+ /* @__PURE__ */ jsx18(Text3, { children: t("auth.modelProviders.thinkingHelp") }),
6832
+ /* @__PURE__ */ jsx18(
6833
+ Button6,
6834
+ {
6835
+ type: "primary",
6836
+ block: true,
6837
+ onClick: () => onToggleThinking(
6838
+ modelId,
6839
+ !thinkingDisabled(model.extra)
6840
+ ),
6841
+ children: thinkingDisabled(model.extra) ? t("auth.modelProviders.thinkingTurnOn") : t("auth.modelProviders.thinkingTurnOff")
6842
+ }
6843
+ )
6844
+ ]
6845
+ }
6846
+ ),
6847
+ children: /* @__PURE__ */ jsx18(
6848
+ Button6,
6849
+ {
6850
+ type: "text",
6851
+ size: "small",
6852
+ icon: thinkingDisabled(model.extra) ? /* @__PURE__ */ jsx18(LightbulbOff, { size: 14 }) : /* @__PURE__ */ jsx18(Lightbulb, { size: 14 }),
6853
+ "aria-label": thinkingDisabled(model.extra) ? t("auth.modelProviders.thinkingAriaOff") : t("auth.modelProviders.thinkingAriaOn")
6854
+ }
6855
+ )
6856
+ }
6857
+ ),
6765
6858
  model.isDefault && /* @__PURE__ */ jsx18(Text3, { type: "secondary", style: { fontSize: 12 }, children: t("auth.modelProviders.badgeDefault") }),
6766
6859
  hasExtraConfig(model.extra) && /* @__PURE__ */ jsx18(Text3, { type: "secondary", style: { fontSize: 12 }, children: t("auth.modelProviders.badgeCustomConfig") }),
6767
6860
  model.stale && /* @__PURE__ */ jsx18(Text3, { type: "secondary", style: { fontSize: 12 }, children: t("auth.modelProviders.droppedUpstream") })
@@ -6912,7 +7005,7 @@ var TenantModelProvidersPanel = () => {
6912
7005
  });
6913
7006
  };
6914
7007
  const openAddModel = (provider) => {
6915
- setModelDraft({ provider, modelId: "", extra: "" });
7008
+ setModelDraft({ provider, modelId: "", extra: "", kind: "chat" });
6916
7009
  };
6917
7010
  const openEditModel = (provider, modelId) => {
6918
7011
  const model = (modelsByProvider.get(provider.id) ?? []).find(
@@ -6923,7 +7016,8 @@ var TenantModelProvidersPanel = () => {
6923
7016
  provider,
6924
7017
  editing: modelId,
6925
7018
  modelId,
6926
- extra: model?.extra ? JSON.stringify(model.extra, null, 2) : ""
7019
+ extra: model?.extra ? JSON.stringify(model.extra, null, 2) : "",
7020
+ kind: model?.kind ?? "chat"
6927
7021
  });
6928
7022
  };
6929
7023
  const handleSaveModel = async () => {
@@ -6954,13 +7048,17 @@ var TenantModelProvidersPanel = () => {
6954
7048
  modelId: modelIdOf(model),
6955
7049
  enabled: model.enabled,
6956
7050
  stale: model.stale,
6957
- extra: model.extra
7051
+ extra: model.extra,
7052
+ // Explicit, not omitted: the endpoint replaces the whole set, and an
7053
+ // omitted kind would be harmless — but being explicit keeps this write
7054
+ // independent of the store's carry rule.
7055
+ kind: model.kind
6958
7056
  }));
6959
7057
  const at = next.findIndex((entry) => entry.modelId === modelId);
6960
7058
  if (at >= 0) {
6961
- next[at] = { ...next[at], extra };
7059
+ next[at] = { ...next[at], extra, kind: modelDraft.kind };
6962
7060
  } else {
6963
- next.push({ modelId, enabled: true, extra });
7061
+ next.push({ modelId, enabled: true, extra, kind: modelDraft.kind });
6964
7062
  }
6965
7063
  setSavingModel(true);
6966
7064
  try {
@@ -7222,6 +7320,65 @@ var TenantModelProvidersPanel = () => {
7222
7320
  );
7223
7321
  }
7224
7322
  };
7323
+ const handleToggleThinking = async (provider, modelId, disableThinking) => {
7324
+ const next = (modelsByProvider.get(provider.id) ?? []).map((model) => {
7325
+ const entry = {
7326
+ modelId: modelIdOf(model),
7327
+ enabled: model.enabled,
7328
+ stale: model.stale,
7329
+ extra: model.extra
7330
+ };
7331
+ if (entry.modelId !== modelId) {
7332
+ return entry;
7333
+ }
7334
+ const rest = { ...entry.extra ?? {} };
7335
+ delete rest.disableThinking;
7336
+ return {
7337
+ ...entry,
7338
+ extra: disableThinking ? { ...rest, disableThinking: true } : rest
7339
+ };
7340
+ });
7341
+ try {
7342
+ await setProviderModels(provider.id, next);
7343
+ message2.success(
7344
+ disableThinking ? t("auth.modelProviders.thinkingMarked") : t("auth.modelProviders.thinkingCleared")
7345
+ );
7346
+ } catch (err) {
7347
+ message2.error(
7348
+ err instanceof Error ? err.message : t("auth.modelProviders.thinkingUpdateFailed")
7349
+ );
7350
+ }
7351
+ };
7352
+ const handleTestModel = async (provider, modelId) => {
7353
+ try {
7354
+ const result = await probeProvider({
7355
+ baseURL: provider.baseURL,
7356
+ providerId: provider.id,
7357
+ kind: "embedding",
7358
+ modelId
7359
+ });
7360
+ if (!result.reachable) {
7361
+ message2.error(
7362
+ t("auth.modelProviders.embeddingTestFailed", {
7363
+ reason: result.error || ""
7364
+ })
7365
+ );
7366
+ return;
7367
+ }
7368
+ message2.success(
7369
+ result.dimensions ? t("auth.modelProviders.embeddingTestOk", {
7370
+ dimensions: result.dimensions,
7371
+ latency: result.latencyMs
7372
+ }) : t("auth.modelProviders.embeddingTestNoVector", {
7373
+ latency: result.latencyMs
7374
+ })
7375
+ );
7376
+ } catch (err) {
7377
+ message2.error(
7378
+ err instanceof Error ? err.message : t("auth.modelProviders.embeddingTestFailed", { reason: "" })
7379
+ );
7380
+ }
7381
+ };
7225
7382
  const handleSetDefaultModel = async (modelKey) => {
7226
7383
  const parsed = parseModelKey2(modelKey);
7227
7384
  if (!parsed) return;
@@ -7592,6 +7749,20 @@ var TenantModelProvidersPanel = () => {
7592
7749
  supportsVision
7593
7750
  );
7594
7751
  }
7752
+ },
7753
+ onToggleThinking: (modelId, disableThinking) => {
7754
+ if (modelsModal.provider) {
7755
+ void handleToggleThinking(
7756
+ modelsModal.provider,
7757
+ modelId,
7758
+ disableThinking
7759
+ );
7760
+ }
7761
+ },
7762
+ onTestModel: (modelId) => {
7763
+ if (modelsModal.provider) {
7764
+ void handleTestModel(modelsModal.provider, modelId);
7765
+ }
7595
7766
  }
7596
7767
  }
7597
7768
  ),
@@ -7623,6 +7794,26 @@ var TenantModelProvidersPanel = () => {
7623
7794
  ),
7624
7795
  /* @__PURE__ */ jsx18(Text3, { style: helpStyle, children: t("auth.modelProviders.modelIdHelp") })
7625
7796
  ] }),
7797
+ /* @__PURE__ */ jsxs11("div", { children: [
7798
+ /* @__PURE__ */ jsx18(Text3, { style: labelStyle, children: t("auth.modelProviders.kindLabel") }),
7799
+ /* @__PURE__ */ jsx18(
7800
+ Select,
7801
+ {
7802
+ style: { width: "100%" },
7803
+ value: modelDraft.kind,
7804
+ onChange: (kind) => setModelDraft({ ...modelDraft, kind }),
7805
+ options: [
7806
+ { value: "chat", label: t("auth.modelProviders.kindChat") },
7807
+ {
7808
+ value: "embedding",
7809
+ label: t("auth.modelProviders.kindEmbedding")
7810
+ },
7811
+ { value: "asr", label: t("auth.modelProviders.kindAsr") }
7812
+ ]
7813
+ }
7814
+ ),
7815
+ /* @__PURE__ */ jsx18(Text3, { style: helpStyle, children: t("auth.modelProviders.kindHelp") })
7816
+ ] }),
7626
7817
  /* @__PURE__ */ jsxs11("div", { children: [
7627
7818
  /* @__PURE__ */ jsx18(Text3, { style: labelStyle, children: t("auth.modelProviders.extraConfigLabel") }),
7628
7819
  /* @__PURE__ */ jsx18(
@@ -10765,7 +10956,8 @@ function useVoiceRecorder(options) {
10765
10956
  mode: initialMode = "auto",
10766
10957
  autoMode = {},
10767
10958
  onTranscription,
10768
- maxDuration = 120
10959
+ maxDuration = 120,
10960
+ modelKey
10769
10961
  } = options;
10770
10962
  const { silenceThreshold = 0.05, silenceDuration = 2e3, timeslice = 1e3 } = autoMode;
10771
10963
  const [state2, setState] = useState36({
@@ -10845,13 +11037,14 @@ function useVoiceRecorder(options) {
10845
11037
  const formData = new FormData();
10846
11038
  const ext = blob.type.includes("webm") ? "webm" : blob.type.includes("mp4") ? "m4a" : "webm";
10847
11039
  formData.append("file", blob, `audio.${ext}`);
10848
- const data = await client.request("/api/stt/transcribe", {
11040
+ const url = modelKey ? `/api/stt/transcribe?model=${encodeURIComponent(modelKey)}` : "/api/stt/transcribe";
11041
+ const data = await client.request(url, {
10849
11042
  method: "POST",
10850
11043
  body: formData
10851
11044
  });
10852
11045
  return data.text || "";
10853
11046
  },
10854
- [client]
11047
+ [client, modelKey]
10855
11048
  );
10856
11049
  const startRecording = useCallback28(async () => {
10857
11050
  if (statusRef.current !== "idle") return;
@@ -25240,7 +25433,7 @@ import { useState as useState73, useEffect as useEffect51, useCallback as useCal
25240
25433
  import { BrainCircuit, Trash2 as Trash29, Network } from "lucide-react";
25241
25434
  import { Modal as Modal18, message as message12, Tag as Tag17, Typography as Typography21, Input as Input23, Button as Button37, Space as Space20, Spin as Spin16 } from "antd";
25242
25435
  import { Fragment as Fragment25, jsx as jsx87, jsxs as jsxs65 } from "react/jsx-runtime";
25243
- var SkillFlow = lazy(() => import("./SkillFlow-7OCWAF5V.mjs"));
25436
+ var SkillFlow = lazy(() => import("./SkillFlow-IEUMMNOL.mjs"));
25244
25437
  var { Text: Text21 } = Typography21;
25245
25438
  var { TextArea: TextArea5 } = Input23;
25246
25439
  var SkillList = () => {
@@ -26044,12 +26237,32 @@ var CollectionsPanel = () => {
26044
26237
  const [form] = Form9.useForm();
26045
26238
  const hasEmbeddings = embeddingKeys.length > 0;
26046
26239
  useEffect53(() => {
26047
- get("/api/embeddings").then((res) => {
26048
- if (res.success && res.data?.records?.length > 0) {
26049
- setEmbeddingKeys(res.data.records);
26240
+ let cancelled = false;
26241
+ (async () => {
26242
+ try {
26243
+ const catalog = await get(
26244
+ "/api/tenant-models"
26245
+ );
26246
+ const options = toModelOptions(catalog.data, "embedding").map(
26247
+ (option) => ({ key: option.key, label: modelOptionLabel(option) })
26248
+ );
26249
+ if (!cancelled && options.length > 0) {
26250
+ setEmbeddingKeys(options);
26251
+ return;
26252
+ }
26253
+ } catch {
26050
26254
  }
26051
- }).catch(() => {
26052
- });
26255
+ try {
26256
+ const res = await get("/api/embeddings");
26257
+ if (!cancelled && res.success && res.data?.records?.length > 0) {
26258
+ setEmbeddingKeys(res.data.records);
26259
+ }
26260
+ } catch {
26261
+ }
26262
+ })();
26263
+ return () => {
26264
+ cancelled = true;
26265
+ };
26053
26266
  }, [get]);
26054
26267
  const handleCreate = () => {
26055
26268
  setEditingCollection(null);
@@ -29433,7 +29646,7 @@ var CapabilityBundleList = () => {
29433
29646
  import { useEffect as useEffect82, useState as useState107, useCallback as useCallback65, useRef as useRef50 } from "react";
29434
29647
  import { Card as Card13, Button as Button65, Input as Input31, Typography as Typography47, message as message26, Dropdown as Dropdown9, Modal as Modal34 } from "antd";
29435
29648
  import { createStyles as createStyles62 } from "antd-style";
29436
- import { Bot as Bot9, Sparkles as Sparkles2, ArrowRight as ArrowRight3, ArrowLeft as ArrowLeft3, Smile, Zap, Heart, Lightbulb, Edit3, MoreHorizontal as MoreHorizontal4, MessagesSquare as MessagesSquare2, Trash2 as Trash219 } from "lucide-react";
29649
+ import { Bot as Bot9, Sparkles as Sparkles2, ArrowRight as ArrowRight3, ArrowLeft as ArrowLeft3, Smile, Zap, Heart, Lightbulb as Lightbulb2, Edit3, MoreHorizontal as MoreHorizontal4, MessagesSquare as MessagesSquare2, Trash2 as Trash219 } from "lucide-react";
29437
29650
  import { Client as Client2 } from "@axiom-lattice/client-sdk";
29438
29651
 
29439
29652
  // src/components/Chat/ProjectScopedChating.tsx
@@ -29482,7 +29695,7 @@ import { Spin as Spin21 } from "antd";
29482
29695
  import { ListChecks as ListChecks2 } from "lucide-react";
29483
29696
  import { jsx as jsx107 } from "react/jsx-runtime";
29484
29697
  var TasksSideApp = lazy2(
29485
- () => import("./TasksSideApp-TWDLVB4D.mjs").then((m) => ({ default: m.TasksSideApp }))
29698
+ () => import("./TasksSideApp-LV4XG5T3.mjs").then((m) => ({ default: m.TasksSideApp }))
29486
29699
  );
29487
29700
  var TasksButton = () => {
29488
29701
  const { openSideApp, sideAppVisible, sideAppSelectedCard } = useChatUIContext();
@@ -29756,7 +29969,7 @@ ${JSON.stringify(
29756
29969
  // src/components/Chat/MessageViewPanel.tsx
29757
29970
  import { jsx as jsx109 } from "react/jsx-runtime";
29758
29971
  var MessageGraph = React77.lazy(
29759
- () => import("./MessageGraph-JX6Y3VFH.mjs").then((m) => ({ default: m.MessageGraph }))
29972
+ () => import("./MessageGraph-W3ZJZWQX.mjs").then((m) => ({ default: m.MessageGraph }))
29760
29973
  );
29761
29974
  var MessageViewPanel = ({
29762
29975
  messages,
@@ -32985,6 +33198,7 @@ var VoiceInputButton = ({
32985
33198
  }) => {
32986
33199
  const { styles } = useStyle11();
32987
33200
  const t = useT();
33201
+ const [sttModelKey, setSttModelKey] = useState102(void 0);
32988
33202
  const {
32989
33203
  startRecording,
32990
33204
  stopRecording,
@@ -32994,16 +33208,38 @@ var VoiceInputButton = ({
32994
33208
  mode: initialMode,
32995
33209
  onTranscription,
32996
33210
  maxDuration,
32997
- autoMode
33211
+ autoMode,
33212
+ modelKey: sttModelKey
32998
33213
  });
32999
33214
  const [sttAvailable, setSttAvailable] = useState102(false);
33000
33215
  const { get: apiGet } = useApi();
33001
33216
  useEffect75(() => {
33002
- apiGet("/api/stt/models").then((data) => {
33003
- const models = Array.isArray(data) ? data : data.models;
33004
- setSttAvailable((models?.length ?? 0) > 0);
33005
- }).catch(() => {
33006
- });
33217
+ let cancelled = false;
33218
+ (async () => {
33219
+ try {
33220
+ const catalog = await apiGet(
33221
+ "/api/tenant-models"
33222
+ );
33223
+ const asr = toModelOptions(catalog.data, "asr");
33224
+ if (!cancelled && asr.length > 0) {
33225
+ setSttAvailable(true);
33226
+ setSttModelKey(asr[0].key);
33227
+ return;
33228
+ }
33229
+ } catch {
33230
+ }
33231
+ try {
33232
+ const data = await apiGet(
33233
+ "/api/stt/models"
33234
+ );
33235
+ const models = Array.isArray(data) ? data : data.models;
33236
+ if (!cancelled) setSttAvailable((models?.length ?? 0) > 0);
33237
+ } catch {
33238
+ }
33239
+ })();
33240
+ return () => {
33241
+ cancelled = true;
33242
+ };
33007
33243
  }, [apiGet]);
33008
33244
  const noSttModel = !sttAvailable;
33009
33245
  const isRetryableError = state2.error?.type === "upload_failed" || state2.error?.type === "timeout";
@@ -35793,7 +36029,7 @@ var PERSONALITIES = [
35793
36029
  { key: "warm_caring", icon: /* @__PURE__ */ jsx140(Heart, { size: 20 }), bg: "#fef2f2", fg: "#ef4444", titleKey: "chatWorkspace.personalAssistant.personality.warmCaring.title", descKey: "chatWorkspace.personalAssistant.personality.warmCaring.desc" },
35794
36030
  { key: "witty_playful", icon: /* @__PURE__ */ jsx140(Smile, { size: 20 }), bg: "#fefce8", fg: "#eab308", titleKey: "chatWorkspace.personalAssistant.personality.wittyPlayful.title", descKey: "chatWorkspace.personalAssistant.personality.wittyPlayful.desc" },
35795
36031
  { key: "energetic_motivator", icon: /* @__PURE__ */ jsx140(Zap, { size: 20 }), bg: "#eff6ff", fg: "#3b82f6", titleKey: "chatWorkspace.personalAssistant.personality.energeticMotivator.title", descKey: "chatWorkspace.personalAssistant.personality.energeticMotivator.desc" },
35796
- { key: "wise_mentor", icon: /* @__PURE__ */ jsx140(Lightbulb, { size: 20 }), bg: "#f5f3ff", fg: "#8b5cf6", titleKey: "chatWorkspace.personalAssistant.personality.wiseMentor.title", descKey: "chatWorkspace.personalAssistant.personality.wiseMentor.desc" },
36032
+ { key: "wise_mentor", icon: /* @__PURE__ */ jsx140(Lightbulb2, { size: 20 }), bg: "#f5f3ff", fg: "#8b5cf6", titleKey: "chatWorkspace.personalAssistant.personality.wiseMentor.title", descKey: "chatWorkspace.personalAssistant.personality.wiseMentor.desc" },
35797
36033
  { key: "custom", icon: /* @__PURE__ */ jsx140(Edit3, { size: 20 }), bg: "#f5f5f5", fg: "#737373", titleKey: "chatWorkspace.personalAssistant.personality.custom.title", descKey: "chatWorkspace.personalAssistant.personality.custom.desc" }
35798
36034
  ];
35799
36035
  var PERSONALITY_MAP = {
@@ -38390,19 +38626,19 @@ var DEFAULT_WORKSPACE_MENU_ITEMS = [
38390
38626
  ];
38391
38627
  var PanelSuspenseFallback = () => /* @__PURE__ */ jsx152("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", height: "100%", minHeight: 120 }, children: /* @__PURE__ */ jsx152(Spin32, {}) });
38392
38628
  var AgentGovernanceWorkbench = lazy3(
38393
- () => import("./AgentGovernanceWorkbench-25C3AKQI.mjs").then((m) => ({ default: m.AgentGovernanceWorkbench }))
38629
+ () => import("./AgentGovernanceWorkbench-EOHBGBDO.mjs").then((m) => ({ default: m.AgentGovernanceWorkbench }))
38394
38630
  );
38395
38631
  var TopologyRuntimeView = lazy3(
38396
- () => import("./TopologyRuntimeView-O3VL4A7R.mjs").then((m) => ({ default: m.TopologyRuntimeView }))
38632
+ () => import("./TopologyRuntimeView-6QPO555O.mjs").then((m) => ({ default: m.TopologyRuntimeView }))
38397
38633
  );
38398
38634
  var WorkflowAutomationView = lazy3(
38399
- () => import("./WorkflowAutomationView-D4YMZLRJ.mjs").then((m) => ({ default: m.WorkflowAutomationView }))
38635
+ () => import("./WorkflowAutomationView-PJAN5335.mjs").then((m) => ({ default: m.WorkflowAutomationView }))
38400
38636
  );
38401
38637
  var TasksSideApp2 = lazy3(
38402
- () => import("./TasksSideApp-TWDLVB4D.mjs").then((m) => ({ default: m.TasksSideApp }))
38638
+ () => import("./TasksSideApp-LV4XG5T3.mjs").then((m) => ({ default: m.TasksSideApp }))
38403
38639
  );
38404
38640
  var AgentDetailSideApp = lazy3(
38405
- () => import("./AgentDetailSideApp-QZPV7MNB.mjs").then((m) => ({ default: m.AgentDetailSideApp }))
38641
+ () => import("./AgentDetailSideApp-6FBJVX34.mjs").then((m) => ({ default: m.AgentDetailSideApp }))
38406
38642
  );
38407
38643
  var createWrapper = (Component2) => {
38408
38644
  return () => /* @__PURE__ */ jsx152(Suspense4, { fallback: /* @__PURE__ */ jsx152(PanelSuspenseFallback, {}), children: /* @__PURE__ */ jsx152(Component2, { ...{} }) });
@@ -47756,10 +47992,10 @@ var McpAppCard = ({ data, component_key }) => {
47756
47992
  // src/components/GenUI/elements/builtIns.tsx
47757
47993
  import { jsx as jsx191 } from "react/jsx-runtime";
47758
47994
  var TasksSideApp3 = lazy4(
47759
- () => import("./TasksSideApp-TWDLVB4D.mjs").then((m) => ({ default: m.TasksSideApp }))
47995
+ () => import("./TasksSideApp-LV4XG5T3.mjs").then((m) => ({ default: m.TasksSideApp }))
47760
47996
  );
47761
47997
  var TeamWorkspace = lazy4(
47762
- () => import("./TeamWorkspace-FGFAUD5Z.mjs").then((m) => ({ default: m.TeamWorkspace }))
47998
+ () => import("./TeamWorkspace-Y5BLJDDP.mjs").then((m) => ({ default: m.TeamWorkspace }))
47763
47999
  );
47764
48000
  var elements = {
47765
48001
  action_show_attachments_uploader: {
@@ -48082,7 +48318,7 @@ var LazyReactInfographic = lazy5(
48082
48318
  () => import("./ReactInfographic-P7JL7DME.mjs").then((m) => ({ default: m.ReactInfographic }))
48083
48319
  );
48084
48320
  var LazyReactChart = lazy5(
48085
- () => import("./ReactChart-LYUXL5M6.mjs").then((m) => ({ default: m.ReactChart }))
48321
+ () => import("./ReactChart-WZM5FNED.mjs").then((m) => ({ default: m.ReactChart }))
48086
48322
  );
48087
48323
  function BlockLoading() {
48088
48324
  const t = useT();
@@ -49002,4 +49238,4 @@ export {
49002
49238
  http://jedwatson.github.io/classnames
49003
49239
  *)
49004
49240
  */
49005
- //# sourceMappingURL=chunk-7JDWJZ5M.mjs.map
49241
+ //# sourceMappingURL=chunk-OZPJVRTV.mjs.map