1. 15 Aug, 2025 7 commits
  2. 14 Aug, 2025 4 commits
    • refactor: centralize logging and update resource initialization · c9e9a24e
      This commit refactors the logging mechanism across the application by replacing direct logger calls with a centralized logging approach using the `common` package. Key changes include:
      
      - Replaced instances of `logger.SysLog` and `logger.FatalLog` with `common.SysLog` and `common.FatalLog` for consistent logging practices.
      - Updated resource initialization error handling to utilize the new logging structure, enhancing maintainability and readability.
      - Minor adjustments to improve code clarity and organization throughout various modules.
      
      This change aims to streamline logging and improve the overall architecture of the codebase.
      CaIon committed
    • refactor: Introduce pre-consume quota and unify relay handlers · 97ea8b65
      This commit introduces a major architectural refactoring to improve quota management, centralize logging, and streamline the relay handling logic.
      
      Key changes:
      - **Pre-consume Quota:** Implements a new mechanism to check and reserve user quota *before* making the request to the upstream provider. This ensures more accurate quota deduction and prevents users from exceeding their limits due to concurrent requests.
      
      - **Unified Relay Handlers:** Refactors the relay logic to use generic handlers (e.g., `ChatHandler`, `ImageHandler`) instead of provider-specific implementations. This significantly reduces code duplication and simplifies adding new channels.
      
      - **Centralized Logger:** A new dedicated `logger` package is introduced, and all system logging calls are migrated to use it, moving this responsibility out of the `common` package.
      
      - **Code Reorganization:** DTOs are generalized (e.g., `dalle.go` -> `openai_image.go`) and utility code is moved to more appropriate packages (e.g., `common/http.go` -> `service/http.go`) for better code structure.
      CaIon committed
  3. 13 Aug, 2025 1 commit
    • 🐛 fix(tokens): correct main Chat button navigation to prevent 404 · f1afe914
      The primary "Chat" button on the tokens table navigated to a 404 page
      because it passed incorrect arguments to onOpenLink (using a raw
      localStorage value instead of the parsed chat value).
      
      Changes:
      - Build chatsArray with an explicit `value` for each item.
      - Use the first item's `name` and `value` for the main button, matching
        the dropdown behavior.
      - Preserve existing error handling when no chats are configured.
      
      Impact:
      - Main "Chat" button now opens the correct link, consistent with the
        dropdown action.
      - No API/schema changes, no UI changes.
      
      File:
      - web/src/components/table/tokens/TokensColumnDefs.js
      
      Verification:
      - Manually verified primary button and dropdown both navigate correctly.
      - Linter passes with no issues.
      t0ng7u committed
  4. 12 Aug, 2025 20 commits
  5. 11 Aug, 2025 8 commits