fix: remove conversation list and message history limits
Cross-platform packages / Validate source (push) Canceled after 0s
Cross-platform packages / Authorize desktop packaging (push) Canceled after 0s
Cross-platform packages / linux arm64 (push) Canceled after 0s
Cross-platform packages / macos arm64 (push) Canceled after 0s
Cross-platform packages / windows arm64 (push) Canceled after 0s
Cross-platform packages / linux x64 (push) Canceled after 0s
Cross-platform packages / macos x64 (push) Canceled after 0s
Cross-platform packages / windows x64 (push) Canceled after 0s
Cross-platform packages / Publish GitHub and OSS release (push) Canceled after 0s

List and search all active conversations instead of only the latest 100. Preserve message history across consecutive sends instead of truncating it to 500 messages. Existing detail loading and context compression remain unchanged.

Validation: 7 focused tests, typecheck and lint passed. Full test run timed out after reporting failures in App completion visibility and WorkspacePrimitives forced-color contracts.

Release note: 会话列表和搜索不再限制为最近 100 个会话;发送消息不再截断超过 500 条的历史记录。
This commit is contained in:
mesalogo
2026-09-19 21:34:42 +08:00
parent b5d8204986
commit 375b2159c8
6 changed files with 37 additions and 29 deletions
@@ -390,8 +390,8 @@ describe('AssistantDatabase', () => {
expect(database.searchConversations(' ')).toEqual([])
const added = { id: randomUUID(), title: 'Newer', updatedAt: 1000 }
database.saveLocalConversations([{ header: added, messages: [] }])
expect(database.listConversationSummaries().some(item => item.id === id)).toBe(false)
expect(database.searchConversations('äpfel 中文 0 %_', [id])).toEqual([id])
expect(database.listConversationSummaries().some(item => item.id === id)).toBe(true)
expect(database.searchConversations('äpfel 中文 0 %_')).toEqual([id])
expect(database.listConversationSummaries([id]).find(item => item.id === id)?.messages).toHaveLength(16)
// A header-only save of a summary cannot replace or erase messages.
database.saveLocalConversations([{ header: { id, title: 'Renamed', updatedAt: 101 }, messages: [] }])
@@ -5832,7 +5832,7 @@ describe('AssistantDatabase', () => {
database.close()
})
it('gets a targeted conversation outside the latest 100', async () => {
it('lists and searches all conversations beyond the latest 100', async () => {
const database = await createDatabase()
database.saveLocalConversations(
Array.from({ length: 100 }, (_, index) => ({
@@ -5856,12 +5856,14 @@ describe('AssistantDatabase', () => {
}
])
expect(database.listConversations()).toHaveLength(100)
expect(database.listConversations()).toHaveLength(101)
expect(
database.listConversations().some(
(conversation) => conversation.id === oldestId
)
).toBe(false)
).toBe(true)
expect(database.listConversationSummaries()).toHaveLength(101)
expect(database.searchConversations('第 101 个对话')).toEqual([oldestId])
expect(database.getConversation(oldestId)).toMatchObject({
id: oldestId,
title: '第 101 个对话',