MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / getSummaryLengthLimit

Function getSummaryLengthLimit

packages/node-runtime/src/ai/summary/index.ts:54–66  ·  view source on GitHub ↗
(messageCount: number, strategy: SummaryStrategy = 'standard')

Source from the content-addressed store, hash-verified

52// ==================== Pure algorithms ====================
53
54function getSummaryLengthLimit(messageCount: number, strategy: SummaryStrategy = 'standard'): number {
55 if (strategy === 'brief') {
56 if (messageCount <= 10) return 50
57 if (messageCount <= 30) return 80
58 if (messageCount <= 100) return 120
59 return 200
60 }
61 // standard: richer summaries covering who, what, and key details
62 if (messageCount <= 10) return 100
63 if (messageCount <= 30) return 200
64 if (messageCount <= 100) return 350
65 return 500
66}
67
68const MEANINGFUL_SHORT_ZH = ['好的', '不是', '是的', '可以', '不行', '好吧', '明白', '知道', '同意']
69const MEANINGLESS_SHORT_EN = [

Callers 1

generateSessionSummaryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected