mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-18 14:08:21 +00:00
* feat(prompts): sync Langfuse prompts into the catalog * refactor(prompts): compose the Langfuse prompt sync runner outside the admin handler Add createLangfusePromptSyncRunner, which binds the lock, the prompt-group methods, the ACL grant and the Mongo error predicates once and returns a runner that takes the per-request source, connection-bound listPrompts, lock lease and page cap. The admin handler receives that runner as one dependency instead of forwarding its parts, and its config method signatures return a LangfuseAdminConfig interface in place of Mongoose document types. In api, api/cache/distributedLock.js creates the one DistributedLock for the process and api/server/services/LangfusePromptSync.js composes the runner once with it; the admin route imports the composed runner. * fix(prompts): report incomplete Langfuse syncs and gate the sync action - Refresh the prompt-group and effective-permission queries after a failed sync too, because earlier imports can already be committed. - Return `complete: false` when the page limit stops a sync before the last upstream page, and show a warning instead of the success message. - Show the Sync prompts action only to users with `manage:prompts`, the capability the sync route requires. Resolve the Langfuse startup-config capabilities in one batched lookup. - Document that an interrupted import can leave a group without its initial PUBLIC grant, and that a page in progress can outlast an expired lease. --------- Co-authored-by: Rebase Probe <probe@example.com> |
||
|---|---|---|
| .. | ||
| __tests__ | ||
| add-balance.js | ||
| ban-user.js | ||
| circular-deps.mjs | ||
| connect.js | ||
| create-error-convo.js | ||
| create-user.js | ||
| delete-banner.js | ||
| delete-user.js | ||
| deployed-update.js | ||
| flush-cache.js | ||
| helpers.js | ||
| invite-user.js | ||
| jest.config.js | ||
| jest.setup.logging.cjs | ||
| jest.workers.cjs | ||
| list-balances.js | ||
| list-users.js | ||
| migrate-agent-permissions.js | ||
| migrate-code-file-duplicates.js | ||
| migrate-orphaned-agent-files.js | ||
| migrate-prompt-permissions.js | ||
| migrate-search-tokens.js | ||
| migrate-shared-link-permissions.js | ||
| migrate-tenant-indexes.js | ||
| migrate-terms-timestamp.js | ||
| packages.js | ||
| reset-meili-sync.js | ||
| reset-password.js | ||
| reset-terms.js | ||
| set-balance.js | ||
| smart-reinstall.js | ||
| stop-backend.js | ||
| test-subdirectory-setup.sh | ||
| update-banner.js | ||
| update.js | ||
| user-stats.js | ||