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

Method getCurrentComputeCursorPosition

tui/modify.go:522–531  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

520}
521
522func (m modifyModel) getCurrentComputeCursorPosition() int {
523 currentVCPUs, _ := strconv.Atoi(m.currentInstance.CPUCores)
524 vcpuOptions := m.specs.VCPUOptions(m.config.GPUType, m.config.NumGPUs)
525 for i, vcpus := range vcpuOptions {
526 if vcpus == currentVCPUs {
527 return i
528 }
529 }
530 return 0
531}
532
533func (m modifyModel) getMaxCursor() int {
534 switch m.step {

Callers 2

initModifyStepMethod · 0.95
handleEnterMethod · 0.95

Calls 1

VCPUOptionsMethod · 0.80

Tested by

no test coverage detected