Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
},
"dependencies": {
"@agentclientprotocol/sdk": "^1.4.0",
"@openai/codex": "^0.153.4",
"@openai/codex": "^0.154.0",
"diff": "^9.0.0",
"open": "^11.0.1",
"vscode-jsonrpc": "^9.0.1",
Expand Down
13 changes: 13 additions & 0 deletions src/__tests__/CodexACPAgent/CodexAcpClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3527,6 +3527,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
runtimeStatus: null,
pluginId: null,
serverInfo: null,
toolsError: null,
tools: {listFiles: {name: "listFiles", inputSchema: {type: "object"}}},
resources: [{name: "workspace", uri: "file:///workspace"}],
resourceTemplates: [],
Expand All @@ -3537,6 +3538,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
runtimeStatus: null,
pluginId: null,
serverInfo: null,
toolsError: null,
tools: {},
resources: [],
resourceTemplates: [],
Expand Down Expand Up @@ -3878,6 +3880,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
spendControlReached: null,
planType: null,
rateLimitReachedType: null,
normalModelSlug: null,
}
});
rateLimits.set("limit-2", {
Expand All @@ -3893,6 +3896,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
spendControlReached: null,
planType: null,
rateLimitReachedType: null,
normalModelSlug: null,
}
});

Expand All @@ -3905,6 +3909,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
it ('should refresh the complete rate-limit snapshot for status', async () => {
const {mockFixture, sessionState} = setupPromptFixture();
vi.spyOn(mockFixture.getCodexAcpClient(), "getRateLimits").mockResolvedValue({
ordinaryUsageAllowed: null,
rateLimits: {
limitId: "codex",
limitName: "Codex",
Expand All @@ -3920,6 +3925,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
spendControlReached: null,
planType: null,
rateLimitReachedType: null,
normalModelSlug: null,
},
rateLimitsByLimitId: null,
rateLimitResetCredits: null,
Expand Down Expand Up @@ -4058,6 +4064,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
individualLimit: null,
planType: null,
rateLimitReachedType: null,
normalModelSlug: null,
}
}
});
Expand All @@ -4074,6 +4081,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
individualLimit: null,
planType: null,
rateLimitReachedType: null,
normalModelSlug: null,
}
}
});
Expand All @@ -4093,6 +4101,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
individualLimit: null,
planType: null,
rateLimitReachedType: null,
normalModelSlug: null,
}
});
expect(sessionState.rateLimits!.get("fast-limit")).toEqual({
Expand All @@ -4107,6 +4116,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
individualLimit: null,
planType: null,
rateLimitReachedType: null,
normalModelSlug: null,
}
});
});
Expand All @@ -4127,6 +4137,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
spendControlReached: null,
planType: null,
rateLimitReachedType: null,
normalModelSlug: null,
},
}],
["codex_other", {
Expand All @@ -4142,6 +4153,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
spendControlReached: null,
planType: null,
rateLimitReachedType: null,
normalModelSlug: null,
},
}],
]);
Expand All @@ -4164,6 +4176,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
spendControlReached: null,
planType: null,
rateLimitReachedType: null,
normalModelSlug: null,
},
},
});
Expand Down
5 changes: 5 additions & 0 deletions src/__tests__/CodexACPAgent/list-sessions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ describe("CodexACPAgent - list sessions", () => {
sessionId: "sess-1",
parentThreadId: null,
threadSource: null,
originator: null,
forkedFromId: null,
preview: "First session",
ephemeral: false,
Expand Down Expand Up @@ -46,6 +47,7 @@ describe("CodexACPAgent - list sessions", () => {
sessionId: "sess-2",
parentThreadId: null,
threadSource: null,
originator: null,
forkedFromId: null,
preview: "Other session",
ephemeral: false,
Expand Down Expand Up @@ -114,6 +116,7 @@ describe("CodexACPAgent - list sessions", () => {
sessionId: "sess-win",
parentThreadId: null,
threadSource: null,
originator: null,
forkedFromId: null,
preview: "Windows session",
ephemeral: false,
Expand Down Expand Up @@ -184,6 +187,7 @@ describe("CodexACPAgent - list sessions", () => {
sessionId: "sess-1",
parentThreadId: null,
threadSource: null,
originator: null,
forkedFromId: null,
preview: "Preview text",
ephemeral: false,
Expand Down Expand Up @@ -267,6 +271,7 @@ describe("CodexACPAgent - list sessions", () => {
sessionId: "sess-1",
parentThreadId: null,
threadSource: null,
originator: null,
forkedFromId: null,
preview: "First session",
ephemeral: false,
Expand Down
5 changes: 5 additions & 0 deletions src/__tests__/CodexACPAgent/load-session.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ describe("CodexACPAgent - loadSession", () => {
sessionId: id,
parentThreadId: id === "root-history" ? null : "root-history",
threadSource: null,
originator: null,
forkedFromId: null,
preview: id,
ephemeral: false,
Expand Down Expand Up @@ -236,6 +237,7 @@ describe("CodexACPAgent - loadSession", () => {
sessionId: "session-1",
parentThreadId: null,
threadSource: null,
originator: null,
forkedFromId: null,
preview: "Hi",
ephemeral: false,
Expand Down Expand Up @@ -465,6 +467,7 @@ describe("CodexACPAgent - loadSession", () => {
sessionId: "session-1",
parentThreadId: null,
threadSource: null,
originator: null,
forkedFromId: null,
preview: "",
ephemeral: false,
Expand Down Expand Up @@ -682,6 +685,7 @@ describe("CodexACPAgent - loadSession", () => {
sessionId: "session-legacy",
parentThreadId: null,
threadSource: null,
originator: null,
forkedFromId: null,
preview: "List the files",
ephemeral: false,
Expand Down Expand Up @@ -823,6 +827,7 @@ describe("CodexACPAgent - loadSession", () => {
sessionId: "session-1",
parentThreadId: null,
threadSource: null,
originator: null,
forkedFromId: null,
preview: "",
ephemeral: false,
Expand Down
2 changes: 2 additions & 0 deletions src/__tests__/RateLimitsMap.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {createRateLimitsMap, mergeRateLimitSnapshot} from "../RateLimitsMap";

function snapshot(overrides: Partial<RateLimitSnapshot> = {}): RateLimitSnapshot {
return {
normalModelSlug: null,
limitId: "codex",
limitName: "Codex",
primary: null,
Expand All @@ -23,6 +24,7 @@ describe("RateLimitsMap", () => {
const fast = snapshot({limitId: "fast", limitName: "Fast"});

const result = createRateLimitsMap({
ordinaryUsageAllowed: null,
rateLimits: codex,
rateLimitsByLimitId: {codex, fast},
rateLimitResetCredits: null,
Expand Down
Loading
Loading