MCPcopy Index your code
hub / github.com/coder/coder / validateSubagentSpawnParent

Function validateSubagentSpawnParent

coderd/x/chatd/subagent_catalog.go:235–243  ·  view source on GitHub ↗
(currentChat database.Chat)

Source from the content-addressed store, hash-verified

233}
234
235func 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
245func subagentTypeFromChat(chat database.Chat) string {
246 if !chat.Mode.Valid {

Callers 1

Calls 2

isExploreSubagentModeFunction · 0.85
NewMethod · 0.65

Tested by

no test coverage detected