Commit graph

11 commits

Author SHA1 Message Date
TamHC
d9ad121135
Merge 3edafd0503 into 57407112fb 2025-07-17 02:24:46 +08:00
D1m7asis
c6d084f5dc feat: add AIML API provider
Introduces support for the AI/ML API provider, including configuration options, chat and embedding model loading, and UI integration. Updates documentation and sample config to reflect the new provider.
2025-06-27 13:43:54 +02:00
TamHC
88ab31e820
add layout choice 2025-06-24 20:45:25 +08:00
TamHC
883e457009
implemented the history retention feature
### 1. __History Retention Configuration__

- __config.toml__: Added `[HISTORY]` section with `RETENTION_DAYS = 30` setting
- __Backend Integration__: Updated configuration handling to support history retention
- __API Endpoints__: Modified `/api/config` to read/write history retention settings

### 2. __User Interface__

- __Settings Page__: Added "History Settings" section with number input for retention days
- __Real-time Updates__: Settings are saved to config.toml when changed
- __Clear Documentation__: Explains that retention only applies when incognito mode is off

### 3. __Automatic History Cleanup__

- __Background Processing__: Cleanup runs automatically when new chats are created (non-incognito mode)
- __Smart Logic__: Only deletes chats older than configured retention period
- __Complete Cleanup__: Removes both chat records and associated messages
- __Performance Optimized__: Non-blocking background execution

### 4. __Manual Cleanup API__

- __Endpoint__: `POST /api/cleanup-history` for manual cleanup triggers
- __Utility Functions__: Reusable cleanup logic in dedicated utility file

### 5. __Docker Rebuild__

- __Container Rebuild__: Successfully rebuilt the Docker containers with new features
- __Configuration Persistence__: config.toml changes are preserved in Docker volume
- __Application Ready__: The application should now be accessible at [](http://localhost:3000)<http://localhost:3000>

## Key Features:

1. __Incognito Mode Integration__: History retention only applies when incognito mode is OFF
2. __Flexible Configuration__: 0 = keep forever, any positive number = days to retain
3. __Automatic Cleanup__: Runs in background when creating new chats
4. __Manual Control__: API endpoint for manual cleanup triggers
5. __Database Integrity__: Properly removes both chats and associated messages

## Testing the Feature:

1. __Access the Application__: Open [](http://localhost:3000)<http://localhost:3000> in your browser
2. __Configure Settings__: Go to Settings → History Settings → Set retention days
3. __Test Incognito Mode__: Toggle incognito mode on/off to see different behaviors
4. __Create Test Chats__: Create chats in both modes to verify functionality
5. __Manual Cleanup__: Use the `/api/cleanup-history` endpoint to test manual cleanup
2025-06-24 18:26:18 +08:00
ItzCrazyKns
bb21184ea2 feat(settings): show loading spinner immediately 2025-05-27 18:32:09 +05:30
ItzCrazyKns
1862491496 feat(settings): add LM Studio API URL 2025-04-12 11:59:05 +05:30
ItzCrazyKns
073b5e897c feat(app): lint & beautify 2025-04-12 11:58:52 +05:30
haddadrm
7e1dc33a08 Implement provider formatting improvements and fix client-side compatibility
- Add PROVIDER_INFO metadata to each provider file with proper display names
- Create centralized PROVIDER_METADATA in index.ts for consistent reference
- Update settings UI to use provider metadata for display names
- Fix client/server compatibility for Node.js modules in config.ts
2025-04-11 19:18:19 +04:00
ItzCrazyKns
588e68e93e feat(providers): add deepseek provider 2025-04-06 13:37:43 +05:30
ItzCrazyKns
7d52fbb368 feat(settings): add system instructions 2025-04-01 15:50:24 +05:30
ItzCrazyKns
217736d05a feat(app): remove backend 2025-03-19 16:23:27 +05:30
Renamed from ui/app/settings/page.tsx (Browse further)