@aj-archipelago/cortex 1.4.29 → 1.4.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/fileUtils.js CHANGED
@@ -266,7 +266,7 @@ async function getMediaChunks(file, requestId, contextId = null) {
266
266
  requestId,
267
267
  ...(contextId ? { contextId } : {})
268
268
  });
269
- const res = await axios.get(url, { timeout: 30000 });
269
+ const res = await axios.get(url, { timeout: 600000 });
270
270
  return res.data;
271
271
  } else {
272
272
  logger.info(`No API_URL set, returning file as chunk`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aj-archipelago/cortex",
3
- "version": "1.4.29",
3
+ "version": "1.4.30",
4
4
  "description": "Cortex is a GraphQL API for AI. It provides a simple, extensible interface for using AI services from OpenAI, Azure and others.",
5
5
  "private": false,
6
6
  "repository": {
@@ -3,7 +3,7 @@
3
3
  // Uses Redis hash maps (FileStoreMap:ctx:<contextId>) for storage
4
4
  // Supports atomic rename/tag/notes updates via UpdateFileMetadata
5
5
  import logger from '../../../../lib/logger.js';
6
- import { addFileToCollection, loadFileCollection, loadMergedFileCollection, findFileInCollection, deleteFileByHash, updateFileMetadata, invalidateFileCollectionCache } from '../../../../lib/fileUtils.js';
6
+ import { addFileToCollection, loadFileCollection, loadFileCollectionAll, loadMergedFileCollection, findFileInCollection, deleteFileByHash, updateFileMetadata, invalidateFileCollectionCache } from '../../../../lib/fileUtils.js';
7
7
 
8
8
  export default {
9
9
  prompt: [],
@@ -240,7 +240,9 @@ export default {
240
240
  }
241
241
 
242
242
  // Load collection and find the file
243
- const collection = await loadFileCollection(contextId, contextKey, false);
243
+ // Use loadFileCollectionAll to find files regardless of inCollection status
244
+ // This ensures files can be updated even if they're chat-specific
245
+ const collection = await loadFileCollectionAll(contextId, contextKey);
244
246
  const foundFile = findFileInCollection(file, collection);
245
247
 
246
248
  if (!foundFile) {