MCPcopy Index your code
hub / github.com/github/copilot-sdk / applyConfigDefaultsForMode

Method applyConfigDefaultsForMode

go/mode_empty.go:121–163  ·  view source on GitHub ↗

applyConfigDefaultsForMode fills in empty-mode defaults on the session config in place. App-supplied values win.

(config *SessionConfig)

Source from the content-addressed store, hash-verified

119// applyConfigDefaultsForMode fills in empty-mode defaults on the session
120// config in place. App-supplied values win.
121func (c *Client) applyConfigDefaultsForMode(config *SessionConfig) {
122 if c.options.Mode != ModeEmpty {
123 return
124 }
125 if config.EnableSessionTelemetry == nil {
126 f := false
127 config.EnableSessionTelemetry = &f
128 }
129 if config.SkipEmbeddingRetrieval == nil {
130 t := true
131 config.SkipEmbeddingRetrieval = &t
132 }
133 if config.EmbeddingCacheStorage == nil {
134 inMemory := "in-memory"
135 config.EmbeddingCacheStorage = &inMemory
136 }
137 if config.EnableOnDemandInstructionDiscovery == nil {
138 f := false
139 config.EnableOnDemandInstructionDiscovery = &f
140 }
141 if config.EnableFileHooks == nil {
142 f := false
143 config.EnableFileHooks = &f
144 }
145 if config.EnableHostGitOperations == nil {
146 f := false
147 config.EnableHostGitOperations = &f
148 }
149 if config.EnableSessionStore == nil {
150 f := false
151 config.EnableSessionStore = &f
152 }
153 if config.EnableSkills == nil {
154 f := false
155 config.EnableSkills = &f
156 }
157 if config.Memory == nil {
158 config.Memory = &MemoryConfiguration{Enabled: false}
159 }
160 if config.MCPOAuthTokenStorage == "" {
161 config.MCPOAuthTokenStorage = "in-memory"
162 }
163}
164
165func (c *Client) applyResumeDefaultsForMode(config *ResumeSessionConfig) {
166 if c.options.Mode != ModeEmpty {

Calls

no outgoing calls