Skip to content

Commit

Permalink
Merge pull request #606 from lixinghua123/alpha-lxh
Browse files Browse the repository at this point in the history
fix: LLMMultiWheel tool page turning data is disordered
  • Loading branch information
lihqi authored Oct 30, 2024
2 parents f3b2f3e + 66ae695 commit 8265350
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,12 @@ const LLMMultiWheelToolSidebar = (props: IProps) => {
const data = getRenderDataByResult(LLMConfig, {
...item,
answerList: item?.answerList?.map((answer: any, index: number) => {
setNewAnswerListMap({
...newAnswerListMap,
[`${item.id}-${answer.id}`]: answer.answer,
});
if (LLMConfig?.isTextEdit) {
setNewAnswerListMap({
...newAnswerListMap,
[`${item.id}-${answer.id}`]: answer.answer,
});
}
return {
...answer,
order: index + 1,
Expand Down Expand Up @@ -249,7 +251,7 @@ const LLMMultiWheelToolSidebar = (props: IProps) => {
const newList = answerList?.map((i: IAnswerList) => {
if (i?.order === order) {
// text edit
if (key === 'textEdit' && isString(value)) {
if (key === 'textEdit' && isString(value) && isTextEdit) {
setNewAnswerListMap({
...newAnswerListMap,
[`${selectedID}-${i?.id ?? ''}`]: value,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const LLMMultiWheelLayout: React.FC<AppProps & IProps> = (props) => {
defaultSize={{
width: 600,
}}
maxWidth='95%'
enable={{ left: true }}
>
<Sider
Expand Down

0 comments on commit 8265350

Please sign in to comment.