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
52 lines
1.9 KiB
Go
52 lines
1.9 KiB
Go
package runtimeprep
|
|
|
|
import "strings"
|
|
|
|
const (
|
|
agentConversationDetailModeCoding = "coding"
|
|
agentConversationDetailModeGeneral = "general"
|
|
)
|
|
|
|
func agentConversationDetailModeSystemPromptAppend(conversationDetailMode string) string {
|
|
instructions := agentConversationDetailModeInstructions(conversationDetailMode)
|
|
if strings.TrimSpace(instructions) == "" {
|
|
return ""
|
|
}
|
|
return instructions
|
|
}
|
|
|
|
func agentConversationDetailModeInstructions(conversationDetailMode string) string {
|
|
switch normalizeAgentConversationDetailMode(conversationDetailMode) {
|
|
case agentConversationDetailModeGeneral:
|
|
return nonTechnicalUIConversationDetailModeInstructions
|
|
default:
|
|
return ""
|
|
}
|
|
}
|
|
|
|
func normalizeAgentConversationDetailMode(conversationDetailMode string) string {
|
|
switch strings.TrimSpace(conversationDetailMode) {
|
|
case agentConversationDetailModeGeneral:
|
|
return agentConversationDetailModeGeneral
|
|
default:
|
|
return agentConversationDetailModeCoding
|
|
}
|
|
}
|
|
|
|
func joinPromptSections(sections ...string) string {
|
|
trimmed := make([]string, 0, len(sections))
|
|
for _, section := range sections {
|
|
if value := strings.TrimSpace(section); value != "" {
|
|
trimmed = append(trimmed, value)
|
|
}
|
|
}
|
|
return strings.Join(trimmed, "\n\n")
|
|
}
|
|
|
|
const nonTechnicalUIConversationDetailModeInstructions = `### Non-technical UI
|
|
- The user has requested a non-technical UI.
|
|
- The app will take care of aspects of this, such as hiding bash tool outputs and similar.
|
|
- Prefer non-technical language when conversing with the user. For example, don't name bash commands you're running. Instead, describe what they do.
|
|
- When writing code to perform non-coding tasks--such as writing and running python to build slide artifacts--avoid mentioning or citing these intermediate code items. Just focus on outputs.
|
|
- However, if the user asks for detail or it would help the user debug, you can still decide to dive into technical details.`
|