u
This commit is contained in:
@@ -26,7 +26,6 @@ import ChatFlowList from './ChatFlowList';
|
||||
import AskUserPrompt from './AskUserPrompt';
|
||||
import { ACCEPT_STRING, readFileAttachment } from './chatAttachments';
|
||||
import { ChatStagedAttachmentsTray } from './ChatAttachmentItems';
|
||||
import ChatAttachmentPreviewModal from './ChatAttachmentPreviewModal';
|
||||
import {
|
||||
BLUE_GLOW,
|
||||
SHADOW_DRAWER,
|
||||
@@ -61,7 +60,6 @@ export default class ChatDrawer extends PureComponent {
|
||||
isProcessingFiles: false,
|
||||
isDraggingFiles: false,
|
||||
attachmentError: null,
|
||||
previewAttachment: null,
|
||||
drawerWidth: settings?.chatDrawerWidth || DEFAULT_DRAWER_WIDTH,
|
||||
isResizing: false,
|
||||
};
|
||||
@@ -273,14 +271,6 @@ export default class ChatDrawer extends PureComponent {
|
||||
}));
|
||||
};
|
||||
|
||||
handlePreviewAttachment = (attachment) => {
|
||||
this.setState({ previewAttachment: attachment });
|
||||
};
|
||||
|
||||
handleClosePreview = () => {
|
||||
this.setState({ previewAttachment: null });
|
||||
};
|
||||
|
||||
handlePaste = (e) => {
|
||||
const items = e.clipboardData?.items;
|
||||
if (!items || items.length === 0) return;
|
||||
@@ -571,7 +561,6 @@ export default class ChatDrawer extends PureComponent {
|
||||
isProcessingFiles,
|
||||
isDraggingFiles,
|
||||
attachmentError,
|
||||
previewAttachment,
|
||||
} = this.state;
|
||||
|
||||
const pendingAsk = this.getPendingAskUser();
|
||||
@@ -652,7 +641,6 @@ export default class ChatDrawer extends PureComponent {
|
||||
<ChatStagedAttachmentsTray
|
||||
attachments={stagedAttachments}
|
||||
onRemove={this.handleRemoveAttachment}
|
||||
onPreview={this.handlePreviewAttachment}
|
||||
/>
|
||||
|
||||
{isProcessingFiles && (
|
||||
@@ -775,13 +763,6 @@ export default class ChatDrawer extends PureComponent {
|
||||
)}
|
||||
</IconButton>
|
||||
</Box>
|
||||
|
||||
{/* Modal for previewing staged attachments */}
|
||||
<ChatAttachmentPreviewModal
|
||||
open={Boolean(previewAttachment)}
|
||||
attachment={previewAttachment}
|
||||
onClose={this.handleClosePreview}
|
||||
/>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user