mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-18 05:52:10 +00:00
🚚 feat: Route Attachments and Provision Tools Lazily (#15763)
This commit is contained in:
parent
e6376f6df4
commit
ec15075dc8
112 changed files with 12570 additions and 478 deletions
|
|
@ -68,6 +68,20 @@ export function appendCodeEnvFileIdentity(form: FormData, identity: CodeEnvIdent
|
|||
*
|
||||
* Returns a string with leading `?`; concatenate onto a path.
|
||||
*/
|
||||
/**
|
||||
* The same `kind`/`id`/`version?` identity as an axios `params` object, for callers that
|
||||
* build their query that way rather than concatenating a string. Both forms exist so the
|
||||
* identity codeapi's `sessionAuth` needs is stated once.
|
||||
*/
|
||||
export function buildCodeEnvIdentityParams(identity: CodeEnvIdentity): Record<string, string> {
|
||||
validateIdentity(identity, 'buildCodeEnvIdentityParams');
|
||||
return {
|
||||
kind: identity.kind,
|
||||
id: identity.id,
|
||||
...(identity.version != null ? { version: String(identity.version) } : {}),
|
||||
};
|
||||
}
|
||||
|
||||
export function buildCodeEnvDownloadQuery(identity: CodeEnvIdentity): string {
|
||||
validateIdentity(identity, 'buildCodeEnvDownloadQuery');
|
||||
const params = new URLSearchParams({ kind: identity.kind, id: identity.id });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue