refactor: UI

This commit is contained in:
leookun
2026-08-07 01:50:20 +08:00
parent 5bd39ed317
commit 225de8bb85
39 changed files with 1734 additions and 1604 deletions
@@ -181,6 +181,25 @@ func supportedToolNamesForMode(mode agentv1.AgentMode) map[string]struct{} {
}
}
func isKnownToolName(toolName string) bool {
trimmedToolName := strings.TrimSpace(toolName)
if trimmedToolName == "" {
return false
}
for _, supported := range []map[string]struct{}{
agentModeToolNames,
askModeToolNames,
planModeToolNames,
debugModeToolNames,
multitaskModeToolNames,
} {
if _, ok := supported[trimmedToolName]; ok {
return true
}
}
return false
}
func isToolAllowedInMode(mode agentv1.AgentMode, subagentTypeName string, toolName string) bool {
trimmedToolName := strings.TrimSpace(toolName)
if trimmedToolName == "" {