Skip to content
Open
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 @@ -62,7 +62,7 @@
},
"dependencies": {
"@agentclientprotocol/sdk": "^0.22.1",
"@openai/codex": "^0.128.0",
"@openai/codex": "^0.137.0",
"diff": "^8.0.3",
"open": "^11.0.0",
"vscode-jsonrpc": "^8.2.1"
Expand Down
25 changes: 18 additions & 7 deletions src/CodexAcpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export class CodexAcpClient {
sessionId: request.sessionId,
currentModelId: currentModelId,
models: codexModels,
currentServiceTier: response.serviceTier ?? null,
currentServiceTier: toAcpServiceTier(response.serviceTier),
}
}

Expand All @@ -231,7 +231,7 @@ export class CodexAcpClient {
sessionId: request.sessionId,
currentModelId: currentModelId,
models: codexModels,
currentServiceTier: response.serviceTier ?? null,
currentServiceTier: toAcpServiceTier(response.serviceTier),
thread: response.thread,
};
}
Expand All @@ -254,7 +254,7 @@ export class CodexAcpClient {
sessionId: response.thread.id,
currentModelId: currentModelId,
models: codexModels,
currentServiceTier: response.serviceTier ?? null,
currentServiceTier: toAcpServiceTier(response.serviceTier),
};
}

Expand Down Expand Up @@ -317,13 +317,14 @@ export class CodexAcpClient {
return;
}
const additionalRoots = readAdditionalRoots(meta);
if (additionalRoots.length > 0) {
await this.codexClient.setSkillsExtraRoots({
extraRoots: additionalRoots
});
}
await this.codexClient.listSkills({
cwds: [cwd],
forceReload: true,
perCwdExtraUserRoots: [{
cwd: cwd,
extraUserRoots: additionalRoots
}]
});
}

Expand Down Expand Up @@ -601,6 +602,16 @@ function buildPromptItems(prompt: acp.ContentBlock[]): UserInput[] {
}).filter((block): block is UserInput => block !== null);
}

function toAcpServiceTier(serviceTier: string | null): ServiceTier | null {
switch (serviceTier) {
case "fast":
case "flex":
return serviceTier;
default:
return null;
}
}

function formatUriAsLink(name: string | null | undefined, uri: string): string {
if (name && name.length > 0) {
return `[@${name}](${uri})`;
Expand Down
6 changes: 6 additions & 0 deletions src/CodexAppServerClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import type {
McpServerStatusUpdatedNotification,
ModelListParams,
ModelListResponse,
SkillsExtraRootsSetParams,
SkillsExtraRootsSetResponse,
SkillsListParams,
SkillsListResponse,
ThreadLoadedListParams,
Expand Down Expand Up @@ -264,6 +266,10 @@ export class CodexAppServerClient {
return await this.sendRequest({ method: "skills/list", params });
}

async setSkillsExtraRoots(params: SkillsExtraRootsSetParams): Promise<SkillsExtraRootsSetResponse> {
return await this.sendRequest({ method: "skills/extraRoots/set", params });
}

/**
* Registers a notification handler for a specific session.
* Replaces any existing handler for the same session, preventing handler accumulation.
Expand Down
3 changes: 3 additions & 0 deletions src/CodexEventHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ export class CodexEventHandler {
return this.handleFuzzyFileSearchSessionCompleted(notification.params);
// ignored events
case "command/exec/outputDelta":
case "process/outputDelta":
case "process/exited":
case "item/autoApprovalReview/started":
case "item/autoApprovalReview/completed":
case "hook/started":
Expand Down Expand Up @@ -173,6 +175,7 @@ export class CodexEventHandler {
case "externalAgentConfig/import/completed":
case "rawResponseItem/completed":
case "thread/started":
case "thread/settings/updated":
case "item/plan/delta":
case "thread/goal/updated":
case "thread/goal/cleared":
Expand Down
Loading
Loading