opencode-usage 0.3.3 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/index.js +76 -177
- package/dist/index.js.map +3 -3
- package/dist/loader.d.ts +0 -7
- package/dist/types.d.ts +1 -3
- package/package.json +1 -1
package/dist/loader.d.ts
CHANGED
|
@@ -2,14 +2,7 @@ import type { MessageJson, CursorState } from "./types.js";
|
|
|
2
2
|
export declare function getOpenCodeStoragePath(): string;
|
|
3
3
|
export declare function loadRecentMessages(storagePath: string, hoursBack?: number, providerFilter?: string): Promise<MessageJson[]>;
|
|
4
4
|
export declare function loadMessages(storagePath: string, providerFilter?: string): Promise<MessageJson[]>;
|
|
5
|
-
/**
|
|
6
|
-
* Create an empty cursor state for first load
|
|
7
|
-
*/
|
|
8
5
|
export declare function createCursor(): CursorState;
|
|
9
|
-
/**
|
|
10
|
-
* Load messages incrementally using cursor state
|
|
11
|
-
* Returns new messages and updated cursor
|
|
12
|
-
*/
|
|
13
6
|
export declare function loadMessagesIncremental(storagePath: string, cursor: CursorState, providerFilter?: string): Promise<{
|
|
14
7
|
messages: MessageJson[];
|
|
15
8
|
cursor: CursorState;
|
package/dist/types.d.ts
CHANGED
|
@@ -62,10 +62,8 @@ export type QuotaSnapshot = {
|
|
|
62
62
|
resetAt?: number;
|
|
63
63
|
error?: string;
|
|
64
64
|
};
|
|
65
|
-
/** Cursor state for incremental message loading */
|
|
65
|
+
/** Cursor state for incremental message loading (SQLite-backed) */
|
|
66
66
|
export type CursorState = {
|
|
67
|
-
knownSessions: Set<string>;
|
|
68
|
-
fileCountPerSession: Map<string, number>;
|
|
69
67
|
lastTimestamp: number;
|
|
70
68
|
};
|
|
71
69
|
/** Anthropic multi-account state file structure */
|