Update writes new content to the session plan file. RPC method: session.plan.update. Parameters: Replacement contents to write to the session plan file.
(ctx context.Context, params *PlanUpdateRequest)
| 16284 | // |
| 16285 | // Parameters: Replacement contents to write to the session plan file. |
| 16286 | func (a *PlanAPI) Update(ctx context.Context, params *PlanUpdateRequest) (*SessionPlanUpdateResult, error) { |
| 16287 | req := map[string]any{"sessionId": a.sessionID} |
| 16288 | if params != nil { |
| 16289 | req["content"] = params.Content |
| 16290 | } |
| 16291 | raw, err := a.client.Request(ctx, "session.plan.update", req) |
| 16292 | if err != nil { |
| 16293 | return nil, err |
| 16294 | } |
| 16295 | var result SessionPlanUpdateResult |
| 16296 | if err := json.Unmarshal(raw, &result); err != nil { |
| 16297 | return nil, err |
| 16298 | } |
| 16299 | return &result, nil |
| 16300 | } |
| 16301 | |
| 16302 | // Experimental: PluginsAPI contains experimental APIs that may change or be removed. |
| 16303 | type PluginsAPI sessionAPI |