MCPcopy Create free account
hub / github.com/coder/coder / getInfiniteChatsQueryString

Function getInfiniteChatsQueryString

site/src/api/queries/chats.ts:551–565  ·  view source on GitHub ↗
(
	filters: InfiniteChatsFilters | undefined,
)

Source from the content-addressed store, hash-verified

549};
550
551const getInfiniteChatsQueryString = (
552 filters: InfiniteChatsFilters | undefined,
553): string | undefined => {
554 const qParts: string[] = [];
555 if (filters?.archived !== undefined) {
556 qParts.push(`archived:${filters.archived}`);
557 }
558 if (filters?.prStatuses?.length) {
559 qParts.push(`pr_status:${filters.prStatuses.join(",")}`);
560 }
561 if (filters?.chatStatus) {
562 qParts.push(`has_unread:${filters.chatStatus === "unread"}`);
563 }
564 return qParts.length > 0 ? qParts.join(" ") : undefined;
565};
566
567export const infiniteChats = (filters?: InfiniteChatsFilters) => {
568 const limit = DEFAULT_CHAT_PAGE_LIMIT;

Callers 1

infiniteChatsFunction · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected