Commit Graph

15 Commits

Author SHA1 Message Date
Fredrik Bränström
3ad140d2f5 feat: add environment variable interpolation for API keys
- Add interpolateEnvVars function to support $VAR_NAME and ${VAR_NAME} syntax
- Apply interpolation to config after JSON5 parsing in readConfigFile()
- Enables secure API key management without hardcoding in config.json
- Supports nested objects and arrays for comprehensive interpolation
- Maintains backward compatibility with existing configurations

Example usage in config.json:
{
  "OPENAI_API_KEY": "$OPENAI_API_KEY",
  "Providers": [
    {
      "name": "openai",
      "api_key": "$OPENAI_API_KEY"
    }
  ]
}
2025-08-11 21:43:32 +02:00
musistudio
075ec76ec1 fix windows logs path error 2025-08-11 10:25:50 +08:00
musistudio
b856e1e11b relese v1.0.34 to optimize the log 2025-08-10 21:37:48 +08:00
musistudio
9cd5587f52 feat: Implement temporary API key based on system UUID for UI access
This commit introduces a new authentication mechanism for the web UI.
Instead of requiring a pre-configured API key, a temporary API key is
generated based on the system's UUID. This key is passed to the UI
as a URL parameter and used for API requests.

Changes:
- Added a new utility to get the system UUID and generate a temporary API key.
- Modified the `ccr ui` command to generate and pass the temporary API key.
- Updated the authentication middleware to validate the temporary API key.
- Adjusted the frontend to use the temporary API key from the URL.
- Added a dedicated endpoint to test API access without modifying data.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-07 15:00:42 +08:00
musistudio
3cb086fc57 feat: Limit config backups to 3 most recent files
Modified the backupConfigFile function to automatically clean up old backups,
keeping only the 3 most recent backup files. This prevents the config directory
from accumulating excessive backup files over time.

The implementation:
- Creates timestamped backups as before
- After each new backup, scans for existing backups
- Sorts backups by timestamp (newest first)
- Deletes all but the 3 most recent backups
- Gracefully handles cleanup errors with warnings

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-30 21:59:10 +08:00
musistudio
1d7374067e fix: improve error handling and config validation
- Add fallback mechanism for service startup with default config
- Implement config file backup before saving
- Add robust validation for config data in UI components
- Improve error handling and user feedback in UI
- Fix potential null/undefined access in provider and router components

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-30 15:39:44 +08:00
musistudio
112d7ef8f9 feat: add UI build to build process
- Created separate build script to handle both CLI and UI building
- Added automatic UI dependency installation
- Copy built UI artifacts to dist directory

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-30 11:15:05 +08:00
musistudio
179bab605e release v1.0.27 to fix some bugs and enhance tools 2025-07-25 17:17:14 +08:00
jinhui.li
49502e1534 support authentication via APIKEY configuration 2025-07-17 12:49:14 +08:00
musi
3260d1b6b8 release v1.0.15 2025-07-07 15:03:48 +08:00
jinhui.li
30c764828a switch to llms 2025-07-02 13:24:37 +08:00
jinhui.li
9a89250d79 use the router to dispatch different models: background,longcontext and think 2025-06-14 19:48:29 +08:00
jinhui.li
2cc91ada5c add cli 2025-06-10 12:55:25 +08:00
jinhui.li
089654871c support plugins 2025-03-31 22:28:02 +08:00
jinhui.li
93fcd77544 support deepseek-v3-20250324 2025-03-25 14:51:28 +08:00