(messageCount: number, strategy: SummaryStrategy = 'standard')
| 52 | // ==================== Pure algorithms ==================== |
| 53 | |
| 54 | function 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 | |
| 68 | const MEANINGFUL_SHORT_ZH = ['好的', '不是', '是的', '可以', '不行', '好吧', '明白', '知道', '同意'] |
| 69 | const MEANINGLESS_SHORT_EN = [ |
no outgoing calls
no test coverage detected