Files
zeekay ea80dc3638 feat: Add new Dockerfiles and improve containerization
- Add main Dockerfile for production builds
- Add Dockerfile.runtime for secure code execution
- Add Dockerfile.runtime.fixed with improved configuration
- Include .dockerignore for build optimization
- Add integration documentation and publishing guides
- Update API and CLI components for better runtime support
- Enhance sandbox and container management features
2025-08-16 23:03:39 -05:00

43 lines
1010 B
Go

// Copyright 2025 Hanzo Industries Inc.
// SPDX-License-Identifier: AGPL-3.0
package organization
import (
"github.com/charmbracelet/huh"
"github.com/hanzoai/apiclient"
"github.com/hanzoai/runtime/cli/views/common"
)
func GetOrganizationIdFromPrompt(organizationList []apiclient.Organization) (*apiclient.Organization, error) {
var chosenOrganizationId string
var organizationOptions []huh.Option[string]
for _, organization := range organizationList {
organizationOptions = append(organizationOptions, huh.NewOption(organization.Name, organization.Id))
}
form := huh.NewForm(
huh.NewGroup(
huh.NewSelect[string]().
Title("Choose an Organization").
Options(
organizationOptions...,
).
Value(&chosenOrganizationId),
).WithTheme(common.GetCustomTheme()),
)
if err := form.Run(); err != nil {
return nil, err
}
for _, organization := range organizationList {
if organization.Id == chosenOrganizationId {
return &organization, nil
}
}
return nil, nil
}