Feat: Display agent history versions #3221 (#8942)

### What problem does this PR solve?

Feat: Display agent history versions #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-07-21 16:28:06 +08:00
committed by GitHub
parent c783d90ba3
commit 7eb5ea3814
6 changed files with 187 additions and 3 deletions

View File

@ -38,6 +38,7 @@ import {
import { useShowEmbedModal } from './hooks/use-show-dialog';
import { BeginQuery } from './interface';
import { UploadAgentDialog } from './upload-agent-dialog';
import { VersionDialog } from './version-dialog';
function AgentDropdownMenuItem({
children,
@ -79,6 +80,11 @@ export default function Agent() {
handleRun();
}
}, [getBeginNodeDataQuery, handleRun, showChatDrawer]);
const {
visible: versionDialogVisible,
hideModal: hideVersionDialog,
showModal: showVersionDialog,
} = useSetModalState();
const { showEmbedModal, hideEmbedModal, embedVisible, beta } =
useShowEmbedModal();
@ -98,7 +104,7 @@ export default function Agent() {
<CirclePlay />
Run app
</Button>
<Button variant={'secondary'}>
<Button variant={'secondary'} onClick={showVersionDialog}>
<History />
History version
</Button>
@ -159,6 +165,9 @@ export default function Agent() {
isAgent
></EmbedDialog>
)}
{versionDialogVisible && (
<VersionDialog hideModal={hideVersionDialog}></VersionDialog>
)}
</section>
);
}