mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +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 {
|
try {
|
||||||
const response = await callbacks.onPermissionRequest(params);
|
const response = await callbacks.onPermissionRequest(params);
|
||||||
const optionId = response.optionId;
|
const optionId = response.optionId;
|
||||||
|
console.log('[ACP] Permission request:', optionId);
|
||||||
// Handle cancel, deny, or allow
|
// Handle cancel, deny, or allow
|
||||||
let outcome: string;
|
let outcome: string;
|
||||||
if (optionId.includes('reject') || optionId === 'cancel') {
|
if (optionId.includes('reject') || optionId === 'cancel') {
|
||||||
outcome = 'rejected';
|
outcome = 'cancelled';
|
||||||
} else {
|
} else {
|
||||||
outcome = 'selected';
|
outcome = 'selected';
|
||||||
}
|
}
|
||||||
|
console.log('[ACP] Permission outcome:', outcome);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
outcome: {
|
outcome: {
|
||||||
outcome,
|
outcome,
|
||||||
// optionId: optionId === 'cancel' ? 'reject_once' : optionId,
|
// optionId: optionId === 'cancel' ? 'cancel' : optionId,
|
||||||
optionId,
|
optionId,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user