commit
35335ba6e7
5 changed files with 38 additions and 25 deletions
4
extensions/vscode/package-lock.json
generated
4
extensions/vscode/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "continue",
|
||||
"version": "0.9.258",
|
||||
"version": "0.9.259",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "continue",
|
||||
"version": "0.9.258",
|
||||
"version": "0.9.259",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@continuedev/fetch": "^1.0.3",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"name": "continue",
|
||||
"icon": "media/icon.png",
|
||||
"author": "Continue Dev, Inc",
|
||||
"version": "0.9.258",
|
||||
"version": "0.9.259",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/continuedev/continue"
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ const NumberInput: React.FC<NumberInputProps> = ({
|
|||
/>
|
||||
<div className="flex flex-col">
|
||||
<button
|
||||
style={{ fontSize: "10px" }}
|
||||
onClick={handleIncrement}
|
||||
disabled={value >= max}
|
||||
className="text-vsc-foreground m-0 mb-0.5 cursor-pointer border-none bg-inherit px-1.5 py-0 hover:opacity-80"
|
||||
|
|
@ -47,6 +48,7 @@ const NumberInput: React.FC<NumberInputProps> = ({
|
|||
▲
|
||||
</button>
|
||||
<button
|
||||
style={{ fontSize: "10px" }}
|
||||
className="text-vsc-foreground m-0 mb-0.5 cursor-pointer border-none bg-inherit px-1.5 py-0 hover:opacity-80"
|
||||
onClick={handleDecrement}
|
||||
disabled={value <= min}
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({
|
|||
[],
|
||||
);
|
||||
|
||||
const ideMessenger = useContext(IdeMessengerContext);
|
||||
|
||||
const selectedOrganizationId = useAppSelector(
|
||||
(store) => store.session.selectedOrganizationId,
|
||||
);
|
||||
|
|
@ -65,7 +67,6 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({
|
|||
return profiles.find((p) => p.id === selectedProfileId);
|
||||
}, [profiles, selectedProfileId]);
|
||||
|
||||
const ideMessenger = useContext(IdeMessengerContext);
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const login: AuthContextType["login"] = (useOnboarding: boolean) => {
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
import { useContext, useEffect, useState } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import PageHeader from "../../components/PageHeader";
|
||||
import { IdeMessengerContext } from "../../context/IdeMessenger";
|
||||
import { useNavigationListener } from "../../hooks/useNavigationListener";
|
||||
import PageHeader from "../../components/PageHeader";
|
||||
import { useAppDispatch, useAppSelector } from "../../redux/hooks";
|
||||
|
||||
import { updateConfig } from "../../redux/slices/configSlice";
|
||||
import ToggleSwitch from "../../components/gui/Switch";
|
||||
import { useAuth } from "../../context/Auth";
|
||||
import { Input, SecondaryButton } from "../../components";
|
||||
import { getFontSize } from "../../util";
|
||||
import { CheckIcon, XMarkIcon } from "@heroicons/react/24/outline";
|
||||
import { ScopeSelect } from "./ScopeSelect";
|
||||
import {
|
||||
SharedConfigSchema,
|
||||
modifyContinueConfigWithSharedConfig,
|
||||
} from "core/config/sharedConfig";
|
||||
import { Input, SecondaryButton } from "../../components";
|
||||
import NumberInput from "../../components/gui/NumberInput";
|
||||
import { Select } from "../../components/gui/Select";
|
||||
import ToggleSwitch from "../../components/gui/Switch";
|
||||
import { useAuth } from "../../context/Auth";
|
||||
import { updateConfig } from "../../redux/slices/configSlice";
|
||||
import { getFontSize } from "../../util";
|
||||
import { ScopeSelect } from "./ScopeSelect";
|
||||
|
||||
function ConfigPage() {
|
||||
useNavigationListener();
|
||||
|
|
@ -25,7 +25,7 @@ function ConfigPage() {
|
|||
const navigate = useNavigate();
|
||||
const ideMessenger = useContext(IdeMessengerContext);
|
||||
|
||||
const { selectedProfile, selectedOrganization } = useAuth();
|
||||
const { selectedProfile, selectedOrganization, session } = useAuth();
|
||||
const config = useAppSelector((state) => state.config.config);
|
||||
|
||||
function handleUpdate(sharedConfig: Partial<SharedConfigSchema>) {
|
||||
|
|
@ -52,6 +52,14 @@ function ConfigPage() {
|
|||
config.tabAutocompleteOptions?.multilineCompletions ?? "auto";
|
||||
const fontSize = getFontSize();
|
||||
|
||||
const [hubEnabled, setHubEnabled] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
ideMessenger.ide.getIdeSettings().then(({ continueTestEnvironment }) => {
|
||||
setHubEnabled(continueTestEnvironment === "production");
|
||||
});
|
||||
}, [ideMessenger]);
|
||||
|
||||
// Disable autocomplete
|
||||
const disableAutocompleteInFiles = (
|
||||
config.tabAutocompleteOptions?.disableInFiles ?? []
|
||||
|
|
@ -121,21 +129,23 @@ function ConfigPage() {
|
|||
<PageHeader onTitleClick={() => navigate("/")} title="Chat" />
|
||||
|
||||
<div className="divide-x-0 divide-y-2 divide-solid divide-zinc-700 px-4">
|
||||
<div className="flex flex-col gap-4 py-6">
|
||||
<div>
|
||||
<h2 className="mb-1 mt-0">Account</h2>
|
||||
{selectedOrganization?.name && (
|
||||
<span className="text-lightgray">
|
||||
You are currently signed in to{" "}
|
||||
<span className="font-semibold">
|
||||
{selectedOrganization?.name}
|
||||
{hubEnabled && !!session && (
|
||||
<div className="flex flex-col gap-4 py-6">
|
||||
<div>
|
||||
<h2 className="mb-1 mt-0">Account</h2>
|
||||
{selectedOrganization?.name && (
|
||||
<span className="text-lightgray">
|
||||
You are currently signed in to{" "}
|
||||
<span className="font-semibold">
|
||||
{selectedOrganization?.name}
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<ScopeSelect />
|
||||
</div>
|
||||
<ScopeSelect />
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="flex flex-col gap-4 py-6">
|
||||
<h2 className="mb-1 mt-0">Configuration</h2>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue