Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
42 lines
1.0 KiB
Go
42 lines
1.0 KiB
Go
package api
|
|
|
|
import (
|
|
tuttigenerated "github.com/tutti-os/tutti/services/tuttid/api/generated"
|
|
agentservice "github.com/tutti-os/tutti/services/tuttid/service/agent"
|
|
)
|
|
|
|
func agentPromptContentFromGenerated(content []tuttigenerated.AgentPromptContentBlock) []agentservice.PromptContentBlock {
|
|
result := make([]agentservice.PromptContentBlock, 0, len(content))
|
|
for _, block := range content {
|
|
item := agentservice.PromptContentBlock{
|
|
Type: string(block.Type),
|
|
}
|
|
if block.Text != nil {
|
|
item.Text = *block.Text
|
|
}
|
|
if block.MimeType != nil {
|
|
item.MimeType = string(*block.MimeType)
|
|
}
|
|
if block.Data != nil {
|
|
item.Data = *block.Data
|
|
}
|
|
if block.Url != nil {
|
|
item.URL = *block.Url
|
|
}
|
|
if block.AttachmentId != nil {
|
|
item.AttachmentID = *block.AttachmentId
|
|
}
|
|
if block.Name != nil {
|
|
item.Name = *block.Name
|
|
}
|
|
if block.Path != nil {
|
|
item.Path = *block.Path
|
|
}
|
|
if block.ConnectorKey != nil {
|
|
item.ConnectorKey = *block.ConnectorKey
|
|
}
|
|
result = append(result, item)
|
|
}
|
|
return result
|
|
}
|