fix: implement permission handler callbacks and add CodexPermission UI support

Adds onRequest and onComplete callbacks to CodexPermissionHandler to track
permission request/response lifecycle. Includes helper functions to normalize
command and cwd inputs, and displays permission requests in the web UI.
This commit is contained in:
weishu
2026-01-13 11:06:50 +08:00
parent a6e35eaf65
commit 41d8844c00
4 changed files with 106 additions and 5 deletions
+1 -1
View File
@@ -248,7 +248,7 @@ export class CodexMcpClient {
const toolCallId = extractToolCallId(params) ?? randomUUID();
const command = extractCommand(params);
const cwd = extractCwd(params);
const toolName = 'CodexBash';
const toolName = 'CodexPermission';
// If no permission handler set, deny by default
if (!this.permissionHandler) {