mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-26 10:55:27 +00:00
feat(sidebar): make whole header row clickable and fix database sortIndex generation
This commit is contained in:
@@ -921,7 +921,10 @@ export async function executeAgentToolActivity(params: ExecuteAgentToolParams):
|
||||
|
||||
// Generate sort index for new version inside the stack (newest gets the lowest sortIndex)
|
||||
const firstChild = await prisma.asset.findFirst({
|
||||
where: { parentId: stackId },
|
||||
where: {
|
||||
parentId: stackId,
|
||||
NOT: { id: newFile.id },
|
||||
},
|
||||
orderBy: { sortIndex: 'asc' },
|
||||
})
|
||||
const newSortIndex = generateKeyBetween(null, firstChild?.sortIndex || null)
|
||||
|
||||
Reference in New Issue
Block a user