Ai histories (#1376)

* perf: workflow node ui

* i18n

* rename controller

* fix: zindex

* fix: leave page callback

* revert button
This commit is contained in:
Archer
2024-05-07 13:32:01 +08:00
committed by GitHub
parent eef609a063
commit 9e192c6d11
13 changed files with 116 additions and 111 deletions

View File

@@ -47,7 +47,7 @@ export const filterToolNodeIdByEdges = ({
export const getHistories = (history?: ChatItemType[] | number, histories: ChatItemType[] = []) => {
if (!history) return [];
if (typeof history === 'number') return histories.slice(-history);
if (typeof history === 'number') return histories.slice(-(history * 2));
if (Array.isArray(history)) return history;
return [];