mirror of
https://github.com/TautvydasDerzinskas/Thingport.git
synced 2026-10-18 20:59:55 -05:00
* feat: categorize models with an OpenAI-compatible AI provider Models can now be sorted into the user's categories by any OpenAI-compatible chat endpoint (llama.cpp, Ollama, vLLM, OpenAI, OpenRouter...), configured once by an admin under settings: mode off/suggest/auto, confidence threshold, categorize on import, concurrency, optional preview image. Every print now records where its category came from (manual, site rule, AI, or legacy for rows that predate this). AI never changes a manual choice: runs and the import hook skip them, and a single-model request needs force. Folders are never touched. Category changes go through one setPrintCategory path, so the name check and file relocation stay shared, and AI writes are a compare-and-set against what was read before the provider call, so an edit made meanwhile wins. Users get per-model recategorize, accept/reject of pending suggestions (a rejected category is not offered again), and a background "recategorize all" with scope flags, progress and cancel that stops after repeated provider failures. * feat: AI categorization settings, suggestions and bulk runs in the UI Admin settings get an AI categorization section with a connection test and a privacy note. The model menu offers "Recategorize with AI" (asking before it overrides a manual category), the side panel shows a pending suggestion with accept/reject and marks AI-set categories, and the models page has "Recategorize all with AI" with scope, progress and cancel, plus a pending suggestions list with bulk accept/reject. * fix: keep suggestion actions from overlapping the reason MUI's secondaryAction is absolutely positioned over a fixed padding, so the two buttons covered a long reason. They now sit in the row, and wrap under the text on narrow screens. * fix: put the clear API key action inside the key field A full-width outlined button under the field read as an empty input in an error state. It is now a small action at the end of the field, and the helper text says the key goes away on save once it's clicked. * refactor: update AI categorization admin part * refactor: move ai categorization buttons to categories manager modal * fix: multiple smaller problems with AI categorization --------- Co-authored-by: Tautvydas Derzinskas <tautvydasuk@gmail.com>