@meshagent/meshagent-tailwind 0.49.1 → 0.51.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.
- package/CHANGELOG.md +14 -0
- package/README.md +30 -0
- package/dist/cjs/chat/agent-thread.d.ts +17 -12
- package/dist/cjs/chat/agent-thread.js +166 -284
- package/dist/cjs/chat/chat-bot-view.d.ts +5 -4
- package/dist/cjs/chat/chat-bot-view.js +2 -0
- package/dist/cjs/chat/chat-feed-widget.d.ts +3 -4
- package/dist/cjs/chat/chat-feed-widget.js +10 -10
- package/dist/cjs/chat/chat-hooks.d.ts +1 -1
- package/dist/cjs/chat/chat-hooks.js +1 -4
- package/dist/cjs/chat/chat-input.js +2 -2
- package/dist/cjs/chat/chat-typing-indicator.d.ts +2 -4
- package/dist/cjs/chat/chat-typing-indicator.js +4 -7
- package/dist/cjs/chat/dataset-agent-thread.d.ts +10 -8
- package/dist/cjs/chat/dataset-agent-thread.js +13 -5
- package/dist/cjs/chat/multi-thread-view.d.ts +7 -7
- package/dist/cjs/chat/multi-thread-view.js +2 -2
- package/dist/cjs/chat/new-chat-thread.d.ts +7 -6
- package/dist/cjs/chat/new-chat-thread.js +29 -52
- package/dist/cjs/chat/thread-view.d.ts +7 -7
- package/dist/cjs/chat/thread-view.js +21 -6
- package/dist/cjs/components/ui/form.d.ts +1 -1
- package/dist/esm/chat/agent-thread.d.ts +17 -12
- package/dist/esm/chat/agent-thread.js +168 -286
- package/dist/esm/chat/chat-bot-view.d.ts +5 -4
- package/dist/esm/chat/chat-bot-view.js +2 -0
- package/dist/esm/chat/chat-feed-widget.d.ts +3 -4
- package/dist/esm/chat/chat-feed-widget.js +10 -10
- package/dist/esm/chat/chat-hooks.d.ts +1 -1
- package/dist/esm/chat/chat-hooks.js +1 -4
- package/dist/esm/chat/chat-input.js +2 -2
- package/dist/esm/chat/chat-typing-indicator.d.ts +2 -4
- package/dist/esm/chat/chat-typing-indicator.js +4 -7
- package/dist/esm/chat/dataset-agent-thread.d.ts +10 -8
- package/dist/esm/chat/dataset-agent-thread.js +13 -5
- package/dist/esm/chat/multi-thread-view.d.ts +7 -7
- package/dist/esm/chat/multi-thread-view.js +2 -2
- package/dist/esm/chat/new-chat-thread.d.ts +7 -6
- package/dist/esm/chat/new-chat-thread.js +29 -52
- package/dist/esm/chat/thread-view.d.ts +7 -7
- package/dist/esm/chat/thread-view.js +21 -6
- package/dist/esm/components/ui/form.d.ts +1 -1
- package/dist/index.css +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## [0.51.0]
|
|
2
|
+
- Refactored the chat UI to split input from feed, simplifying thread and dataset views and removing suggestion-driven behavior.
|
|
3
|
+
- Updated the JavaScript entrypoint and related tests to match the slimmer chat experience.
|
|
4
|
+
|
|
5
|
+
## [0.50.1]
|
|
6
|
+
- Stability
|
|
7
|
+
|
|
8
|
+
## [0.50.0]
|
|
9
|
+
- Chat clients now support per-turn LLM authorization providers, and websocket chat tokens are optional for `auth=none` deployments.
|
|
10
|
+
- The typed client gained `connectLlm`, optional access-subject IDs, service-account principals, room and service enabled flags, `llm_quota_manager`, and the `router` project settings document.
|
|
11
|
+
- Chat-thread constructors now take a chat client instead of requiring a room client, which is a breaking signature change for callers.
|
|
12
|
+
- The Tailwind chat package was updated to `tailwindcss` 4.3.3, and the chat and thread UI was refactored for more reliable optimistic streaming plus richer attachment and thread handling.
|
|
13
|
+
|
|
1
14
|
## [0.49.1]
|
|
2
15
|
- Stability
|
|
3
16
|
|
|
@@ -8,6 +21,7 @@
|
|
|
8
21
|
|
|
9
22
|
## [0.48.1]
|
|
10
23
|
- Stability
|
|
24
|
+
- Added composable `AgentThreadProvider`, `AgentThreadFeed`, and `AgentThreadInput` components for layouts that place the conversation feed and composer separately while sharing one thread session.
|
|
11
25
|
|
|
12
26
|
## [0.48.0]
|
|
13
27
|
- Reworked the TS/JS agent chat stack to preserve ordered threaded messages and support injected-message threads across chat clients and process handling.
|
package/README.md
CHANGED
|
@@ -85,6 +85,36 @@ export function AgentChat({
|
|
|
85
85
|
|
|
86
86
|
`ThreadListView` loads and manages the available agent threads. `ThreadView` renders the active thread and can start a new thread when `threadDisplayMode` is `ChatThreadDisplayMode.MultiThreadComposer`.
|
|
87
87
|
|
|
88
|
+
For a known thread, use `AgentThreadProvider` when the feed and composer need to live in separate parts of your layout. The provider owns one shared thread session; `AgentThreadFeed` and `AgentThreadInput` consume that session without opening their own connections:
|
|
89
|
+
|
|
90
|
+
```tsx
|
|
91
|
+
import {
|
|
92
|
+
AgentThreadFeed,
|
|
93
|
+
AgentThreadInput,
|
|
94
|
+
AgentThreadProvider,
|
|
95
|
+
} from "@meshagent/meshagent-tailwind";
|
|
96
|
+
|
|
97
|
+
export function SeparatedAgentThread({ roomClient, chatClient, threadPath }) {
|
|
98
|
+
return (
|
|
99
|
+
<AgentThreadProvider
|
|
100
|
+
room={roomClient}
|
|
101
|
+
chatClient={chatClient}
|
|
102
|
+
path={threadPath}
|
|
103
|
+
agentName="support-agent"
|
|
104
|
+
>
|
|
105
|
+
<main className="min-h-0 flex-1">
|
|
106
|
+
<AgentThreadFeed />
|
|
107
|
+
</main>
|
|
108
|
+
<footer>
|
|
109
|
+
<AgentThreadInput />
|
|
110
|
+
</footer>
|
|
111
|
+
</AgentThreadProvider>
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Keep both connected components beneath the same provider. Use `AgentThread` when the standard combined feed-and-composer layout is sufficient.
|
|
117
|
+
|
|
88
118
|
## Meetings
|
|
89
119
|
|
|
90
120
|
The meeting components use a connected `RoomClient` to request LiveKit credentials before joining a meeting. Wrap `MeetingView` in `MeetingScope` and pass the same room client used by the rest of your app:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ReactElement } from "react";
|
|
2
|
-
import type { RoomClient } from "@meshagent/meshagent";
|
|
1
|
+
import type { ReactElement, ReactNode } from "react";
|
|
2
|
+
import type { RoomClient, Tool } from "@meshagent/meshagent";
|
|
3
3
|
import type { AgentMessage, AgentMessageEvent, BaseChatClient, ClientToolkitDescription } from "@meshagent/meshagent-agents";
|
|
4
4
|
import type { AgentUsageSnapshot } from "./chat-thread-timeline.js";
|
|
5
5
|
export { AgentUsageSnapshot, shouldReplaceAgentUsageSnapshot } from "./chat-thread-timeline.js";
|
|
@@ -13,23 +13,22 @@ export declare class AgentToolChoice {
|
|
|
13
13
|
});
|
|
14
14
|
toJson(): Record<string, string>;
|
|
15
15
|
}
|
|
16
|
-
export interface AgentThreadSuggestion {
|
|
17
|
-
label: string;
|
|
18
|
-
prompt?: string;
|
|
19
|
-
}
|
|
20
16
|
export interface AgentThreadProps {
|
|
21
|
-
room
|
|
17
|
+
room?: RoomClient;
|
|
22
18
|
path: string;
|
|
23
19
|
chatClient?: BaseChatClient;
|
|
24
20
|
disposeChatClient?: boolean;
|
|
25
21
|
agentName?: string;
|
|
26
22
|
emptyStateTitle?: string;
|
|
27
23
|
emptyStateDescription?: string;
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
/** Description-only client tools whose execution is owned outside this component. */
|
|
25
|
+
clientToolkits?: readonly ClientToolkitDescription[];
|
|
26
|
+
/** Client tools executed locally without rendering conversation-feed rows. */
|
|
27
|
+
clientTools?: readonly Tool[];
|
|
28
|
+
/** Client tools executed locally with custom feed rendering or feed behavior. */
|
|
29
|
+
chatFeedWidgets?: readonly ChatFeedWidget[];
|
|
30
30
|
toolChoice?: AgentToolChoice;
|
|
31
31
|
collapseMessages?: boolean;
|
|
32
|
-
suggestions?: readonly AgentThreadSuggestion[];
|
|
33
32
|
enableFileUpload?: boolean;
|
|
34
33
|
persistedEvents?: readonly AgentMessageEvent[];
|
|
35
34
|
deferLiveEvents?: boolean;
|
|
@@ -45,6 +44,9 @@ export interface AgentThreadProps {
|
|
|
45
44
|
onPersistedEventsInjected?: (error: unknown | null) => void;
|
|
46
45
|
onEventsChanged?: (threadId: string, events: readonly AgentMessageEvent[], latestMessage: AgentMessage | null) => void;
|
|
47
46
|
}
|
|
47
|
+
export interface AgentThreadProviderProps extends AgentThreadProps {
|
|
48
|
+
children: ReactNode;
|
|
49
|
+
}
|
|
48
50
|
export declare function formatAgentUsageTokenCount(value: number): string;
|
|
49
51
|
export declare function formatAgentUsageFooter(usage: AgentUsageSnapshot): string;
|
|
50
52
|
export declare function formatAgentUsageTooltip(usage: AgentUsageSnapshot): string;
|
|
@@ -79,9 +81,12 @@ export interface EventLineProps {
|
|
|
79
81
|
}
|
|
80
82
|
export declare function EventLine({ headline, details, state, failed, className }: EventLineProps): ReactElement | null;
|
|
81
83
|
export interface ChatThreadPreviewProps {
|
|
82
|
-
room
|
|
84
|
+
room?: RoomClient;
|
|
83
85
|
path: string;
|
|
84
86
|
className?: string;
|
|
85
87
|
}
|
|
86
88
|
export declare function ChatThreadPreview({ room, path, className }: ChatThreadPreviewProps): ReactElement;
|
|
87
|
-
export declare function
|
|
89
|
+
export declare function AgentThreadProvider({ children, room, path, chatClient, disposeChatClient, agentName, emptyStateTitle, emptyStateDescription, clientToolkits, clientTools, chatFeedWidgets, collapseMessages, enableFileUpload, persistedEvents, deferLiveEvents, loadThread, injectPersistedEvents, composerDisabled: composerDisabledProp, closeThreadOnUnmount, onPersistedEventsInjectionStarted, onPersistedEventsInjected, onEventsChanged, }: AgentThreadProviderProps): ReactElement;
|
|
90
|
+
export declare function AgentThreadFeed(): ReactElement;
|
|
91
|
+
export declare function AgentThreadInput(): ReactElement;
|
|
92
|
+
export declare function AgentThread(props: AgentThreadProps): ReactElement;
|