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

Method getMaxCursor

tui/modify.go:533–549  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

531}
532
533func (m modifyModel) getMaxCursor() int {
534 switch m.step {
535 case modifyStepGPU:
536 return len(m.specs.GPUOptions()) - 1
537
538 case modifyStepCompute:
539 if m.gpuCountPhase {
540 return len(m.specs.GPUCounts(m.config.GPUType)) - 1
541 }
542 return len(m.specs.VCPUOptions(m.config.GPUType, m.config.NumGPUs)) - 1
543
544 case modifyStepConfirmation:
545 return 1 // Apply Changes, Cancel
546 }
547
548 return 0
549}
550
551func (m modifyModel) View() string {
552 if m.quitting {

Callers 1

UpdateMethod · 0.95

Calls 3

GPUOptionsMethod · 0.80
GPUCountsMethod · 0.80
VCPUOptionsMethod · 0.80

Tested by

no test coverage detected