Move orchestration ID logic to constructor for efficiency

Co-authored-by: TingluoHuang <1750815+TingluoHuang@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-06 17:30:28 +00:00
parent 1dc58e3080
commit af6de2cb95
+3 -2
View File
@@ -148,6 +148,8 @@ export class HttpClient {
requestOptions?: ifm.RequestOptions
) {
this.userAgent = userAgent
? this._getUserAgentWithOrchestrationId(userAgent)
: undefined
this.handlers = handlers || []
this.requestOptions = requestOptions
if (requestOptions) {
@@ -599,8 +601,7 @@ export class HttpClient {
info.options.method = method
info.options.headers = this._mergeHeaders(headers)
if (this.userAgent != null) {
info.options.headers['user-agent'] =
this._getUserAgentWithOrchestrationId(this.userAgent)
info.options.headers['user-agent'] = this.userAgent
}
info.options.agent = this._getAgent(info.parsedUrl)