mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
Fix codex mcp typecheck errors
This commit is contained in:
@@ -304,7 +304,6 @@ class CodexMcpAgentSession implements AgentSession {
|
||||
private sessionId: string | null = null;
|
||||
private conversationId: string | null = null;
|
||||
private runtimeModel: string | null = null;
|
||||
private modelRejected = false;
|
||||
private pendingLocalId: string | null = null;
|
||||
private persistence: AgentPersistenceHandle | null = null;
|
||||
private cachedRuntimeInfo: AgentRuntimeInfo | null = null;
|
||||
@@ -589,7 +588,8 @@ class CodexMcpAgentSession implements AgentSession {
|
||||
: response.interrupt
|
||||
? "abort"
|
||||
: "denied";
|
||||
pending.resolve({ decision, reason: response.message });
|
||||
const reason = response.behavior === "deny" ? response.message : undefined;
|
||||
pending.resolve({ decision, reason });
|
||||
this.flushQueuedToolEvents(requestId, response.behavior === "allow");
|
||||
}
|
||||
|
||||
@@ -679,7 +679,6 @@ class CodexMcpAgentSession implements AgentSession {
|
||||
} catch (error) {
|
||||
if (config.model && isUnsupportedChatGptModelError(error)) {
|
||||
const { model: _ignoredModel, ...fallback } = config;
|
||||
this.modelRejected = true;
|
||||
this.runtimeModel = null;
|
||||
this.config.model = undefined;
|
||||
response = await attempt(fallback);
|
||||
@@ -703,7 +702,6 @@ class CodexMcpAgentSession implements AgentSession {
|
||||
);
|
||||
}
|
||||
} catch (error) {
|
||||
const message = error instanceof Error ? error.message : String(error);
|
||||
if (signal.aborted) {
|
||||
this.emitEvent({
|
||||
type: "turn_failed",
|
||||
|
||||
3
plan.md
3
plan.md
@@ -106,10 +106,11 @@ Build a new Codex MCP provider side‑by‑side with the existing Codex SDK prov
|
||||
- These hacks hide bugs. The provider should work correctly or fail clearly.
|
||||
- **Done (2025-12-24 19:25)**: Reviewed codex-mcp-agent.ts and cataloged all workaround/fallback logic with required real fixes.
|
||||
|
||||
- [ ] **Fix**: Resolve typecheck errors in `codex-mcp-agent.ts`.
|
||||
- [x] **Fix**: Resolve typecheck errors in `codex-mcp-agent.ts`.
|
||||
|
||||
- Run `npm run typecheck --workspace=@paseo/server`.
|
||||
- Fix `AgentPermissionResponse.message` and unused locals.
|
||||
- **Done (2025-12-24 19:27)**: Removed unused locals, avoided invalid permission message access, and reran server typecheck.
|
||||
|
||||
- [ ] **Test (E2E)**: Run tests and verify fixes work.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user