Skip to content

Commit a854e57

Browse files
committed
Clean up
1 parent df346a6 commit a854e57

File tree

3 files changed

+5
-23
lines changed

3 files changed

+5
-23
lines changed

packages/cli/src/util/file.ts

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function readLastLines(filePath: string, lineCount: number = 100): string
3939
* Read a JSONL (JSON Lines) file and parse each line
4040
*
4141
* @param filePath Path to the JSONL file
42-
* @param maxLines Optional maximum number of lines to read (reads from end)
42+
* @param maxLines Maximum number of lines to read from end (default: 1000)
4343
* @returns Array of parsed objects
4444
*
4545
* @example
@@ -48,10 +48,8 @@ export function readLastLines(filePath: string, lineCount: number = 100): string
4848
* const recent = readJsonLines<MyType>('/path/to/data.jsonl', 100);
4949
* ```
5050
*/
51-
export function readJsonLines<T = any>(filePath: string, maxLines?: number): T[] {
52-
const lines = maxLines !== undefined
53-
? readLastLines(filePath, maxLines)
54-
: readLastLines(filePath, Number.MAX_SAFE_INTEGER);
51+
export function readJsonLines<T = any>(filePath: string, maxLines: number = 1000): T[] {
52+
const lines = readLastLines(filePath, maxLines);
5553

5654
return lines.map(line => {
5755
try {
@@ -62,22 +60,6 @@ export function readJsonLines<T = any>(filePath: string, maxLines?: number): T[]
6260
}).filter((entry): entry is T => entry !== null);
6361
}
6462

65-
/**
66-
* Read last N lines from a JSONL file and parse them
67-
*
68-
* @param filePath Path to the JSONL file
69-
* @param lineCount Number of lines to read from the end (default: 100)
70-
* @returns Array of parsed objects
71-
*
72-
* @example
73-
* ```typescript
74-
* const recent = readLastJsonLines<HistoryEntry>('~/.claude/history.jsonl', 50);
75-
* ```
76-
*/
77-
export function readLastJsonLines<T = any>(filePath: string, lineCount: number = 100): T[] {
78-
return readJsonLines<T>(filePath, lineCount);
79-
}
80-
8163
/**
8264
* Check if a file exists
8365
*

web/content/roadmap/10-agent-management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Agent Management
3-
status: planned
3+
status: in-progress
44
order: 10
55
---
66

web/content/roadmap/4-local-memory.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Local Memory & Knowledge based
3-
status: in-progress
3+
status: completed
44
order: 4
55
---
66

0 commit comments

Comments
 (0)