拆分 main 功能模块

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-06-17 11:29:51 +08:00
co-authored by Claude
parent 132ab2a1cb
commit ccc1260fe0
21 changed files with 2318 additions and 2074 deletions
+14
View File
@@ -0,0 +1,14 @@
package server
func (s *Server) registerRoutes() {
s.router.GET("/", s.indexHandler)
s.router.POST("/api/chat", s.chatHandler)
s.router.GET("/api/openai", s.listOpenAIHandler)
s.router.POST("/api/openai/active", s.switchOpenAIHandler)
s.router.GET("/api/search", s.listSearchHandler)
s.router.POST("/api/search/active", s.switchSearchHandler)
s.router.GET("/api/conversations", s.listConversationsHandler)
s.router.POST("/api/conversations", s.createConversationHandler)
s.router.GET("/api/conversations/:id", s.getConversationHandler)
s.router.DELETE("/api/conversations/:id", s.deleteConversationHandler)
}