mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-08-27 04:07:05 +00:00
fix: pass entity_id on multi-skill batch upload, consistent identifier format
This commit is contained in:
parent
c2e24eaf26
commit
c85ce2161e
1 changed files with 5 additions and 4 deletions
|
|
@ -368,10 +368,14 @@ export async function primeInvokedSkills(
|
|||
|
||||
if (allFileStreams.length > 0) {
|
||||
try {
|
||||
// Use first skill's ID as entity_id — scopes the shared session to a
|
||||
// stable key so freshness checks with ?entity_id= pass session auth.
|
||||
const batchEntityId = skillsWithFiles[0]._id.toString();
|
||||
const result = await deps.batchUploadCodeEnvFiles({
|
||||
req: deps.req,
|
||||
files: allFileStreams,
|
||||
apiKey,
|
||||
entity_id: batchEntityId,
|
||||
});
|
||||
|
||||
sessions = new Map();
|
||||
|
|
@ -399,13 +403,10 @@ export async function primeInvokedSkills(
|
|||
`[primeInvokedSkills] No skill record found for filename "${f.filename}"`,
|
||||
);
|
||||
}
|
||||
const entityId = record?.skill._id?.toString() ?? '';
|
||||
return {
|
||||
skillId: record?.skill._id ?? '',
|
||||
relativePath: relPath,
|
||||
codeEnvIdentifier: entityId
|
||||
? `${result.session_id}/${f.fileId}?entity_id=${entityId}`
|
||||
: `${result.session_id}/${f.fileId}`,
|
||||
codeEnvIdentifier: `${result.session_id}/${f.fileId}?entity_id=${batchEntityId}`,
|
||||
};
|
||||
})
|
||||
.filter((u) => u.skillId !== '');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue