Skip to content

Commit

Permalink
fix: collection query focus mode
Browse files Browse the repository at this point in the history
  • Loading branch information
pnd280 committed Nov 12, 2024
1 parent ac24086 commit 79ebddb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
6 changes: 6 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ Consider giving a star ⭐ on [Github](https://github.com/pnd280/complexity).

**EXPERIMENTAL** features are subjected to change/removal without prior notice.

## v0.0.5.10

_Release date: 12th Nov, 2024_

- **FIX**: Fixed a bug where the "Space & Focus" selectors causing Space's thread to not search for file(s) in writing mode.

## v0.0.5.8

_Release date: 8th Nov, 2024_
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "complexity",
"displayName": "Complexity - Perplexity AI Supercharged",
"version": "0.0.5.9",
"version": "0.0.5.10",
"author": "pnd280",
"description": "⚡ Supercharge your Perplexity AI",
"type": "module",
Expand Down
13 changes: 8 additions & 5 deletions src/content-script/main-world/WebpageMessageInterceptors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@ export default class WebpageMessageInterceptor {
const includeOrgFiles =
mainQueryBoxStore.getState().includeOrgFiles;

if (
querySource === "collection" &&
!["writing", "internet"].includes(newSearchFocus)
) {
newSearchFocus = "internet";
}

if (includeOrgFiles) {
newSources ??= [];
newSources.push("org");
Expand All @@ -185,11 +192,7 @@ export default class WebpageMessageInterceptor {
if (newSearchFocus === "writing") newSearchFocus = "internet";
}

if (
selectedSpaceUuid &&
includeSpaceFiles &&
querySource !== "collection"
) {
if (selectedSpaceUuid && includeSpaceFiles) {
const currentSpaceFiles =
queryClient.getQueryData<SpaceFilesApiResponse>([
"space-files",
Expand Down

0 comments on commit 79ebddb

Please sign in to comment.