Skip to content

Commit

Permalink
🐛 fix: fix tool message display (#4776)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx authored Nov 24, 2024
1 parent 5ab57dc commit 9d9b2a2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/store/chat/slices/message/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ const activeBaseChatsWithoutTool = (s: ChatStoreState) => {
* 根据当前不同的状态,返回不同的消息列表
*/
const mainDisplayChats = (s: ChatStoreState): ChatMessage[] => {
return activeBaseChatsWithoutTool(s);
// 如果没有 activeThreadId,则返回所有的主消息
return activeBaseChats(s);
// const mains = activeBaseChats(s).filter((m) => !m.threadId);
// if (!s.activeThreadId) return mains;
//
Expand All @@ -72,9 +72,7 @@ const mainDisplayChats = (s: ChatStoreState): ChatMessage[] => {
// return [...sliced, ...activeBaseChats(s).filter((m) => m.threadId === s.activeThreadId)];
};

const mainDisplayChatIDs = (s: ChatStoreState) => {
return mainDisplayChats(s).map((s) => s.id);
};
const mainDisplayChatIDs = (s: ChatStoreState) => mainDisplayChats(s).map((s) => s.id);

const currentChatsWithHistoryConfig = (s: ChatStoreState): ChatMessage[] => {
const chats = activeBaseChats(s);
Expand Down

0 comments on commit 9d9b2a2

Please sign in to comment.