Skip to content

Commit

Permalink
feat: disable ossGpt by default (#907)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyantong2000 authored Nov 9, 2024
1 parent dec09ba commit 43bc47c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/options-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ export const defaults = Object.assign(
{
locale: 'en',
},
Object.fromEntries(importedFeatures.map((name) => [`hypercrx-${name}` as FeatureId, true]))
Object.fromEntries(
importedFeatures.map((name) => [
`hypercrx-${name}` as FeatureId,
name === 'oss-gpt' ? false : true, // Set oss gpt to not be enabled by default
])
)
);

class OptionsStorage {
Expand Down
2 changes: 0 additions & 2 deletions src/pages/Options/Options.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,13 @@ const stacksStyleOptions = {
const Options = (): JSX.Element => {
const [version, setVersion] = useState<string>();
const [options, setOptions] = useState<HypercrxOptions>();

const { t, i18n } = useTranslation();
useEffect(() => {
(async function () {
setVersion((await chrome.management.getSelf()).version);
setOptions(await optionsStorage.getAll());
})();
}, []);

if (!version || !options) {
return <div />;
}
Expand Down

0 comments on commit 43bc47c

Please sign in to comment.