Skip to content
Open
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
17 changes: 2 additions & 15 deletions src/CodexCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ export class CodexCommands {
return { handled: true };
}
default:
await this.sendUnknownCommandMessage(commandName, sessionId);
return { handled: true };
// Let Codex resolve unrecognized commands as raw prompts.
return { handled: false };
}
}

Expand Down Expand Up @@ -357,19 +357,6 @@ export class CodexCommands {
await session.update(createAgentTextMessageChunk(`Command "/${name}" requires ${inputHint}.`));
}

private async sendUnknownCommandMessage(name: string, sessionId: string): Promise<void> {
const lines = this.getBuiltinCommands().map(command => `- /${command.name}: ${command.description}`);
const text = [
`Unknown command "/${name}".`,
"Available commands:"
];
if (lines.length > 0) {
text.push(...lines);
}
const session = new ACPSessionConnection(this.connection, sessionId);
await session.update(createAgentTextMessageChunk(text.join("\n")));
}

private buildStatusMessage(sessionState: SessionState): string {
const agentMode = sessionState.agentMode;
const accountText = this.formatAccountInfo(sessionState.account);
Expand Down