MCPcopy Create free account
hub / github.com/compozy/agh / StartTaskSession

Method StartTaskSession

internal/task/manager_test.go:263–285  ·  view source on GitHub ↗
(
	ctx context.Context,
	spec *StartTaskSession,
)

Source from the content-addressed store, hash-verified

261}
262
263func (e *recordingSessionExecutor) StartTaskSession(
264 ctx context.Context,
265 spec *StartTaskSession,
266) (*SessionRef, error) {
267 if spec == nil {
268 return nil, fmtTestError("%w: start task session spec is required", ErrValidation)
269 }
270 e.startCalls = append(e.startCalls, *spec)
271 if e.onStart != nil {
272 e.onStart(ctx, spec)
273 }
274 if e.startErr != nil {
275 return nil, e.startErr
276 }
277 if e.returnNilStart {
278 return nil, nil
279 }
280 if e.startRef != nil {
281 ref := *e.startRef
282 return &ref, nil
283 }
284 return &SessionRef{SessionID: "sess-start-" + strconv.Itoa(len(e.startCalls))}, nil
285}
286
287func (e *recordingSessionExecutor) AttachTaskSession(
288 _ context.Context,

Callers

nothing calls this directly

Calls 2

fmtTestErrorFunction · 0.85
appendFunction · 0.85

Tested by

no test coverage detected