Commit Graph

3 Commits

Author SHA1 Message Date
王性驊 3387887fb9 feat(logic): implement complete ChatCompletions streaming with SSE
- Full SSE streaming support with proper event format
- Tool calls handling with marker detection
- Rate limit detection and reporting
- Account pool integration (round-robin, stats tracking)
- Request/response logging and traffic tracking
- Thinking/reasoning content support
- Model resolution with strict mode
- Workspace and prompt truncation handling
- Added X-Accel-Buffering header for proper SSE
- Pass method/path for logging context
2026-04-03 23:04:28 +08:00
王性驊 f90d72b279 feat(logic): implement logic layer for health, models, and chat completions
- HealthLogic: simple health check response
- ModelsLogic: list Cursor CLI models with caching and Anthropic aliases
- ChatCompletionsLogic: scaffold for OpenAI-format completions (streaming placeholder)
- AnthropicMessagesLogic: scaffold for Anthropic format (TODO)
- Update handler for SSE streaming support
- Add models.go with ListCursorCliModels and model mappings
2026-04-03 23:00:18 +08:00
王性驊 8b6abbbba7 refactor(task-0): initialize go-zero project structure
- Add go-zero dependency to go.mod
- Create api/chat.api with OpenAI-compatible types
- Create etc/chat.yaml configuration
- Update Makefile with goctl commands
- Generate go-zero scaffold (types, handlers, logic, svc)
- Move chat.go to cmd/chat/chat.go
- Add Config struct for go-zero (keep BridgeConfig for backward compatibility)
2026-04-03 17:15:35 +08:00