Skip to content

Commit

Permalink
🐛 fix: agent viewer not resize with parent
Browse files Browse the repository at this point in the history
  • Loading branch information
rdmclin2 committed May 25, 2024
1 parent 9322787 commit 5090d9c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/Error/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const ErrorCapture = memo<ErrorCaptureProps>(({ reset, error }) => {
项目当前正在施工中,不保证数据稳定性,如果遇到问题可以尝试
<ClearChat text="清除会话消息" type={'link'} />
<ResetConfig text="重置系统设置" type={'link'} />
造成地不便敬请谅解
造成不便敬请谅解
</p>
<Flexbox gap={12} horizontal style={{ marginBottom: '1em' }}>
<Button onClick={() => reset()}>重新加载</Button>
Expand Down
2 changes: 0 additions & 2 deletions src/features/ChatItem/Actions/Assistant.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ const AssistantActionsBar: RenderAction = ({ onActionClick, id }) => {
regenerate: '重新生成',
});

console.log('AssistantActionsBar', id);

if (id === 'default') return;

const tts = {
Expand Down
6 changes: 4 additions & 2 deletions src/features/vrmViewer/viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,12 @@ export class Viewer {
this._cameraControls?.target.set(0, 0, 0);
this._cameraControls.update();

window.addEventListener('resize', () => {
this.resize();
const resizeObserver = new ResizeObserver(() => {
setTimeout(() => this.resize(), 0);
});

resizeObserver.observe(parentElement!);

this.isReady = true;
this.update();
}
Expand Down
2 changes: 1 addition & 1 deletion src/layout/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Header = (props: Props) => {
<Link href="/" style={{ color: 'inherit' }}>
<Logo extra={'Lobe Vidol'} size={36} />
</Link>
<Tooltip title="项目当前正在施工中,不保证数据稳定性,如果遇到问题可以在系统设置中清除会话消息与重置系统设置,造成地不便敬请谅解">
<Tooltip title="项目当前正在施工中,不保证数据稳定性,如果遇到问题可以在系统设置中清除会话消息与重置系统设置,造成不便敬请谅解">
<Tag color="yellow">WIP</Tag>
</Tooltip>
</Space>
Expand Down

0 comments on commit 5090d9c

Please sign in to comment.