87
}
88
}
90
>
async getChatDraft(chat: URI): Promise<Message | undefined> {
91
return this._drafts.get(chat.toString());
92
}
94
>
async close(): Promise<void> { }
95
>
96
>
async vacuumInto(_targetPath: string): Promise<void> { }
97
>
98
>
dispose(): void { }
99
>
100
>
async setTurnEventId(turnId: string, eventId: string): Promise<void> {
101
this.setTurnEventIdCalls.push({ turnId, eventId });
102
}
104
>
async getTurnEventId(_turnId: string): Promise<string | undefined> { return undefined; }
105
>
106
>
async getNextTurnEventId(_turnId: string): Promise<string | undefined> { return undefined; }
107
>
108
>
async getFirstTurnEventId(): Promise<string | undefined> { return undefined; }
109
>
110
>
async truncateFromTurn(_turnId: string): Promise<void> { }
111
>
112
>
async deleteTurnsAfter(turnId: string): Promise<void> {
113
this.deleteTurnsAfterCalls.push(turnId);
114
}
116
>
async deleteAllTurns(): Promise<void> {
117
this.deleteAllTurnsCalls++;
118
this._edits.length = 0;
119
}
121
>
async insertLocalTurn(record: ILocalTurnRecord): Promise<void> {
122
this._localTurns.set(record.turnId, record);
123
}
125
>
async getLocalTurns(): Promise<ILocalTurnRecord[]> {
126
return [...this._localTurns.values()].sort((a, b) => a.seq - b.seq);
127
}
129
>
async deleteLocalTurns(turnIds: readonly string[]): Promise<void> {
130
for (const id of turnIds) {
131
this._localTurns.delete(id);
132
}
133
}
135
>
136
>
async markFileReviewed(uri: URI, nonce: string): Promise<void> {
137
if (!this._reviewedFiles.some(r => r.uri.toString() === uri.toString() && r.nonce === nonce)) {
138
this._reviewedFiles.push({ uri, nonce });
139
}
140
}
142
>
async unmarkFileReviewed(uri: URI, nonce: string): Promise<void> {
143
const index = this._reviewedFiles.findIndex(r => r.uri.toString() === uri.toString() && r.nonce === nonce);
144
if (index >= 0) {