mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-29 06:28:23 +02:00
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:
@@ -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 }
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user