Skip to content

Commit

Permalink
feat: force disable thread message toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
pnd280 committed Nov 19, 2024
1 parent 4f544b3 commit 550de4d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 16 deletions.
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.12",
"version": "0.0.5.13",
"author": "pnd280",
"description": "⚡ Supercharge your Perplexity AI",
"type": "module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,11 @@ import UiUtils from "@/utils/UiUtils";

export default function LanguageModelSelector() {
const limit = useQueryBoxStore((state) => state.queryLimit);
const opusLimit = useQueryBoxStore((state) => state.opusLimit);
const o1Limit = useQueryBoxStore((state) => state.o1Limit);

const getModelLimit = useCallback(
(model: LanguageModel) => {
switch (model.code) {
case "claude3opus":
return opusLimit;
case "o1":
return o1Limit;
case "turbo":
Expand All @@ -41,7 +38,7 @@ export default function LanguageModelSelector() {
return limit;
}
},
[limit, opusLimit, o1Limit],
[limit, o1Limit],
);

const [modelsLimits, setModelsLimits] = useImmer<
Expand All @@ -61,7 +58,7 @@ export default function LanguageModelSelector() {
draft[model.code] = getModelLimit(model);
});
});
}, [limit, opusLimit, o1Limit, getModelLimit, setModelsLimits]);
}, [limit, o1Limit, getModelLimit, setModelsLimits]);

return (
<Select
Expand Down
11 changes: 1 addition & 10 deletions src/content-script/components/QueryBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,14 @@ import {
LuPencil,
} from "react-icons/lu";
import { PiGlobe } from "react-icons/pi";
import {
SiAnthropic,
SiGooglegemini,
SiPerplexity,
SiYoutube,
} from "react-icons/si";
import { SiAnthropic, SiPerplexity, SiYoutube } from "react-icons/si";

import {
imageModels,
languageModels,
focusModes,
} from "@/content-script/components/QueryBox/consts";
import BlackForestLabs from "@/shared/components/icons/BlackForestLabsIcon";
import MistralAiIcon from "@/shared/components/icons/MistralAiIcon";
import PlaygroundAiIcon from "@/shared/components/icons/PlaygroundAiIcon";
import StabilityAiIcon from "@/shared/components/icons/StabilityAiIcon";
import XAiIcon from "@/shared/components/icons/xAi";
Expand All @@ -36,16 +30,13 @@ type GroupedLanguageModelsByProvider = [
export const languageModelIcons: Record<LanguageModel["code"], ReactNode> = {
claude2: <SiAnthropic />,
claude35haiku: <SiAnthropic />,
claude3opus: <SiAnthropic />,
o1: <AiOutlineOpenAI />,
gpt4o: <AiOutlineOpenAI />,
gpt4: <AiOutlineOpenAI />,
grok: <XAiIcon />,
llama_x_large: <SiPerplexity />,
experimental: <SiPerplexity />,
turbo: <SiPerplexity />,
mistral: <MistralAiIcon />,
gemini: <SiGooglegemini />,
};

export const groupedLanguageModelsByProvider: GroupedLanguageModelsByProvider =
Expand Down
4 changes: 4 additions & 0 deletions src/cplx-user-settings/CplxUserSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ export default class CplxUserSettings {
static async fetch() {
CplxUserSettings.userSettings = await ChromeStorage.getStore();

// TODO: remove this;
CplxUserSettings.userSettings.generalSettings.qolTweaks.threadMessageStickyToolbar =
false;

return CplxUserSettings.userSettings;
}

Expand Down

0 comments on commit 550de4d

Please sign in to comment.