fluxy-bot 0.3.22 → 0.3.25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxy-bot",
3
- "version": "0.3.22",
3
+ "version": "0.3.25",
4
4
  "description": "Self-hosted AI bot — run your own AI assistant from anywhere",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -362,6 +362,18 @@ export async function startSupervisor() {
362
362
  if (freshConfig.ai.provider === 'anthropic') {
363
363
  // Server-side persistence: create or reuse DB conversation, save user message
364
364
  (async () => {
365
+ // Save attachments to disk (before try so it's accessible in startFluxyAgentQuery below)
366
+ let savedFiles: SavedFile[] = [];
367
+ if (data.attachments?.length) {
368
+ for (const att of data.attachments) {
369
+ try {
370
+ savedFiles.push(saveAttachment(att));
371
+ } catch (err: any) {
372
+ log.warn(`[fluxy] File save error: ${err.message}`);
373
+ }
374
+ }
375
+ }
376
+
365
377
  try {
366
378
  // Check if we have an existing conversation for this client
367
379
  let dbConvId = clientConvs.get(ws);
@@ -384,18 +396,6 @@ export async function startSupervisor() {
384
396
  }
385
397
  convId = dbConvId!;
386
398
 
387
- // Save attachments to disk
388
- let savedFiles: SavedFile[] = [];
389
- if (data.attachments?.length) {
390
- for (const att of data.attachments) {
391
- try {
392
- savedFiles.push(saveAttachment(att));
393
- } catch (err: any) {
394
- log.warn(`[fluxy] File save error: ${err.message}`);
395
- }
396
- }
397
- }
398
-
399
399
  // Save user message to DB (include attachment metadata)
400
400
  const meta: any = { model: freshConfig.ai.model };
401
401
  if (savedFiles.length) {