🚚 feat: Route Attachments and Provision Tools Lazily (#15763)

This commit is contained in:
Danny Avila 2026-09-08 23:28:52 -04:00 • committed by GitHub
parent e6376f6df4
commit ec15075dc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
112 changed files with 12570 additions and 478 deletions

View file

@ -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 });