Skip to content

Commit 7593f6a

Browse files
clean: clarify notes for future
1 parent bcd6b8c commit 7593f6a

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/CodexAppServerClient.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export class CodexAppServerClient {
7777
return await this.sendRequest({ method: "account/read", params: params });
7878
}
7979

80+
//TODO create type-safe helper
8081
async awaitTurnCompleted(): Promise<TurnCompletedNotification> {
8182
return await new Promise((resolve) => {
8283
this.connection.onNotification("turn/completed", (event: TurnCompletedNotification) => {
@@ -85,6 +86,7 @@ export class CodexAppServerClient {
8586
});
8687
}
8788

89+
//TODO support removal (leads to duplicated processing of follow-ups)
8890
onServerNotification(callback: (event: ServerNotification) => void){
8991
this.notificationHandlers.push(callback);
9092
}

src/CodexEventHandler.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ export class CodexEventHandler {
3434
}
3535

3636
private async createUpdateEvent(notification: ServerNotification): Promise<UpdateSessionEvent | null> {
37+
/*
38+
TODO split UpdateSessionEvent to improve completion
39+
createUpdateEvent({
40+
sessionUpdate: "" , <- completion of UpdateSessionEvent["sessionUpdate"]
41+
params: {}, <- quickfix to generate required fields (rest of)
42+
});
43+
*/
3744
switch (notification.method) {
3845
case "item/agentMessage/delta":
3946
return await this.createTextEvent(notification.params);

src/__tests__/CodexACPAgent/CodexAcpClient.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ describe('ACP server test', () => {
5858
});
5959

6060
function loadNotifications(){
61-
//TODO load from file
61+
//TODO collect logs form dev run and then load them from file to speedup
6262
const serverNotifications: ServerNotification[] = [
6363
{ method: "item/agentMessage/delta", params: { threadId: "string", turnId: "string", itemId: "string", delta: "He", }},
6464
{ method: "item/agentMessage/delta", params: { threadId: "string", turnId: "string", itemId: "string", delta: "ll", }},

0 commit comments

Comments
 (0)