refactor: explicitly pass openclawSessionKey in task start

This commit is contained in:
Haitao Pan 2026-06-06 07:24:59 +08:00
parent ea781b5206
commit 248d4b7013
2 changed files with 2 additions and 3 deletions

View File

@ -197,9 +197,6 @@ extension AppControllerDesktopThreadSessions on AppController {
if (normalizedSessionKey == 'main') {
return true;
}
if (normalizedSessionKey.startsWith('agent:')) {
return true;
}
return _runtimeSessionKeyPatternInternal.hasMatch(normalizedSessionKey);
}

View File

@ -327,6 +327,8 @@ class GoTaskServiceRequest {
'requestedExecutionTarget': normalizedTarget.promptValue,
if (_usesGatewaySessionMode(acpMode)) ...<String, dynamic>{
'executionTarget': normalizedTarget.promptValue,
'appThreadKey': threadId,
'openclawSessionKey': threadId,
if (agentId.trim().isNotEmpty) 'agentId': agentId.trim(),
if (metadata.isNotEmpty) 'metadata': metadata,
},