mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
fix(vscode-ide-companion/acp): correct optionId mapping and outcome handling in acpMessageHandler
This commit is contained in:
@@ -205,19 +205,20 @@ export class AcpMessageHandler {
|
||||
try {
|
||||
const response = await callbacks.onPermissionRequest(params);
|
||||
const optionId = response.optionId;
|
||||
|
||||
console.log('[ACP] Permission request:', optionId);
|
||||
// Handle cancel, deny, or allow
|
||||
let outcome: string;
|
||||
if (optionId.includes('reject') || optionId === 'cancel') {
|
||||
outcome = 'rejected';
|
||||
outcome = 'cancelled';
|
||||
} else {
|
||||
outcome = 'selected';
|
||||
}
|
||||
console.log('[ACP] Permission outcome:', outcome);
|
||||
|
||||
return {
|
||||
outcome: {
|
||||
outcome,
|
||||
// optionId: optionId === 'cancel' ? 'reject_once' : optionId,
|
||||
// optionId: optionId === 'cancel' ? 'cancel' : optionId,
|
||||
optionId,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user