Q143: earlier messages come from the database, page by page, back to the first one
Review limit (5) reached; the last finding (exhaustion latched) is fixed by taking it from each latest hasMore. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b18eb9ad14
commit
075dea725a
12 files changed
+213
-15
No files matched your search
@@ -97,3 +97,10 @@ export interface ThreadHistory {
|
||||
mentions: ChatMentionRecord[];
|
||||
slashInvocations: ChatSlashInvocationRecord[];
|
||||
}
|
||||
|
||||
/** One page of a conversation's older messages, oldest first, and whether still older ones exist. */
|
||||
export interface SpaceHistoryPage extends ThreadHistory {
|
||||
/** The threads these messages belong to, which the snapshot may no longer hold. */
|
||||
threads: ChatThreadRecord[];
|
||||
hasMore: boolean;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ThreadHistory } from "./chat-domain";
|
||||
import type { SpaceHistoryPage, ThreadHistory } from "./chat-domain";
|
||||
import type { RunRequestRecord } from "./provider-runtime-domain";
|
||||
import type { ApprovalDrift } from "./approval-pin";
|
||||
import type { DesktopResult } from "./result";
|
||||
@@ -198,6 +198,8 @@ export interface DesktopApi {
|
||||
runRequests(input: { orgId: string; runId: string }): Promise<DesktopResult<RunRequestRecord[]>>;
|
||||
/** One thread in full, beyond the snapshot's recent window. */
|
||||
chatThreadHistory(input: { orgId: string; threadId: string }): Promise<DesktopResult<ThreadHistory>>;
|
||||
/** The page of a conversation before a loaded message, for history older than the snapshot holds. */
|
||||
chatSpaceHistory(input: { orgId: string; spaceId: string; beforeMessageId: string | null } & ({ limit: number } | { fromMessageId: string })): Promise<DesktopResult<SpaceHistoryPage>>;
|
||||
revokeConnector(input: RevokeConnectorInput): Promise<DesktopResult<AppSnapshot>>;
|
||||
search(input: SearchInput): Promise<DesktopResult<SearchResultRecord[]>>;
|
||||
subscribe(callback: (event: RendererEvent) => void): () => void;
|
||||
|
||||
@@ -82,6 +82,7 @@ export const IPC_CHANNELS = {
|
||||
approvalDrifts: "agentcompany:approval-drifts",
|
||||
runRequests: "agentcompany:run-requests",
|
||||
chatThreadHistory: "agentcompany:chat-thread-history",
|
||||
chatSpaceHistory: "agentcompany:chat-space-history",
|
||||
revokeConnector: "agentcompany:revoke-connector",
|
||||
search: "agentcompany:search",
|
||||
rendererEvent: "agentcompany:renderer-event",
|
||||
|
||||
Reference in new issue
Block a user