mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-20 15:02:02 +00:00
🗂️ feat: Choose Conversation Checkout Mode (#16679)
Some checks are pending
Backend Unit Tests / Build packages (push) Waiting to run
Backend Unit Tests / Codegraph select (push) Waiting to run
Backend Unit Tests / TypeScript type checks (push) Blocked by required conditions
Backend Unit Tests / Circular dependency checks (push) Waiting to run
Backend Unit Tests / Tests: api (shard 1/3) (push) Blocked by required conditions
Backend Unit Tests / Tests: api (shard 2/3) (push) Blocked by required conditions
Backend Unit Tests / Tests: api (shard 3/3) (push) Blocked by required conditions
Backend Unit Tests / Tests: data-provider (push) Blocked by required conditions
Backend Unit Tests / Tests: data-schemas (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 1/4) (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 2/4) (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 3/4) (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 4/4) (push) Blocked by required conditions
Codegraph E2E Votes / vote (full suite) (push) Waiting to run
Docker Dev Branch Images Build / publish (push) Waiting to run
Frontend Unit Tests / Client build recovery regression (push) Waiting to run
Frontend Unit Tests / Codegraph select (push) Waiting to run
Frontend Unit Tests / Build packages (push) Waiting to run
Frontend Unit Tests / TypeScript type checks (client) (push) Blocked by required conditions
Frontend Unit Tests / Tests: @librechat/client (push) Blocked by required conditions
Frontend Unit Tests / Tests: Ubuntu (shard 1/2) (push) Blocked by required conditions
Frontend Unit Tests / Tests: Ubuntu (shard 2/2) (push) Blocked by required conditions
Frontend Unit Tests / Vite build verification (push) Blocked by required conditions
Sync Locize Translations & Create Translation PR / Sync Translation Keys with Locize (push) Waiting to run
Sync Locize Translations & Create Translation PR / Create Translation PR on Version Published (push) Blocked by required conditions
Some checks are pending
Backend Unit Tests / Build packages (push) Waiting to run
Backend Unit Tests / Codegraph select (push) Waiting to run
Backend Unit Tests / TypeScript type checks (push) Blocked by required conditions
Backend Unit Tests / Circular dependency checks (push) Waiting to run
Backend Unit Tests / Tests: api (shard 1/3) (push) Blocked by required conditions
Backend Unit Tests / Tests: api (shard 2/3) (push) Blocked by required conditions
Backend Unit Tests / Tests: api (shard 3/3) (push) Blocked by required conditions
Backend Unit Tests / Tests: data-provider (push) Blocked by required conditions
Backend Unit Tests / Tests: data-schemas (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 1/4) (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 2/4) (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 3/4) (push) Blocked by required conditions
Backend Unit Tests / Tests: @librechat/api (shard 4/4) (push) Blocked by required conditions
Codegraph E2E Votes / vote (full suite) (push) Waiting to run
Docker Dev Branch Images Build / publish (push) Waiting to run
Frontend Unit Tests / Client build recovery regression (push) Waiting to run
Frontend Unit Tests / Codegraph select (push) Waiting to run
Frontend Unit Tests / Build packages (push) Waiting to run
Frontend Unit Tests / TypeScript type checks (client) (push) Blocked by required conditions
Frontend Unit Tests / Tests: @librechat/client (push) Blocked by required conditions
Frontend Unit Tests / Tests: Ubuntu (shard 1/2) (push) Blocked by required conditions
Frontend Unit Tests / Tests: Ubuntu (shard 2/2) (push) Blocked by required conditions
Frontend Unit Tests / Vite build verification (push) Blocked by required conditions
Sync Locize Translations & Create Translation PR / Sync Translation Keys with Locize (push) Waiting to run
Sync Locize Translations & Create Translation PR / Create Translation PR on Version Published (push) Blocked by required conditions
* feat: Choose the conversation checkout mode * fix: Preserve checkout choices across submission and recovery * test: Match checkout policy defaults and share mode enum * fix: Offer shared checkout and require deliberate transition modes * fix: Retain explicit mode when changing repository selection * test: Match repository menu accessible labels
This commit is contained in:
parent
bb0543fd15
commit
35a2bee409
20 changed files with 888 additions and 66 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { nanoid } from 'nanoid';
|
||||
import { EModelEndpoint } from 'librechat-data-provider';
|
||||
import { logger, type AppConfig } from '@librechat/data-schemas';
|
||||
import { EModelEndpoint, isCodeWorkspaceCheckoutAvailable } from 'librechat-data-provider';
|
||||
import type { CodeEnvironmentMode, CodeWorkspaceSelection } from 'librechat-data-provider';
|
||||
import type { Response } from 'express';
|
||||
import type {
|
||||
|
|
@ -363,9 +363,23 @@ export function createCodeEnvironmentHttpHandlers(deps: CodeEnvironmentHttpDeps)
|
|||
if (!current.workspaces || !current.operations) {
|
||||
throw new CodeWorkspaceSelectionError('unsupported');
|
||||
}
|
||||
if (!current.workspaces.some(({ id }) => id === selection.workspaceId)) {
|
||||
const workspace = current.workspaces.find(({ id }) => id === selection.workspaceId);
|
||||
if (workspace == null) {
|
||||
throw new CodeWorkspaceSelectionError('missing');
|
||||
}
|
||||
const configuration = policy.configurations.find(({ id }) => id === selection.environmentId);
|
||||
const effectiveEnvironment = configuration
|
||||
? configuredAttachedControlPlane(policy.effectiveConfig, configuration.controlPlaneId ?? '')
|
||||
: configuredControlPlane(policy.effectiveConfig, selection.environmentId);
|
||||
if (
|
||||
!isCodeWorkspaceCheckoutAvailable(
|
||||
selection,
|
||||
workspace,
|
||||
effectiveEnvironment?.configSchema?.workspaces?.allowCheckoutSelection === true,
|
||||
)
|
||||
) {
|
||||
throw new CodeWorkspaceSelectionError('unsupported');
|
||||
}
|
||||
if (
|
||||
previousWorkspaceId != null &&
|
||||
previousWorkspaceId !== selection.workspaceId &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue