feat: file-size threshold and observation dedup for timeline gate
- Skip gate for files under 1,500 bytes — timeline (~370 tokens) costs more than just reading small files directly - Deduplicate observations by memory_session_id (one per session) - Rank by specificity: files_modified > files_read, fewer tagged files > many - Fetch 40 candidates, dedup/score down to 15 for display - Reduce default by-file query limit from 30 to 15 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -122,7 +122,7 @@ export function getObservationsByFilePath(
|
||||
options?: { projects?: string[]; limit?: number }
|
||||
): ObservationRecord[] {
|
||||
const likePattern = `%${filePath}%`;
|
||||
const limit = options?.limit ?? 30;
|
||||
const limit = options?.limit ?? 15;
|
||||
const params: any[] = [likePattern, likePattern];
|
||||
|
||||
let projectClause = '';
|
||||
|
||||
Reference in New Issue
Block a user