@@ -415,29 +415,41 @@ type ServerModelsRpcApi struct { client *jsonrpc2.Client }
415415
416416func (a * ServerModelsRpcApi ) List (ctx context.Context ) (* ModelsListResult , error ) {
417417 raw , err := a .client .Request ("models.list" , map [string ]interface {}{})
418- if err != nil { return nil , err }
418+ if err != nil {
419+ return nil , err
420+ }
419421 var result ModelsListResult
420- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
422+ if err := json .Unmarshal (raw , & result ); err != nil {
423+ return nil , err
424+ }
421425 return & result , nil
422426}
423427
424428type ServerToolsRpcApi struct { client * jsonrpc2.Client }
425429
426430func (a * ServerToolsRpcApi ) List (ctx context.Context , params * ToolsListParams ) (* ToolsListResult , error ) {
427431 raw , err := a .client .Request ("tools.list" , params )
428- if err != nil { return nil , err }
432+ if err != nil {
433+ return nil , err
434+ }
429435 var result ToolsListResult
430- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
436+ if err := json .Unmarshal (raw , & result ); err != nil {
437+ return nil , err
438+ }
431439 return & result , nil
432440}
433441
434442type ServerAccountRpcApi struct { client * jsonrpc2.Client }
435443
436444func (a * ServerAccountRpcApi ) GetQuota (ctx context.Context ) (* AccountGetQuotaResult , error ) {
437445 raw , err := a .client .Request ("account.getQuota" , map [string ]interface {}{})
438- if err != nil { return nil , err }
446+ if err != nil {
447+ return nil , err
448+ }
439449 var result AccountGetQuotaResult
440- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
450+ if err := json .Unmarshal (raw , & result ); err != nil {
451+ return nil , err
452+ }
441453 return & result , nil
442454}
443455
@@ -451,9 +463,13 @@ type ServerRpc struct {
451463
452464func (a * ServerRpc ) Ping (ctx context.Context , params * PingParams ) (* PingResult , error ) {
453465 raw , err := a .client .Request ("ping" , params )
454- if err != nil { return nil , err }
466+ if err != nil {
467+ return nil , err
468+ }
455469 var result PingResult
456- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
470+ if err := json .Unmarshal (raw , & result ); err != nil {
471+ return nil , err
472+ }
457473 return & result , nil
458474}
459475
@@ -470,9 +486,13 @@ type ModelRpcApi struct { client *jsonrpc2.Client; sessionID string }
470486func (a * ModelRpcApi ) GetCurrent (ctx context.Context ) (* SessionModelGetCurrentResult , error ) {
471487 req := map [string ]interface {}{"sessionId" : a .sessionID }
472488 raw , err := a .client .Request ("session.model.getCurrent" , req )
473- if err != nil { return nil , err }
489+ if err != nil {
490+ return nil , err
491+ }
474492 var result SessionModelGetCurrentResult
475- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
493+ if err := json .Unmarshal (raw , & result ); err != nil {
494+ return nil , err
495+ }
476496 return & result , nil
477497}
478498
@@ -485,9 +505,13 @@ func (a *ModelRpcApi) SwitchTo(ctx context.Context, params *SessionModelSwitchTo
485505 }
486506 }
487507 raw , err := a .client .Request ("session.model.switchTo" , req )
488- if err != nil { return nil , err }
508+ if err != nil {
509+ return nil , err
510+ }
489511 var result SessionModelSwitchToResult
490- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
512+ if err := json .Unmarshal (raw , & result ); err != nil {
513+ return nil , err
514+ }
491515 return & result , nil
492516}
493517
@@ -496,9 +520,13 @@ type ModeRpcApi struct { client *jsonrpc2.Client; sessionID string }
496520func (a * ModeRpcApi ) Get (ctx context.Context ) (* SessionModeGetResult , error ) {
497521 req := map [string ]interface {}{"sessionId" : a .sessionID }
498522 raw , err := a .client .Request ("session.mode.get" , req )
499- if err != nil { return nil , err }
523+ if err != nil {
524+ return nil , err
525+ }
500526 var result SessionModeGetResult
501- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
527+ if err := json .Unmarshal (raw , & result ); err != nil {
528+ return nil , err
529+ }
502530 return & result , nil
503531}
504532
@@ -508,9 +536,13 @@ func (a *ModeRpcApi) Set(ctx context.Context, params *SessionModeSetParams) (*Se
508536 req ["mode" ] = params .Mode
509537 }
510538 raw , err := a .client .Request ("session.mode.set" , req )
511- if err != nil { return nil , err }
539+ if err != nil {
540+ return nil , err
541+ }
512542 var result SessionModeSetResult
513- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
543+ if err := json .Unmarshal (raw , & result ); err != nil {
544+ return nil , err
545+ }
514546 return & result , nil
515547}
516548
@@ -519,9 +551,13 @@ type PlanRpcApi struct { client *jsonrpc2.Client; sessionID string }
519551func (a * PlanRpcApi ) Read (ctx context.Context ) (* SessionPlanReadResult , error ) {
520552 req := map [string ]interface {}{"sessionId" : a .sessionID }
521553 raw , err := a .client .Request ("session.plan.read" , req )
522- if err != nil { return nil , err }
554+ if err != nil {
555+ return nil , err
556+ }
523557 var result SessionPlanReadResult
524- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
558+ if err := json .Unmarshal (raw , & result ); err != nil {
559+ return nil , err
560+ }
525561 return & result , nil
526562}
527563
@@ -531,18 +567,26 @@ func (a *PlanRpcApi) Update(ctx context.Context, params *SessionPlanUpdateParams
531567 req ["content" ] = params .Content
532568 }
533569 raw , err := a .client .Request ("session.plan.update" , req )
534- if err != nil { return nil , err }
570+ if err != nil {
571+ return nil , err
572+ }
535573 var result SessionPlanUpdateResult
536- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
574+ if err := json .Unmarshal (raw , & result ); err != nil {
575+ return nil , err
576+ }
537577 return & result , nil
538578}
539579
540580func (a * PlanRpcApi ) Delete (ctx context.Context ) (* SessionPlanDeleteResult , error ) {
541581 req := map [string ]interface {}{"sessionId" : a .sessionID }
542582 raw , err := a .client .Request ("session.plan.delete" , req )
543- if err != nil { return nil , err }
583+ if err != nil {
584+ return nil , err
585+ }
544586 var result SessionPlanDeleteResult
545- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
587+ if err := json .Unmarshal (raw , & result ); err != nil {
588+ return nil , err
589+ }
546590 return & result , nil
547591}
548592
@@ -551,9 +595,13 @@ type WorkspaceRpcApi struct { client *jsonrpc2.Client; sessionID string }
551595func (a * WorkspaceRpcApi ) ListFiles (ctx context.Context ) (* SessionWorkspaceListFilesResult , error ) {
552596 req := map [string ]interface {}{"sessionId" : a .sessionID }
553597 raw , err := a .client .Request ("session.workspace.listFiles" , req )
554- if err != nil { return nil , err }
598+ if err != nil {
599+ return nil , err
600+ }
555601 var result SessionWorkspaceListFilesResult
556- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
602+ if err := json .Unmarshal (raw , & result ); err != nil {
603+ return nil , err
604+ }
557605 return & result , nil
558606}
559607
@@ -563,9 +611,13 @@ func (a *WorkspaceRpcApi) ReadFile(ctx context.Context, params *SessionWorkspace
563611 req ["path" ] = params .Path
564612 }
565613 raw , err := a .client .Request ("session.workspace.readFile" , req )
566- if err != nil { return nil , err }
614+ if err != nil {
615+ return nil , err
616+ }
567617 var result SessionWorkspaceReadFileResult
568- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
618+ if err := json .Unmarshal (raw , & result ); err != nil {
619+ return nil , err
620+ }
569621 return & result , nil
570622}
571623
@@ -576,9 +628,13 @@ func (a *WorkspaceRpcApi) CreateFile(ctx context.Context, params *SessionWorkspa
576628 req ["content" ] = params .Content
577629 }
578630 raw , err := a .client .Request ("session.workspace.createFile" , req )
579- if err != nil { return nil , err }
631+ if err != nil {
632+ return nil , err
633+ }
580634 var result SessionWorkspaceCreateFileResult
581- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
635+ if err := json .Unmarshal (raw , & result ); err != nil {
636+ return nil , err
637+ }
582638 return & result , nil
583639}
584640
@@ -593,9 +649,13 @@ func (a *FleetRpcApi) Start(ctx context.Context, params *SessionFleetStartParams
593649 }
594650 }
595651 raw , err := a .client .Request ("session.fleet.start" , req )
596- if err != nil { return nil , err }
652+ if err != nil {
653+ return nil , err
654+ }
597655 var result SessionFleetStartResult
598- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
656+ if err := json .Unmarshal (raw , & result ); err != nil {
657+ return nil , err
658+ }
599659 return & result , nil
600660}
601661
@@ -605,18 +665,26 @@ type AgentRpcApi struct { client *jsonrpc2.Client; sessionID string }
605665func (a * AgentRpcApi ) List (ctx context.Context ) (* SessionAgentListResult , error ) {
606666 req := map [string ]interface {}{"sessionId" : a .sessionID }
607667 raw , err := a .client .Request ("session.agent.list" , req )
608- if err != nil { return nil , err }
668+ if err != nil {
669+ return nil , err
670+ }
609671 var result SessionAgentListResult
610- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
672+ if err := json .Unmarshal (raw , & result ); err != nil {
673+ return nil , err
674+ }
611675 return & result , nil
612676}
613677
614678func (a * AgentRpcApi ) GetCurrent (ctx context.Context ) (* SessionAgentGetCurrentResult , error ) {
615679 req := map [string ]interface {}{"sessionId" : a .sessionID }
616680 raw , err := a .client .Request ("session.agent.getCurrent" , req )
617- if err != nil { return nil , err }
681+ if err != nil {
682+ return nil , err
683+ }
618684 var result SessionAgentGetCurrentResult
619- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
685+ if err := json .Unmarshal (raw , & result ); err != nil {
686+ return nil , err
687+ }
620688 return & result , nil
621689}
622690
@@ -626,18 +694,26 @@ func (a *AgentRpcApi) Select(ctx context.Context, params *SessionAgentSelectPara
626694 req ["name" ] = params .Name
627695 }
628696 raw , err := a .client .Request ("session.agent.select" , req )
629- if err != nil { return nil , err }
697+ if err != nil {
698+ return nil , err
699+ }
630700 var result SessionAgentSelectResult
631- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
701+ if err := json .Unmarshal (raw , & result ); err != nil {
702+ return nil , err
703+ }
632704 return & result , nil
633705}
634706
635707func (a * AgentRpcApi ) Deselect (ctx context.Context ) (* SessionAgentDeselectResult , error ) {
636708 req := map [string ]interface {}{"sessionId" : a .sessionID }
637709 raw , err := a .client .Request ("session.agent.deselect" , req )
638- if err != nil { return nil , err }
710+ if err != nil {
711+ return nil , err
712+ }
639713 var result SessionAgentDeselectResult
640- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
714+ if err := json .Unmarshal (raw , & result ); err != nil {
715+ return nil , err
716+ }
641717 return & result , nil
642718}
643719
@@ -647,9 +723,13 @@ type CompactionRpcApi struct { client *jsonrpc2.Client; sessionID string }
647723func (a * CompactionRpcApi ) Compact (ctx context.Context ) (* SessionCompactionCompactResult , error ) {
648724 req := map [string ]interface {}{"sessionId" : a .sessionID }
649725 raw , err := a .client .Request ("session.compaction.compact" , req )
650- if err != nil { return nil , err }
726+ if err != nil {
727+ return nil , err
728+ }
651729 var result SessionCompactionCompactResult
652- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
730+ if err := json .Unmarshal (raw , & result ); err != nil {
731+ return nil , err
732+ }
653733 return & result , nil
654734}
655735
@@ -667,9 +747,13 @@ func (a *ToolsRpcApi) HandlePendingToolCall(ctx context.Context, params *Session
667747 }
668748 }
669749 raw , err := a .client .Request ("session.tools.handlePendingToolCall" , req )
670- if err != nil { return nil , err }
750+ if err != nil {
751+ return nil , err
752+ }
671753 var result SessionToolsHandlePendingToolCallResult
672- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
754+ if err := json .Unmarshal (raw , & result ); err != nil {
755+ return nil , err
756+ }
673757 return & result , nil
674758}
675759
@@ -682,9 +766,13 @@ func (a *PermissionsRpcApi) HandlePendingPermissionRequest(ctx context.Context,
682766 req ["result" ] = params .Result
683767 }
684768 raw , err := a .client .Request ("session.permissions.handlePendingPermissionRequest" , req )
685- if err != nil { return nil , err }
769+ if err != nil {
770+ return nil , err
771+ }
686772 var result SessionPermissionsHandlePendingPermissionRequestResult
687- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
773+ if err := json .Unmarshal (raw , & result ); err != nil {
774+ return nil , err
775+ }
688776 return & result , nil
689777}
690778
@@ -702,9 +790,13 @@ func (a *ShellRpcApi) Exec(ctx context.Context, params *SessionShellExecParams)
702790 }
703791 }
704792 raw , err := a .client .Request ("session.shell.exec" , req )
705- if err != nil { return nil , err }
793+ if err != nil {
794+ return nil , err
795+ }
706796 var result SessionShellExecResult
707- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
797+ if err := json .Unmarshal (raw , & result ); err != nil {
798+ return nil , err
799+ }
708800 return & result , nil
709801}
710802
@@ -717,9 +809,13 @@ func (a *ShellRpcApi) Kill(ctx context.Context, params *SessionShellKillParams)
717809 }
718810 }
719811 raw , err := a .client .Request ("session.shell.kill" , req )
720- if err != nil { return nil , err }
812+ if err != nil {
813+ return nil , err
814+ }
721815 var result SessionShellKillResult
722- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
816+ if err := json .Unmarshal (raw , & result ); err != nil {
817+ return nil , err
818+ }
723819 return & result , nil
724820}
725821
@@ -751,9 +847,13 @@ func (a *SessionRpc) Log(ctx context.Context, params *SessionLogParams) (*Sessio
751847 }
752848 }
753849 raw , err := a .client .Request ("session.log" , req )
754- if err != nil { return nil , err }
850+ if err != nil {
851+ return nil , err
852+ }
755853 var result SessionLogResult
756- if err := json .Unmarshal (raw , & result ); err != nil { return nil , err }
854+ if err := json .Unmarshal (raw , & result ); err != nil {
855+ return nil , err
856+ }
757857 return & result , nil
758858}
759859
0 commit comments