chore(chat): set DEFAULT_MESSAGES_LIMIT to 200 for production

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Naiyuan Qing
2026-02-05 18:45:15 +08:00
parent 65c2fea1b6
commit 02f3534f2e
3 changed files with 3 additions and 3 deletions

View File

@@ -356,7 +356,7 @@ export function registerHubIpcHandlers(): void {
const allMessages = agent.getMessages()
const total = allMessages.length
// Must match DEFAULT_MESSAGES_LIMIT from @multica/sdk/actions/rpc
const limit = options?.limit ?? 10
const limit = options?.limit ?? 200
const offset = options?.offset ?? Math.max(0, total - limit)
const sliced = allMessages.slice(offset, offset + limit)
return { messages: sliced, total, offset, limit }

View File

@@ -61,7 +61,7 @@ export function isResponseError(
// ============ RPC Method Types ============
/** Default number of messages returned per page */
export const DEFAULT_MESSAGES_LIMIT = 10;
export const DEFAULT_MESSAGES_LIMIT = 200;
/** getAgentMessages - request params */
export interface GetAgentMessagesParams {

View File

@@ -4,7 +4,7 @@ import { resolveSessionPath } from "../../../agent/session/storage.js";
import { RpcError, type RpcHandler } from "../dispatcher.js";
// Must match DEFAULT_MESSAGES_LIMIT from @multica/sdk/actions/rpc
const DEFAULT_LIMIT = 10;
const DEFAULT_LIMIT = 200;
interface GetAgentMessagesParams {
agentId: string;