(content: string, maxLines: number = 20)
| 1068 | } |
| 1069 | |
| 1070 | private generateSnippet(content: string, maxLines: number = 20): string { |
| 1071 | const lines = content.split('\n'); |
| 1072 | if (lines.length <= maxLines) { |
| 1073 | return content; |
| 1074 | } |
| 1075 | |
| 1076 | const snippet = lines.slice(0, maxLines).join('\n'); |
| 1077 | const remaining = lines.length - maxLines; |
| 1078 | return `${snippet}\n\n... [${remaining} more lines]`; |
| 1079 | } |
| 1080 | |
| 1081 | private async semanticSearch( |
| 1082 | query: string, |