-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support ai layout renderer (#3490)
- Loading branch information
Showing
14 changed files
with
160 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import React from 'react'; | ||
|
||
import { SlotRenderer } from '@opensumi/ide-core-browser'; | ||
import { BoxPanel, SplitPanel, getStorageValue } from '@opensumi/ide-core-browser/lib/components'; | ||
|
||
import { AI_CHAT_VIEW_ID } from '../../common'; | ||
|
||
export const AILayout = () => { | ||
const { layout } = getStorageValue(); | ||
|
||
return ( | ||
<BoxPanel direction='top-to-bottom'> | ||
<SlotRenderer id='top' defaultSize={35} slot='top' z-index={2} /> | ||
<SplitPanel id='main-horizontal-ai' flex={1} direction={'left-to-right'} useDomSize={true}> | ||
<SplitPanel id='main-horizontal' flex={1} flexGrow={1} direction={'left-to-right'} useDomSize={true}> | ||
<SlotRenderer | ||
slot='left' | ||
isTabbar={true} | ||
defaultSize={layout.left?.currentId ? layout.left?.size || 310 : 49} | ||
minResize={280} | ||
maxResize={480} | ||
minSize={49} | ||
/> | ||
<SplitPanel id='main-vertical' minResize={300} flexGrow={1} direction='top-to-bottom'> | ||
<SlotRenderer flex={2} flexGrow={1} minResize={200} slot='main' /> | ||
<SlotRenderer flex={1} defaultSize={layout.bottom?.size} minResize={160} slot='bottom' isTabbar={true} /> | ||
</SplitPanel> | ||
<SlotRenderer slot='right' isTabbar={true} defaultSize={360} maxResize={360} minResize={280} minSize={0} /> | ||
</SplitPanel> | ||
<SlotRenderer | ||
slot={AI_CHAT_VIEW_ID} | ||
isTabbar={true} | ||
defaultSize={layout.AI_Chat?.currentId ? layout.AI_Chat?.size || 360 : 0} | ||
maxResize={420} | ||
minResize={280} | ||
minSize={0} | ||
/> | ||
</SplitPanel> | ||
<SlotRenderer id='statusbar' defaultSize={24} slot='statusBar' /> | ||
</BoxPanel> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
de9ce0f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Release Candidate Summary:
Released 🚀 2.27.3-rc-1712113547.0
user input ref: main