@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.
- package/compatibility.json +5 -5
- package/dist/registry/agents24-chat.json +9 -9
- package/dist/scaffold/index.cjs +5 -4
- package/dist/scaffold/index.cjs.map +1 -1
- package/dist/scaffold/index.js +6 -5
- package/dist/scaffold/index.js.map +1 -1
- package/dist/styles.css +48 -0
- package/dist/ui/bubble.d.ts +1 -1
- package/dist/ui/code-block.d.ts +33 -0
- package/dist/ui/code-highlighter.d.ts +8 -0
- package/dist/ui/index.cjs +690 -183
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.js +678 -180
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/message-code.d.ts +21 -0
- package/dist/ui/use-highlighted-code.d.ts +2 -0
- package/package.json +4 -3
- package/scaffold/src/components/chat/thread-sidebar.tsx +6 -5
package/compatibility.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"contractHash": "
|
|
2
|
+
"contractHash": "904701fe1c173854cd4154f2156020da471397fbc6bb644cea60f44c71a1a0d2",
|
|
3
3
|
"contractVersion": "0.3.0",
|
|
4
4
|
"corpus": "conformance/v1/corpus.json",
|
|
5
5
|
"generatedBy": "@agents24/sdk-contract",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"reactDom": ">=19 <20"
|
|
16
16
|
},
|
|
17
17
|
"@agents24/client": {
|
|
18
|
-
"contract": "
|
|
18
|
+
"contract": "904701fe1c173854cd4154f2156020da471397fbc6bb644cea60f44c71a1a0d2",
|
|
19
19
|
"runtime": "run-stream.v3"
|
|
20
20
|
},
|
|
21
21
|
"@agents24/node": {
|
|
22
|
-
"contract": "
|
|
22
|
+
"contract": "904701fe1c173854cd4154f2156020da471397fbc6bb644cea60f44c71a1a0d2",
|
|
23
23
|
"node": "^22.0.0 || ^24.0.0"
|
|
24
24
|
},
|
|
25
25
|
"@agents24/react": {
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"react": ">=19 <20"
|
|
28
28
|
},
|
|
29
29
|
"@talmudpedia/runtime-sdk": {
|
|
30
|
-
"contract": "
|
|
30
|
+
"contract": "904701fe1c173854cd4154f2156020da471397fbc6bb644cea60f44c71a1a0d2",
|
|
31
31
|
"protocolOwner": "@agents24/client"
|
|
32
32
|
},
|
|
33
33
|
"agents24": {
|
|
34
|
-
"contract": "
|
|
34
|
+
"contract": "904701fe1c173854cd4154f2156020da471397fbc6bb644cea60f44c71a1a0d2",
|
|
35
35
|
"python": ">=3.10"
|
|
36
36
|
}
|
|
37
37
|
},
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
"title": "Agents24 Chat",
|
|
6
6
|
"description": "Complete editable Agents24 chat, inheriting your application's theme.",
|
|
7
7
|
"dependencies": [
|
|
8
|
-
"@agents24/chat-react@0.5.
|
|
9
|
-
"@agents24/client@0.2.
|
|
10
|
-
"@agents24/react@0.2.
|
|
8
|
+
"@agents24/chat-react@0.5.36",
|
|
9
|
+
"@agents24/client@0.2.18",
|
|
10
|
+
"@agents24/react@0.2.23",
|
|
11
11
|
"@shadcn/react@^0.2.1",
|
|
12
12
|
"class-variance-authority@^0.7.1",
|
|
13
13
|
"clsx@^2.1.1",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"path": "scaffold/src/components/chat/thread-sidebar.tsx",
|
|
89
89
|
"type": "registry:file",
|
|
90
90
|
"target": "@components/agents24-chat/components/chat/thread-sidebar.tsx",
|
|
91
|
-
"content": "import { getThreadActivity, type StoredChatThread } from \"@agents24/react\"\nimport { LoaderCircle, SquarePen, Trash2 } from \"lucide-react\"\nimport type { Agents24ChatIdentity } from \"../../identity\"\nimport { IdentityControl } from \"./identity-control\"\n\nimport { Button } from \"../ui/button\"\nimport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupContent,\n SidebarHeader,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarRail,\n useSidebar,\n} from \"../ui/sidebar\"\n\ntype Props = {\n activeThreadId: string | null\n hasMore: boolean\n isLoading: boolean\n isLoadingMore: boolean\n onDelete: (threadId: string) => Promise<void>\n onLoadMore: () => Promise<void>\n onNew: () => void\n onOpen: (threadId: string) => Promise<void>\n threads: StoredChatThread[]\n identity: Agents24ChatIdentity\n}\n\nfunction ThreadStatus({ thread }: { thread: StoredChatThread }) {\n const activity = getThreadActivity(thread)\n if (!activity.isSpinning) return null\n const label = activity.status === \"cancelling\"\n ? \"Cancelling\"\n : activity.status === \"queued\"\n ? \"Queued\"\n : \"Running\"\n return (\n <span\n className=\"pointer-events-none absolute end-1 top-1/2
|
|
91
|
+
"content": "import { getThreadActivity, type StoredChatThread } from \"@agents24/react\"\nimport { LoaderCircle, Pause, SquarePen, Trash2 } from \"lucide-react\"\nimport type { Agents24ChatIdentity } from \"../../identity\"\nimport { IdentityControl } from \"./identity-control\"\n\nimport { Button } from \"../ui/button\"\nimport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupContent,\n SidebarHeader,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarRail,\n useSidebar,\n} from \"../ui/sidebar\"\n\ntype Props = {\n activeThreadId: string | null\n hasMore: boolean\n isLoading: boolean\n isLoadingMore: boolean\n onDelete: (threadId: string) => Promise<void>\n onLoadMore: () => Promise<void>\n onNew: () => void\n onOpen: (threadId: string) => Promise<void>\n threads: StoredChatThread[]\n identity: Agents24ChatIdentity\n}\n\nfunction ThreadStatus({ thread }: { thread: StoredChatThread }) {\n const activity = getThreadActivity(thread)\n const waiting = [\"paused\", \"waiting\", \"interrupted\"].includes(activity.status || \"\")\n if (!activity.isSpinning && !waiting) return null\n const label = waiting ? \"Waiting\" : activity.status === \"cancelling\"\n ? \"Cancelling\"\n : activity.status === \"queued\"\n ? \"Queued\"\n : \"Running\"\n return (\n <span\n 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\"\n role=\"status\"\n aria-label={label}\n title={label}\n >\n {waiting ? <Pause className=\"size-3.5 text-amber-600\" /> : <LoaderCircle className=\"size-3.5 animate-spin\" />}\n </span>\n )\n}\n\nexport function ThreadSidebar({ activeThreadId, hasMore, identity, isLoading, isLoadingMore, onDelete, onLoadMore, onNew, onOpen, threads }: Props) {\n const { setOpenMobile } = useSidebar()\n return (\n <Sidebar\n aria-label=\"Conversations\"\n collapsible=\"offcanvas\"\n data-agents24-chat-sidebar=\"\"\n role=\"navigation\"\n >\n <SidebarHeader className=\"gap-1 p-2\">\n <div className=\"h-8 shrink-0\" aria-hidden=\"true\" />\n <Button className=\"w-full justify-start\" variant=\"ghost\" onClick={() => { onNew(); setOpenMobile(false) }}><SquarePen /> New chat</Button>\n </SidebarHeader>\n <SidebarContent>\n <SidebarGroup>\n <SidebarGroupContent>\n <SidebarMenu>\n {threads.map((thread) => (\n <SidebarMenuItem key={thread.id}>\n <SidebarMenuButton\n className=\"pr-8 pl-3\"\n isActive={thread.id === activeThreadId}\n title={String(thread.title || \"New conversation\")}\n onClick={() => { void onOpen(thread.id).catch(() => undefined); setOpenMobile(false) }}\n >\n <span className=\"min-w-0 truncate\">{String(thread.title || \"New conversation\")}</span>\n </SidebarMenuButton>\n <ThreadStatus thread={thread} />\n <SidebarMenuAction\n showOnHover\n className=\"group-focus-within/menu-item:opacity-0 group-hover/menu-item:opacity-100\"\n aria-label={`Delete ${String(thread.title || \"conversation\")}`}\n onClick={(event) => { event.stopPropagation(); if (window.confirm(\"Delete this conversation?\")) void onDelete(thread.id).catch(() => undefined) }}\n >\n <Trash2 />\n </SidebarMenuAction>\n </SidebarMenuItem>\n ))}\n </SidebarMenu>\n {!isLoading && threads.length === 0 && <p className=\"px-2 py-8 text-center text-xs text-muted-foreground\">No conversations</p>}\n {hasMore && (\n <Button\n className=\"mt-2 w-full\"\n disabled={isLoadingMore}\n size=\"sm\"\n variant=\"ghost\"\n onClick={() => void onLoadMore().catch(() => undefined)}\n >\n {isLoadingMore && <LoaderCircle className=\"animate-spin\" />}\n Load more\n </Button>\n )}\n </SidebarGroupContent>\n </SidebarGroup>\n </SidebarContent>\n <SidebarFooter className=\"w-full min-w-0 p-2\"><IdentityControl identity={identity} /></SidebarFooter>\n <SidebarRail />\n </Sidebar>\n )\n}\n"
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
"path": "scaffold/src/components/chat/timeline-loading.ts",
|
|
@@ -254,13 +254,13 @@
|
|
|
254
254
|
}
|
|
255
255
|
],
|
|
256
256
|
"meta": {
|
|
257
|
-
"version": "0.5.
|
|
257
|
+
"version": "0.5.36",
|
|
258
258
|
"source": "packages/agents24-chat-react/scaffold",
|
|
259
|
-
"source_sha256": "
|
|
259
|
+
"source_sha256": "0c7529800d5f8f626edf85d41f1d355ede0dbec6ca184b344ac3085335ce03f3",
|
|
260
260
|
"agents24": {
|
|
261
|
-
"@agents24/client": "0.2.
|
|
262
|
-
"@agents24/react": "0.2.
|
|
263
|
-
"@agents24/chat-react": "0.5.
|
|
261
|
+
"@agents24/client": "0.2.18",
|
|
262
|
+
"@agents24/react": "0.2.23",
|
|
263
|
+
"@agents24/chat-react": "0.5.36"
|
|
264
264
|
}
|
|
265
265
|
},
|
|
266
266
|
"docs": "Import the installed styles.css from your application stylesheet. Pass your configured AgentClient to Agents24ChatScaffold. Authentication and URLs remain host-owned. Installed UI is editable; review changes before reinstalling and do not use --overwrite on customized files."
|
package/dist/scaffold/index.cjs
CHANGED
|
@@ -2006,16 +2006,17 @@ function IdentityControl({ identity }) {
|
|
|
2006
2006
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2007
2007
|
function ThreadStatus({ thread }) {
|
|
2008
2008
|
const activity = (0, import_react2.getThreadActivity)(thread);
|
|
2009
|
-
|
|
2010
|
-
|
|
2009
|
+
const waiting = ["paused", "waiting", "interrupted"].includes(activity.status || "");
|
|
2010
|
+
if (!activity.isSpinning && !waiting) return null;
|
|
2011
|
+
const label = waiting ? "Waiting" : activity.status === "cancelling" ? "Cancelling" : activity.status === "queued" ? "Queued" : "Running";
|
|
2011
2012
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2012
2013
|
"span",
|
|
2013
2014
|
{
|
|
2014
|
-
className: "pointer-events-none absolute end-1 top-1/2
|
|
2015
|
+
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",
|
|
2015
2016
|
role: "status",
|
|
2016
2017
|
"aria-label": label,
|
|
2017
2018
|
title: label,
|
|
2018
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.LoaderCircle, { className: "size-3.5 animate-spin" })
|
|
2019
|
+
children: waiting ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.Pause, { className: "size-3.5 text-amber-600" }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.LoaderCircle, { className: "size-3.5 animate-spin" })
|
|
2019
2020
|
}
|
|
2020
2021
|
);
|
|
2021
2022
|
}
|