(currentChat database.Chat)
| 233 | } |
| 234 | |
| 235 | func validateSubagentSpawnParent(currentChat database.Chat) error { |
| 236 | if currentChat.ParentChatID.Valid { |
| 237 | return xerrors.New("delegated chats cannot create child subagents") |
| 238 | } |
| 239 | if isExploreSubagentMode(currentChat.Mode) { |
| 240 | return xerrors.New("explore chats cannot create child subagents") |
| 241 | } |
| 242 | return nil |
| 243 | } |
| 244 | |
| 245 | func subagentTypeFromChat(chat database.Chat) string { |
| 246 | if !chat.Mode.Valid { |
no test coverage detected