MCPcopy Create free account
hub / github.com/github/gh-aw / ResolveEngineID

Function ResolveEngineID

pkg/workflow/engine_helpers.go:85–93  ·  view source on GitHub ↗

ResolveEngineID returns the workflow engine ID, preferring engine.id over the legacy AI field. It returns an empty string when no engine ID is available.

(workflowData *WorkflowData)

Source from the content-addressed store, hash-verified

83// ResolveEngineID returns the workflow engine ID, preferring engine.id over the legacy AI field.
84// It returns an empty string when no engine ID is available.
85func ResolveEngineID(workflowData *WorkflowData) string {
86 if workflowData == nil {
87 return ""
88 }
89 if workflowData.EngineConfig != nil && workflowData.EngineConfig.ID != "" {
90 return workflowData.EngineConfig.ID
91 }
92 return workflowData.AI
93}
94
95// engineEnvHasKey reports whether the given env var key is present in the engine.env map.
96// Returns false if workflowData or EngineConfig is nil, or if the key is not in the map.

Callers 7

renderMCPInspectionTreeFunction · 0.92
otelResourceAttributesFunction · 0.85
TestResolveEngineIDFunction · 0.85
validateLSPSupportMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestResolveEngineIDFunction · 0.68