Skip to content

Commit

Permalink
Merge branch 'master' into fix/unread-msg-banner-show-above-unread-msg
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinCupela committed Jan 10, 2025
2 parents d578484 + 8c65bbf commit 3ac4413
Show file tree
Hide file tree
Showing 57 changed files with 1,578 additions and 1,661 deletions.
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
## [12.8.1](https://github.com/GetStream/stream-chat-react/compare/v12.8.0...v12.8.1) (2024-12-19)


### Bug Fixes

* do not clear dialog state immediately on useDialog unmount ([#2584](https://github.com/GetStream/stream-chat-react/issues/2584)) ([a8755ec](https://github.com/GetStream/stream-chat-react/commit/a8755ec8112f69dd44e95c34d176e00436cbeee5)), closes [#2583](https://github.com/GetStream/stream-chat-react/issues/2583)

## [12.8.0](https://github.com/GetStream/stream-chat-react/compare/v12.7.1...v12.8.0) (2024-12-12)


### Features

* per-user channel pinning/archiving ([#2555](https://github.com/GetStream/stream-chat-react/issues/2555)) ([a51fad0](https://github.com/GetStream/stream-chat-react/commit/a51fad067bdc0ee94fce6fff49c5085196dcc186))

## [12.7.1](https://github.com/GetStream/stream-chat-react/compare/v12.7.0...v12.7.1) (2024-12-05)


### Bug Fixes

* add support for custom resolution of whether a message is ai generated ([#2572](https://github.com/GetStream/stream-chat-react/issues/2572)) ([54640ac](https://github.com/GetStream/stream-chat-react/commit/54640ac4ec89bb3ddd73b9641d3a2ffc0d3ea924))

## [12.7.0](https://github.com/GetStream/stream-chat-react/compare/v12.6.2...v12.7.0) (2024-12-04)


### Features

* add support for ai generated messages ([#2570](https://github.com/GetStream/stream-chat-react/issues/2570)) ([fb1bfdd](https://github.com/GetStream/stream-chat-react/commit/fb1bfddd3ccfae10ef907c5c853791240fc83a35))

## [12.6.2](https://github.com/GetStream/stream-chat-react/compare/v12.6.1...v12.6.2) (2024-12-03)


Expand Down
9 changes: 6 additions & 3 deletions examples/vite/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ChannelFilters, ChannelOptions, ChannelSort } from 'stream-chat';
import {
AIStateIndicator,
Channel,
ChannelAvatar,
ChannelHeader,
Expand Down Expand Up @@ -34,9 +35,10 @@ const userId = parseUserIdFromToken(userToken);
const filters: ChannelFilters = {
members: { $in: [userId] },
type: 'messaging',
archived: false,
};
const options: ChannelOptions = { limit: 3, presence: true, state: true };
const sort: ChannelSort = { last_message_at: -1, updated_at: -1 };
const options: ChannelOptions = { limit: 5, presence: true, state: true };
const sort: ChannelSort = [{ pinned_at: 1 }, { last_message_at: -1 }, { updated_at: -1 }];

type LocalAttachmentType = Record<string, unknown>;
type LocalChannelType = Record<string, unknown>;
Expand Down Expand Up @@ -72,7 +74,7 @@ const App = () => {
if (!chatClient) return <>Loading...</>;

return (
<Chat client={chatClient}>
<Chat client={chatClient} isMessageAIGenerated={(message) => !!message?.ai_generated}>
<ChatView>
<ChatView.Selector />
<ChatView.Channels>
Expand All @@ -88,6 +90,7 @@ const App = () => {
<Window>
<ChannelHeader Avatar={ChannelAvatar} />
<MessageList returnAllReadData />
<AIStateIndicator />
<MessageInput focus />
</Window>
<Thread virtualized />
Expand Down
1 change: 1 addition & 0 deletions examples/vite/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ body,
width: 0;
flex-shrink: 0;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
max-width: 1000px;

&--open {
width: 30%;
Expand Down
7 changes: 6 additions & 1 deletion examples/vite/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { StrictMode } from 'react';
import ReactDOM from 'react-dom/client';
import App from './App.tsx';
import './index.scss';

ReactDOM.createRoot(document.getElementById('root')!).render(<App />);
ReactDOM.createRoot(document.getElementById('root')!).render(
<StrictMode>
<App />
</StrictMode>,
);
Loading

0 comments on commit 3ac4413

Please sign in to comment.