@ai-matrx/chat 0.1.74 → 0.1.77

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/react.d.cts CHANGED
@@ -756,8 +756,9 @@ interface ChatModelPickerContext {
756
756
  */
757
757
  type ChatModelPickerPort = (context: ChatModelPickerContext) => ReactNode;
758
758
  /**
759
- * The shipped default: the identifier as words. `workflow_catalog` →
760
- * "Workflow catalog". An empty name becomes "Working…", because a chip with no
759
+ * The shipped default: the identifier through THE humanizer
760
+ * (`@ai-matrx/kit/text-case` `humanizeIdentifier`): `workflow_catalog` →
761
+ * "Workflow Catalog". An empty name becomes "Working…", because a chip with no
761
762
  * name at all is the bare spinner the transcript refuses to draw.
762
763
  */
763
764
  declare function humanizeToolName(toolName: string): string;
package/dist/react.d.ts CHANGED
@@ -756,8 +756,9 @@ interface ChatModelPickerContext {
756
756
  */
757
757
  type ChatModelPickerPort = (context: ChatModelPickerContext) => ReactNode;
758
758
  /**
759
- * The shipped default: the identifier as words. `workflow_catalog` →
760
- * "Workflow catalog". An empty name becomes "Working…", because a chip with no
759
+ * The shipped default: the identifier through THE humanizer
760
+ * (`@ai-matrx/kit/text-case` `humanizeIdentifier`): `workflow_catalog` →
761
+ * "Workflow Catalog". An empty name becomes "Working…", because a chip with no
761
762
  * name at all is the bare spinner the transcript refuses to draw.
762
763
  */
763
764
  declare function humanizeToolName(toolName: string): string;
package/dist/react.js CHANGED
@@ -1482,10 +1482,9 @@ function tooLargeSentence(name, limitBytes) {
1482
1482
  }
1483
1483
 
1484
1484
  // src/react/ports.ts
1485
+ import { humanizeIdentifier } from "@ai-matrx/kit/text-case";
1485
1486
  function humanizeToolName(toolName) {
1486
- const words = toolName.replace(/[._-]+/g, " ").replace(/([a-z\d])([A-Z])/g, "$1 $2").trim().toLowerCase();
1487
- if (words === "") return "Working\u2026";
1488
- return words.charAt(0).toUpperCase() + words.slice(1);
1487
+ return humanizeIdentifier(toolName) || "Working\u2026";
1489
1488
  }
1490
1489
 
1491
1490
  // src/react/provider.tsx