export/import prompts, agents and mcp servers#3
Conversation
…obably not have made the error myself or not...
🚨 BugBot couldn't runSomething went wrong. Try again by commenting "bugbot run", or contact support (requestId: serverGenReqId_fe93b685-c5ca-4eeb-9371-60a7c804ac68). |
|
bugbot run |
There was a problem hiding this comment.
Bug: Data Import Deletion Fails for Unidentified Records
During data import, the deletion logic for prompt templates, agents, and tasks incorrectly generates a new random ID using nanoid() for any existing records that lack an ID. These newly generated random IDs are then used in the deletion query, causing the deletion to silently fail for records without IDs, as the random IDs do not match any existing database entries.
src/services/persistence.service.ts#L613-L637
LiteChat/src/services/persistence.service.ts
Lines 613 to 637 in e5a78f2
Bug: Import Fails to Clear Existing Records
When importing agents and tasks (stored as prompt templates), the pre-import clear logic generates new random IDs with nanoid() for items in the import data that lack an id. These generated IDs do not match existing database records, causing the db.promptTemplates.where("id").anyOf(idsToDelete).delete() operation to silently fail to clear existing agents and tasks without IDs.
src/services/persistence.service.ts#L628-L632
LiteChat/src/services/persistence.service.ts
Lines 628 to 632 in e5a78f2
Was this report helpful? Give feedback by reacting with 👍 or 👎
|
I do not want to delete all existing stuff withoud ID, if any they probably come from user messing around with the indexeDB. |
No description provided.