Commit Graph

4 Commits

Author SHA1 Message Date
Luis Pater
46fa32f087 Update log level in OpenURL function from Debug to Info 2025-09-07 21:28:10 +08:00
Luis Pater
8c555c4e69 Refactor codebase 2025-08-25 16:58:16 +08:00
Luis Pater
c5cc238308 Refactor error handling and variable declarations in browser and logging modules
- Simplified variable initialization in `browser.go` for readability.
- Updated error handling in `request_logger.go` with better resource cleanup using deferred anonymous functions.

Refactor API handlers to use `GetContextWithCancel` for streamlined context creation and response handling

- Replaced redundant `context.WithCancel` and `context.WithValue` logic with the new `GetContextWithCancel` utility in all handlers.
- Centralized API response storage in the given context during cancellation.
- Updated associated cancellation calls for consistency and improved resource management.

- Replaced `apiResponseData` with `AddAPIResponseData` for centralized response recording.
- Simplified cancellation logic by switching to a boolean-based `cliCancel` method.
- Removed unused `apiResponseData` slices across handlers to reduce memory usage.
- Updated `handlers.go` to support unified response data storage per request context.
2025-08-17 20:13:45 +08:00
Luis Pater
de7b8501cc Add openai codex support 2025-08-16 01:22:33 +08:00