mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-21 23:43:35 +00:00
🧶 feat: Thread Conversation Code Approval Through Requests (#15698)
This commit is contained in:
parent
a3fc3b9dbf
commit
3f27726e10
3 changed files with 9 additions and 0 deletions
|
|
@ -24,6 +24,7 @@ export default function createPayload(submission: t.TSubmission) {
|
|||
ephemeralAgent,
|
||||
endpointOption,
|
||||
manualSkills,
|
||||
codeApprovalMode,
|
||||
clientRequestId,
|
||||
recoverySteerId,
|
||||
expectedPredecessorCreatedAt,
|
||||
|
|
@ -56,6 +57,7 @@ export default function createPayload(submission: t.TSubmission) {
|
|||
isContinued: !!(isEdited && isContinued),
|
||||
ephemeralAgent: s.isAssistantsEndpoint(endpoint) ? undefined : ephemeralAgent,
|
||||
manualSkills: s.isAssistantsEndpoint(endpoint) ? undefined : manualSkills,
|
||||
codeApprovalMode: s.isAssistantsEndpoint(endpoint) ? undefined : codeApprovalMode,
|
||||
timezone: getUserTimezone(),
|
||||
clientRequestId,
|
||||
recoverySteerId,
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import type { SearchResultData } from './types/web';
|
|||
import type { TFile } from './types/files';
|
||||
import { userSubmittedMessageFieldPathSchema } from './filters';
|
||||
import { TFeedback, feedbackSchema } from './feedback';
|
||||
import { CODE_APPROVAL_MODES } from './code/approval';
|
||||
import { Tools } from './types/assistants';
|
||||
|
||||
export const isUUID = z.string().uuid();
|
||||
|
|
@ -1080,6 +1081,7 @@ export const tConversationSchema = z.object({
|
|||
pinned: z.boolean().optional(),
|
||||
/** Server-derived: an active shared link exists for this conversation. Not persisted. */
|
||||
isShared: z.boolean().optional(),
|
||||
codeApprovalMode: z.enum(CODE_APPROVAL_MODES).optional(),
|
||||
title: z.string().nullable().or(z.literal('New Chat')).default('New Chat'),
|
||||
user: z.string().optional(),
|
||||
messages: z.array(z.string()).optional(),
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import type {
|
|||
} from './schemas';
|
||||
import type { CodeEnvironmentUserConfigSchema, CodeEnvironmentUserSettings } from './config';
|
||||
import type { Agent, EToolResources, StatefulCodeEnvironment } from './types/assistants';
|
||||
import type { CodeApprovalMode } from './code/approval';
|
||||
import type { RefillIntervalUnit } from './balance';
|
||||
import type { SettingDefinition } from './generate';
|
||||
import type { TMinimalFeedback } from './feedback';
|
||||
|
|
@ -146,6 +147,8 @@ export type TPayload = Partial<TMessage> &
|
|||
* before the LLM turn runs.
|
||||
*/
|
||||
manualSkills?: string[];
|
||||
/** Conversation-scoped preference for code tool approval behavior. */
|
||||
codeApprovalMode?: CodeApprovalMode;
|
||||
/** Browser IANA timezone (e.g. `America/New_York`) used to resolve local-time prompt variables server-side. */
|
||||
timezone?: string;
|
||||
/**
|
||||
|
|
@ -222,6 +225,8 @@ export type TSubmission = {
|
|||
addedConvo?: TConversation;
|
||||
/** Skills the user invoked via the `$` popover for this submission. */
|
||||
manualSkills?: string[];
|
||||
/** Conversation-scoped preference for code tool approval behavior. */
|
||||
codeApprovalMode?: CodeApprovalMode;
|
||||
/** Stable per-submission idempotency key (uuid) forwarded to the server to dedup retried start-generation requests. */
|
||||
clientRequestId?: string;
|
||||
/** Client-only carry-through for a receipt-bound queued recovery. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue