(_ context.Context, sess *session.Session, _ tools.ToolCall, _ EventSink)
| 34 | } |
| 35 | |
| 36 | func (r *LocalRuntime) handleReadSessionPlan(_ context.Context, sess *session.Session, _ tools.ToolCall, _ EventSink) (*tools.ToolCallResult, error) { |
| 37 | content, _, err := sessionplan.ReadContent(sessionplan.DefaultDir(), sess.ID) |
| 38 | if errors.Is(err, sessionplan.ErrPlanNotFound) { |
| 39 | return tools.ResultError("no plan written yet for this session; call write_session_plan first"), nil |
| 40 | } |
| 41 | if err != nil { |
| 42 | if errors.Is(err, sessionplan.ErrInvalidSessionID) { |
| 43 | return tools.ResultError(err.Error()), nil |
| 44 | } |
| 45 | return nil, err |
| 46 | } |
| 47 | return tools.ResultSuccess(content), nil |
| 48 | } |
| 49 | |
| 50 | // handleExitPlanMode marks the session's plan as ready and returns control to |
| 51 | // the host. Switching agents is the host's decision — the runtime does not |
nothing calls this directly
no test coverage detected