Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

chore(chat): set DEFAULT_MESSAGES_LIMIT to 200 for production

Naiyuan Qing02f3534f2ee3
diff --git a/apps/desktop/electron/ipc/hub.ts b/apps/desktop/electron/ipc/hub.ts
index 1b47b01cfc..b038efe81e 100644
--- a/apps/desktop/electron/ipc/hub.ts
+++ b/apps/desktop/electron/ipc/hub.ts
@@ -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 }
diff --git a/packages/sdk/src/actions/rpc.ts b/packages/sdk/src/actions/rpc.ts
index 78962bba9d..ddbc78f74a 100644
--- a/packages/sdk/src/actions/rpc.ts
+++ b/packages/sdk/src/actions/rpc.ts
@@ -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 {
diff --git a/src/hub/rpc/handlers/get-agent-messages.ts b/src/hub/rpc/handlers/get-agent-messages.ts
index 39c8c38f76..a7df9cd4ec 100644
--- a/src/hub/rpc/handlers/get-agent-messages.ts
+++ b/src/hub/rpc/handlers/get-agent-messages.ts
@@ -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;