mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-22 20:37:48 +00:00
feat: undo-redo & edit snapshots (#2436)
* feat: undo-redo & edit snapshots * fix merge * add simple history back * fix some undo * change app latest version * fix * chatconfig * fix snapshot * fix * fix * fix * fix compare * fix initial * fix merge: * fix useEffect * fix snapshot initial and saved state * chore * fix * compare snapshot * nodes edges useEffct * fix chatconfig * fix * delete unused method * fix * fix * fix * default version name
This commit is contained in:
@@ -48,7 +48,8 @@ export const beforeUpdateAppFormat = <T extends AppSchema['modules'] | undefined
|
||||
|
||||
export const getAppLatestVersion = async (appId: string, app?: AppSchema) => {
|
||||
const version = await MongoAppVersion.findOne({
|
||||
appId
|
||||
appId,
|
||||
isPublish: true
|
||||
}).sort({
|
||||
time: -1
|
||||
});
|
||||
|
@@ -25,6 +25,16 @@ const AppVersionSchema = new Schema({
|
||||
},
|
||||
chatConfig: {
|
||||
type: chatConfigType
|
||||
},
|
||||
isPublish: {
|
||||
type: Boolean
|
||||
},
|
||||
versionName: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
tmbId: {
|
||||
type: String
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user