- 03 Aug, 2025 5 commits
-
-
✨ - Add new PrefillGroup model with CRUD operations * Support for model, tag, and endpoint group types * JSON storage for group items with GORM datatypes * Automatic database migration support - Implement backend API endpoints * GET /api/prefill_group - List groups by type with admin auth * POST /api/prefill_group - Create new groups * PUT /api/prefill_group - Update existing groups * DELETE /api/prefill_group/:id - Delete groups - Add comprehensive frontend management interface * PrefillGroupManagement component for group listing * EditPrefillGroupModal for group creation/editing * Integration with EditModelModal for auto-filling * Responsive design with CardTable and SideSheet - Enhance model editing workflow * Tag group selection with auto-fill functionality * Endpoint group selection with auto-fill functionality * Seamless integration with existing model forms - Create reusable UI components * Extract common rendering utilities to models/ui/ * Shared renderLimitedItems and renderDescription functions * Consistent styling across all model-related components - Improve user experience * Empty state illustrations matching existing patterns * Fixed column positioning for operation buttons * Item content display with +x indicators for overflow * Tooltip support for long descriptions
t0ng7u committed -
🚀 Backend • model/model_meta.go – Added `EnableGroups []string` to Model struct – fillModelExtra now populates EnableGroups • model/model_groups.go – New helper `GetModelEnableGroups` (reuses Pricing cache) • model/pricing_refresh.go – Added `RefreshPricing()` to force immediate cache rebuild • controller/model_meta.go – `GetAllModelsMeta` & `SearchModelsMeta` call `model.RefreshPricing()` before querying, ensuring groups / endpoints are up-to-date Frontend • ModelsColumnDefs.js – Added `renderGroups` util and “可用分组” table column displaying color-coded tags Result Admins can now see which user groups can access each model, and any ability/group changes are reflected instantly without the previous 1-minute delay.
t0ng7u committed -
✨ Overview • Re-designed `MissingModelsModal` to align with `ModelTestModal` and deliver a cleaner, paginated experience. • Improved mobile responsiveness for action buttons in `ModelsActions`. Details 1. MissingModelsModal.jsx • Switched from `List` to `Table` for a more structured view. • Added search bar with live keyword filtering and clear icon. • Implemented pagination via `MODEL_TABLE_PAGE_SIZE`; auto-resets on search. • Dynamic rendering: when no data, show unified Empty state without column header. • Enhanced header layout with total-count subtitle and modal corner rounding. • Removed unused `Typography.Text` import. 2. ModelsActions.jsx • Set “Delete Selected Models” and “Missing Models” buttons to `flex-1 md:flex-initial`, placing them on the same row as “Add Model” on small screens. Result The “Missing Models” workflow now offers quicker discovery, a familiar table interface, and full mobile friendliness—without altering API behavior.
t0ng7u committed -
✨ Highlights • Introduced `Typography.Text` link with `IconLink` in `extraText` for the **icon** field, pointing to LobeHub’s full icon catalogue; only “请点击我” is clickable for clarity. • Added required imports for `Typography` and `IconLink`. • Removed unnecessary `size="large"` prop from the status `Form.Switch` to align with default form styling. These tweaks improve user guidance when selecting vendor icons and refine the modal’s visual consistency.
t0ng7u committed -
♻ Introduce a generic `renderLimitedItems` helper within `ModelsColumnDefs.js` to eliminate duplicated logic for list-style columns. Key changes • Added `renderLimitedItems` to handle item limiting, “+N” indicator, and popover display. • Migrated `renderTags`, `renderEndpoints`, and `renderBoundChannels` to use the new helper. • Removed redundant inline implementations, reducing complexity and improving readability. • Preserved previous UX: first 3 items shown, overflow accessible via popover. This refactor streamlines code maintenance and ensures consistent behavior across related columns.
t0ng7u committed
-
- 02 Aug, 2025 12 commits
- 01 Aug, 2025 9 commits
-
-
creamlike1024 committed
-
creamlike1024 committed
-
creamlike1024 committed
-
CaIon committed
-
CaIon committed
-
refactor: simplify streamResponseGeminiChat2OpenAI by removing hasImage return value and optimizing response text handling
CaIon committed -
fix: update JSONEditor to default to manual mode for invalid JSON and add error message for invalid data
CaIon committed -
Revert "feat: add Claude Code channel support with OAuth integration"
Calcium-Ion committed -
CaIon committed
-
- 31 Jul, 2025 14 commits
-
-
✨ 1. EditModelModal quality-of-life • Added comma parsing to `Form.TagInput`; users can now paste `tag1, tag2 , tag3` to bulk-create tags. • Updated placeholder copy to reflect the new capability. All files pass linting; no runtime changes outside the intended UI updates.t0ng7u committed -
🎨 • Removed obsolete `sidebarIconColors` map and `getItemColor` util from SiderBar/render; all selected states now use the single CSS variable `--semi-color-primary` for both text and icons. • Simplified `getLucideIcon`: – Added `Package` to Lucide imports. – Switched “models” case to `<Package />`, avoiding duplication with the Layers glyph. – Replaced per-key color logic with `iconColor` derived from the new uniform highlight color. • Stripped any unused imports / dead code paths after the refactor. • Lint passes; sidebar hover/focus behavior unchanged while visual consistency is improved.t0ng7u committed -
♻ Highlights ────────── 1. Removed code duplication • Introduced `extractItems` helper to safely unwrap API payloads. • Simplified `getFormValues` to a single-line fallback expression. • Replaced repeated list-extraction code in `loadModels`, `searchModels`, and `refreshVendorCounts` with the new helper. 2. Vendor tab accuracy & performance • Added `refreshVendorCounts` to recalc counts via a single lightweight request; invoked only when必要 (current tab ≠ "all“) to avoid redundancy. • `loadModels` still updates counts instantly when viewing "all", ensuring accurate numbers on initial load and page changes. 3. Misc clean-ups • Streamlined conditional URL building and state updates. • Confirmed all async branches include error handling with i18n messages. • Ran linter → zero issues. Result: leaner, easier-to-maintain hook with correct, real-time vendor counts and no repeated logic.t0ng7u committed -
🐛 The update operation for Model previously overwrote `created_time` with zero because GORM included every struct field in the UPDATE statement. This commit adjusts `Model.Update()` to: * Call `Omit("created_time")` so the creation timestamp is never modified. * Refresh `UpdatedTime` with `common.GetTimestamp()` before persisting. * Delegate the remainder of the struct to GORM, eliminating the need to maintain an explicit allow-list whenever new fields are introduced. No API contract is changed; existing CRUD endpoints continue to work normally while data integrity for historical records is now guaranteed.t0ng7u committed -
🔄 Backend • model/model_meta.go – Import strconv – SearchModels: support numeric vendor ID filter vs. fuzzy name search – Explicitly order by `models.id` to avoid “ambiguous column name: id” error Frontend • hooks/useModelsData.js – Change vendor-filter API to pass vendor ID – Automatically reload models when `activeVendorKey` changes – Update vendor counts only when viewing “All” to preserve other tab totals • Add missing effect in EditModelModal to refresh vendor list only when modal visible • Other minor updates to keep lints clean Result Tabs now: 1. Trigger API requests on click 2. Show accurate per-vendor totals 3. Filter models without resetting other counts Backend search handles both vendor IDs and names without SQL errors.
t0ng7u committed -
t0ng7u committed
-
🚀 Backend • Add `model/model_meta.go` and `model/vendor_meta.go` defining Model & Vendor entities with CRUD helpers, soft-delete and time stamps • Create corresponding controllers `controller/model_meta.go`, `controller/vendor_meta.go` and register routes in `router/api-router.go` • Auto-migrate new tables in DB startup logic Frontend • Build complete “Model Management” module under `/console/models` - New pages, tables, filters, actions, hooks (`useModelsData`) and dynamic vendor tabs - Modals `EditModelModal.jsx` & unified `EditVendorModal.jsx`; latter now uses default confirm/cancel footer and mobile-friendly modal sizing (`full-width` / `small`) via `useIsMobile` • Update sidebar (`SiderBar.js`) and routing (`App.js`) to surface the feature • Add helper updates (`render.js`) incl. `stringToColor`, dynamic LobeHub icon retrieval, and tag color palettes Table UX improvements • Replace separate status column with inline Enable / Disable buttons in operation column (matching channel table style) • Limit visible tags to max 3; overflow represented as “+x” tag with padded `Popover` showing remaining tags • Color all tags deterministically using `stringToColor` for consistent theming • Change vendor column tag color to white for better contrast Misc • Minor layout tweaks, compact-mode toggle relocation, lint fixes and TypeScript/ESLint clean-up These changes collectively deliver end-to-end model & vendor administration while unifying visual language across management tables.
t0ng7u committed -
Seefs committed
-
feat: add Claude Code channel support with OAuth integration
Calcium-Ion committed -
fix: handle authorization code format in ExchangeCode function and update placeholder in EditChannelModal
Seefs committed -
# Conflicts: # web/src/components/table/channels/modals/EditChannelModal.jsx
Seefs committed -
CaIon committed
-
CaIon committed
-
CaIon committed
-