Skip to content

Commit 06fc4fd

Browse files
committed
fix: 暂时取消了自动分快时的单块消息上限,以符合使用习惯
1 parent be98ef7 commit 06fc4fd

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/io/import/parser.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ export function chunkMessages(
6666
if (!messages || messages.length === 0) return [];
6767

6868
const total = messages.length;
69-
const maxChunkSize = Math.max(1, Math.max(Math.ceil(total * 0.2), 200));
69+
// 暂时不自动分了,好像大家不是很喜欢这个功能,现在加了虚拟滚动没那么卡了
70+
// const maxChunkSize = Math.max(1, Math.max(Math.ceil(total * 0.2), 200));
7071
const chunks: Chunk[] = [];
7172

7273
const hasKeywordFilter =
@@ -88,13 +89,13 @@ export function chunkMessages(
8889

8990
const crossedDay =
9091
!reachedEnd && !isSameDay(messages[i - 1].time, messages[i].time);
91-
const reachedSizeLimit = i - start >= maxChunkSize;
92+
// const reachedSizeLimit = i - start >= maxChunkSize;
9293

9394
if (
9495
!reachedEnd &&
9596
!startsKeywordChunk &&
96-
!crossedDay &&
97-
!reachedSizeLimit
97+
!crossedDay
98+
// !reachedSizeLimit
9899
)
99100
continue;
100101

0 commit comments

Comments
 (0)