Skip to content

TagSpaces is an offline, open source, document manager with tagging support

fix open file on last opened tab is AI and create new file

sytolk40524f315745
diff --git a/src/renderer/perspectives/common/CellView.tsx b/src/renderer/perspectives/common/CellView.tsx
index 2659efc3e..5a7b1a1b9 100644
--- a/src/renderer/perspectives/common/CellView.tsx
+++ b/src/renderer/perspectives/common/CellView.tsx
@@ -247,7 +247,11 @@ function CellView(props: Props) {
setSelectedEntries([fsEntry]);
if (fsEntry.isFile) {
if (singleClickAction === 'openInternal') {
- if (!openedEntry || selectedTabName !== TabNames.aiTab) {
+ if (
+ !openedEntry ||
+ openedEntry.isFile ||
+ selectedTabName !== TabNames.aiTab
+ ) {
// dont open file if chat mode is enabled
openEntryInternal(fsEntry);
}