This commit is contained in:
seb
2026-10-28 00:08:45 +01:00
parent fab291f68e
commit 96d0ae6742
88 changed files with 3871 additions and 5334 deletions

View File

@@ -40,7 +40,7 @@ import { setting as settingApi } from '../../api';
import chatAutomat, {
selectPendingAskUser,
} from '../../automats/chatAutomat';
import userSettingsAutomat from '../../automats/userSettingsAutomat';
import companyAutomat from '../../automats/companyAutomat';
import vfsAutomat from '../../automats/vfsAutomat';
import { VfsEditorPanel, VfsFileIcon } from '../vfs';
import ChatFlowList from './ChatFlowList';
@@ -130,7 +130,7 @@ export default class ChatDrawer extends PureComponent {
constructor(props) {
super(props);
const s = chatAutomat.state;
const settings = userSettingsAutomat.state;
const settings = companyAutomat.state;
const vfs = vfsAutomat.state;
this.state = {
isOpen: s.isOpen,
@@ -293,12 +293,12 @@ export default class ChatDrawer extends PureComponent {
return patch;
});
this.unsubSettings = userSettingsAutomat.subscribe(this, (state) => {
this.unsubSettings = companyAutomat.subscribe(this, (state) => {
if (!this.state.isResizing) {
return { drawerWidth: state.chatDrawerWidth || DEFAULT_DRAWER_WIDTH };
}
return null;
});
}, ['chatDrawerWidth']);
this.unsubVfs = vfsAutomat.subscribe(this, (state) => ({
isVfsOpen: state.isOpen,
@@ -465,7 +465,7 @@ export default class ChatDrawer extends PureComponent {
this.setState({ isResizing: false });
vfsAutomat.actions.setVfsWidth(currentVfsWidth);
userSettingsAutomat.actions.setChatDrawerWidth(currentChatWidth);
companyAutomat.actions.setChatDrawerWidth(currentChatWidth);
};
window.addEventListener('pointermove', onMove, { passive: false });
@@ -531,7 +531,7 @@ export default class ChatDrawer extends PureComponent {
if (isVfs) {
vfsAutomat.actions.setVfsWidth(currentVfsWidth);
} else {
userSettingsAutomat.actions.setChatDrawerWidth(currentChatWidth);
companyAutomat.actions.setChatDrawerWidth(currentChatWidth);
}
};
@@ -546,7 +546,7 @@ export default class ChatDrawer extends PureComponent {
handleResizeDoubleClick = () => {
this.setState({ drawerWidth: DEFAULT_DRAWER_WIDTH });
userSettingsAutomat.actions.setChatDrawerWidth(DEFAULT_DRAWER_WIDTH);
companyAutomat.actions.setChatDrawerWidth(DEFAULT_DRAWER_WIDTH);
};
cleanupResizeListeners = () => {