MCPcopy Create free account
hub / github.com/Thunder-Compute/thunder-cli / runModifyModel

Function runModifyModel

tui/modify.go:829–850  ·  view source on GitHub ↗
(m tea.Model)

Source from the content-addressed store, hash-verified

827}
828
829func runModifyModel(m tea.Model) (*ModifyConfig, error) {
830 p := tea.NewProgram(m)
831 finalModel, err := p.Run()
832 if err != nil {
833 return nil, fmt.Errorf("error running interactive modify: %w", err)
834 }
835
836 finalModifyModel, ok := finalModel.(modifyModel)
837 if !ok {
838 return nil, fmt.Errorf("unexpected model type")
839 }
840
841 if finalModifyModel.cancelled {
842 return nil, ErrCancelled
843 }
844
845 if finalModifyModel.err != nil {
846 return nil, finalModifyModel.err
847 }
848
849 return &finalModifyModel.config, nil
850}
851
852// RunModifyInteractive starts the interactive modify flow
853func RunModifyInteractive(client *api.Client, instance *api.Instance, specs *utils.SpecStore) (*ModifyConfig, error) {

Callers 2

RunModifyInteractiveFunction · 0.85
RunModifyHybridFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected