feat: add scroll speed to config (#1968)

This commit is contained in:
Aiden Cline
2025-08-15 13:21:02 -05:00
committed by GitHub
parent 57b04d9eb7
commit dc01071498
10 changed files with 116 additions and 62 deletions

View File

@@ -39,10 +39,10 @@ func NewSessionService(opts ...option.RequestOption) (r *SessionService) {
}
// Create a new session
func (r *SessionService) New(ctx context.Context, opts ...option.RequestOption) (res *Session, err error) {
func (r *SessionService) New(ctx context.Context, body SessionNewParams, opts ...option.RequestOption) (res *Session, err error) {
opts = append(r.Options[:], opts...)
path := "session"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &res, opts...)
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...)
return
}
@@ -2324,6 +2324,15 @@ func (r sessionMessagesResponseJSON) RawJSON() string {
return r.raw
}
type SessionNewParams struct {
ParentID param.Field[string] `json:"parentID"`
Title param.Field[string] `json:"title"`
}
func (r SessionNewParams) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
type SessionUpdateParams struct {
Title param.Field[string] `json:"title"`
}