Skip to content

Commit 5b8199c

Browse files
committed
fix es issue
1 parent 0abc571 commit 5b8199c

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/cli/commands/logs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function getSessionFiles(): { name: string; fullPath: string; mtime: Date; size:
2525
const stat = fs.statSync(fullPath);
2626
return { name, fullPath, mtime: stat.mtime, size: stat.size };
2727
})
28-
.toSorted((a, b) => b.mtime.getTime() - a.mtime.getTime());
28+
.toSorted((a: { mtime: Date }, b: { mtime: Date }) => b.mtime.getTime() - a.mtime.getTime());
2929
}
3030

3131
function formatSize(bytes: number): string {

src/core/context-prompt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export function summarizeHistory(history: ConversationEntry[]): {
5757
const task = firstUser ? firstUser.content.substring(0, 200) : "Coding session";
5858

5959
// Extract current state from the last assistant response
60-
const lastAssistant = [...history].toReversed().find((e) => e.role === "assistant");
60+
const lastAssistant = [...history].toReversed().find((e: ConversationEntry) => e.role === "assistant");
6161
const currentState = lastAssistant ? lastAssistant.content.substring(0, 200) : "In progress";
6262

6363
// Extract approaches from user messages (each user message is roughly an approach/instruction)

tsconfig.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"compilerOptions": {
3-
"target": "ES2020",
3+
"target": "ES2022",
44
"module": "commonjs",
5-
"lib": ["ES2020"],
5+
"lib": ["ES2023"],
66
"outDir": "./dist",
77
"rootDir": "./src",
88
"strict": true,
@@ -12,7 +12,8 @@
1212
"resolveJsonModule": true,
1313
"declaration": true,
1414
"declarationMap": true,
15-
"sourceMap": true
15+
"sourceMap": true,
16+
"types": ["node"]
1617
},
1718
"include": ["src/**/*"],
1819
"exclude": ["node_modules", "dist"]

0 commit comments

Comments
 (0)