@agents24/chat-react 0.5.34 → 0.5.36

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.
@@ -0,0 +1,21 @@
1
+ import * as React from "react";
2
+ type CodeNode = {
3
+ position?: {
4
+ start?: {
5
+ line?: number;
6
+ };
7
+ end?: {
8
+ line?: number;
9
+ };
10
+ };
11
+ };
12
+ export declare function MessageCodeBlock({ code, language }: {
13
+ code: string;
14
+ language?: string;
15
+ }): import("react/jsx-runtime").JSX.Element;
16
+ export declare function MessageMarkdownCode({ children, className, node, ...props }: React.ComponentProps<"code"> & {
17
+ node?: CodeNode;
18
+ "data-block"?: string;
19
+ }): import("react/jsx-runtime").JSX.Element;
20
+ export declare function formatMessageJson(text: string): string | null;
21
+ export {};
@@ -0,0 +1,2 @@
1
+ import * as React from "react";
2
+ export declare function useHighlightedCode(value: string, language: string): (string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element[] | null | undefined)[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agents24/chat-react",
3
- "version": "0.5.34",
3
+ "version": "0.5.36",
4
4
  "description": "Accessible web UI and complete default layout for Agents24 chat applications.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -64,8 +64,8 @@
64
64
  },
65
65
  "dependencies": {
66
66
  "@untitledui/file-icons": "0.0.9",
67
- "@agents24/client": "0.2.17",
68
- "@agents24/react": "0.2.21",
67
+ "@agents24/client": "0.2.18",
68
+ "@agents24/react": "0.2.23",
69
69
  "@fontsource-variable/inter": "^5.3.0",
70
70
  "@fontsource-variable/jetbrains-mono": "^5.3.0",
71
71
  "@fontsource-variable/merriweather": "^5.3.0",
@@ -75,6 +75,7 @@
75
75
  "clsx": "^2.1.1",
76
76
  "lucide-react": "0.542.0",
77
77
  "radix-ui": "1.4.3",
78
+ "shiki": "3.23.0",
78
79
  "streamdown": "^2.5.0",
79
80
  "tailwind-merge": "^3.6.0",
80
81
  "tailwindcss": "^4.1.16",
@@ -1,5 +1,5 @@
1
1
  import { getThreadActivity, type StoredChatThread } from "@agents24/react"
2
- import { LoaderCircle, SquarePen, Trash2 } from "lucide-react"
2
+ import { LoaderCircle, Pause, SquarePen, Trash2 } from "lucide-react"
3
3
  import type { Agents24ChatIdentity } from "../../identity"
4
4
  import { IdentityControl } from "./identity-control"
5
5
 
@@ -34,20 +34,21 @@ type Props = {
34
34
 
35
35
  function ThreadStatus({ thread }: { thread: StoredChatThread }) {
36
36
  const activity = getThreadActivity(thread)
37
- if (!activity.isSpinning) return null
38
- const label = activity.status === "cancelling"
37
+ const waiting = ["paused", "waiting", "interrupted"].includes(activity.status || "")
38
+ if (!activity.isSpinning && !waiting) return null
39
+ const label = waiting ? "Waiting" : activity.status === "cancelling"
39
40
  ? "Cancelling"
40
41
  : activity.status === "queued"
41
42
  ? "Queued"
42
43
  : "Running"
43
44
  return (
44
45
  <span
45
- className="pointer-events-none absolute end-1 top-1/2 hidden size-5 -translate-y-1/2 items-center justify-center text-muted-foreground transition-opacity group-hover/menu-item:opacity-0 md:flex"
46
+ className="pointer-events-none absolute end-1 top-1/2 flex size-5 -translate-y-1/2 items-center justify-center text-muted-foreground transition-opacity group-hover/menu-item:opacity-0"
46
47
  role="status"
47
48
  aria-label={label}
48
49
  title={label}
49
50
  >
50
- <LoaderCircle className="size-3.5 animate-spin" />
51
+ {waiting ? <Pause className="size-3.5 text-amber-600" /> : <LoaderCircle className="size-3.5 animate-spin" />}
51
52
  </span>
52
53
  )
53
54
  }