返回 DeepSeek-Reasonix
management_command.go
根目录 / internal / serve / management_command.go
1 package serve
2
3 import "strings"
4
5 func isServeManagementCommand(input string) bool {
6 fields := strings.Fields(strings.TrimSpace(input))
7 if len(fields) == 0 {
8 return false
9 }
10 switch strings.ToLower(fields[0]) {
11 case "/compact", "/context", "/new", "/clear", "/goal", "/memory", "/remember",
12 "/migrate", "/migration", "/skill", "/skills", "/plugin", "/plugins",
13 "/reload-cmd", "/hooks", "/mcp", "/provider", "/tree", "/branch",
14 "/switch", "/rewind":
15 return true
16 default:
17 return false
18 }
19 }
20
20 lines GO