MCPcopy Index your code
hub / github.com/simstudioai/sim / parsePositiveInt

Method parsePositiveInt

apps/sim/executor/handlers/agent/memory.ts:272–277  ·  view source on GitHub ↗
(value: string | undefined, defaultValue: number)

Source from the content-addressed store, hash-verified

270 }
271
272 private parsePositiveInt(value: string | undefined, defaultValue: number): number {
273 if (!value) return defaultValue
274 const parsed = Number.parseInt(value, 10)
275 if (Number.isNaN(parsed) || parsed <= 0) return defaultValue
276 return parsed
277 }
278
279 private validateConversationId(conversationId?: string): void {
280 if (!conversationId || conversationId.trim() === '') {

Callers 2

fetchMemoryMessagesMethod · 0.95
seedMemoryMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected