Reads the session plan file from the workspace. RPC method: session.plan.read. Returns: Existence, contents, and resolved path of the session plan file.
(ctx context.Context)
| 16225 | // |
| 16226 | // Returns: Existence, contents, and resolved path of the session plan file. |
| 16227 | func (a *PlanAPI) Read(ctx context.Context) (*PlanReadResult, error) { |
| 16228 | req := map[string]any{"sessionId": a.sessionID} |
| 16229 | raw, err := a.client.Request(ctx, "session.plan.read", req) |
| 16230 | if err != nil { |
| 16231 | return nil, err |
| 16232 | } |
| 16233 | var result PlanReadResult |
| 16234 | if err := json.Unmarshal(raw, &result); err != nil { |
| 16235 | return nil, err |
| 16236 | } |
| 16237 | return &result, nil |
| 16238 | } |
| 16239 | |
| 16240 | // ReadSqlTodos reads todo rows from the session SQL database for plan rendering. |
| 16241 | // |
no test coverage detected