openConfigJson -> openConfig
This commit is contained in:
parent
d69f4d9c1e
commit
f5e63cffc7
14 changed files with 80 additions and 66 deletions
|
|
@ -29,7 +29,7 @@ export type ToIdeFromWebviewProtocol = ToIdeFromWebviewOrCoreProtocol & {
|
|||
];
|
||||
showTutorial: [undefined, void];
|
||||
showFile: [{ filepath: string }, void];
|
||||
openConfigJson: [undefined, void];
|
||||
openConfig: [undefined, void];
|
||||
toggleDevTools: [undefined, void];
|
||||
reloadWindow: [undefined, void];
|
||||
focusEditor: [undefined, void];
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ class ContinueBrowser(val project: Project, url: String) {
|
|||
}
|
||||
|
||||
"reloadWindow" -> {}
|
||||
"openConfigJson" -> {
|
||||
"openConfig" -> {
|
||||
ide?.setFileOpen(getConfigJsonPath())
|
||||
}
|
||||
|
||||
|
|
|
|||
4
extensions/vscode/package-lock.json
generated
4
extensions/vscode/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "continue",
|
||||
"version": "0.9.226",
|
||||
"version": "0.9.227",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "continue",
|
||||
"version": "0.9.226",
|
||||
"version": "0.9.227",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@electron/rebuild": "^3.2.10",
|
||||
|
|
|
|||
|
|
@ -219,9 +219,10 @@
|
|||
"group": "Continue"
|
||||
},
|
||||
{
|
||||
"command": "continue.openConfigJson",
|
||||
"command": "continue.openConfig",
|
||||
"category": "Continue",
|
||||
"title": "Open config.json",
|
||||
"title": "Open Continue Config",
|
||||
"icon": "$(gear)",
|
||||
"group": "Continue"
|
||||
},
|
||||
{
|
||||
|
|
@ -498,6 +499,11 @@
|
|||
"command": "continue.toggleFullScreen",
|
||||
"group": "navigation@3",
|
||||
"when": "view == continue.continueGUIView"
|
||||
},
|
||||
{
|
||||
"command": "continue.openConfig",
|
||||
"group": "navigation@4",
|
||||
"when": "view == continue.continueGUIView"
|
||||
}
|
||||
],
|
||||
"editor/title": [
|
||||
|
|
|
|||
|
|
@ -632,7 +632,7 @@ const commandsMap: (
|
|||
|
||||
vscode.commands.executeCommand("workbench.action.copyEditorToNewWindow");
|
||||
},
|
||||
"continue.openConfigJson": () => {
|
||||
"continue.openConfig": () => {
|
||||
ide.openFile(getConfigJsonPath());
|
||||
},
|
||||
"continue.selectFilesAsContext": async (
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ export class VsCodeMessenger {
|
|||
);
|
||||
});
|
||||
|
||||
this.onWebview("openConfigJson", (msg) => {
|
||||
this.onWebview("openConfig", (msg) => {
|
||||
this.ide.openFile(getConfigJsonPath());
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ function AddModelButtonSubtext() {
|
|||
This will update your{" "}
|
||||
<span
|
||||
className="cursor-pointer underline"
|
||||
onClick={() => ideMessenger.post("openConfigJson", undefined)}
|
||||
onClick={() => ideMessenger.post("openConfig", undefined)}
|
||||
>
|
||||
config file
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ function Footer() {
|
|||
|
||||
function onClickSettings() {
|
||||
if (selectedProfileId === "local") {
|
||||
ideMessenger.post("openConfigJson", undefined);
|
||||
ideMessenger.post("openConfig", undefined);
|
||||
} else {
|
||||
ideMessenger.post(
|
||||
"openUrl",
|
||||
|
|
@ -46,47 +46,59 @@ function Footer() {
|
|||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<footer className="flex h-7 items-center justify-between overflow-hidden border-0 border-t border-solid border-t-zinc-700 p-2">
|
||||
<div className="flex max-w-[40vw] gap-2">
|
||||
<ProfileSwitcher />
|
||||
{defaultModel?.provider === "free-trial" && (
|
||||
<FreeTrialProgressBar
|
||||
completed={parseInt(localStorage.getItem("ftc") || "0")}
|
||||
total={FREE_TRIAL_LIMIT_REQUESTS}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
if (defaultModel?.provider === "free-trial") {
|
||||
return (
|
||||
<footer className="flex flex-row border-0 border-t border-solid border-t-zinc-700 px-2 py-2">
|
||||
<FreeTrialProgressBar
|
||||
completed={parseInt(localStorage.getItem("ftc") || "0")}
|
||||
total={FREE_TRIAL_LIMIT_REQUESTS}
|
||||
/>
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
||||
<div className="flex gap-1">
|
||||
{configError && (
|
||||
<HeaderButtonWithToolTip
|
||||
tooltipPlacement="top-end"
|
||||
text="Config error"
|
||||
onClick={onClickError}
|
||||
>
|
||||
<ExclamationTriangleIcon className="h-4 w-4" />
|
||||
</HeaderButtonWithToolTip>
|
||||
)}
|
||||
// return (
|
||||
// <footer className="flex h-7 items-center justify-between overflow-hidden border-0 border-t border-solid border-t-zinc-700 p-2">
|
||||
// <div className="flex max-w-[40vw] gap-2">
|
||||
// <ProfileSwitcher />
|
||||
// {defaultModel?.provider === "free-trial" && (
|
||||
// <FreeTrialProgressBar
|
||||
// completed={parseInt(localStorage.getItem("ftc") || "0")}
|
||||
// total={FREE_TRIAL_LIMIT_REQUESTS}
|
||||
// />
|
||||
// )}
|
||||
// </div>
|
||||
|
||||
<HeaderButtonWithToolTip
|
||||
tooltipPlacement="top-end"
|
||||
text="More"
|
||||
onClick={onClickMore}
|
||||
>
|
||||
<EllipsisHorizontalCircleIcon className="h-4 w-4" />
|
||||
</HeaderButtonWithToolTip>
|
||||
// <div className="flex gap-1">
|
||||
// {configError && (
|
||||
// <HeaderButtonWithToolTip
|
||||
// tooltipPlacement="top-end"
|
||||
// text="Config error"
|
||||
// onClick={onClickError}
|
||||
// >
|
||||
// <ExclamationTriangleIcon className="h-4 w-4" />
|
||||
// </HeaderButtonWithToolTip>
|
||||
// )}
|
||||
|
||||
<HeaderButtonWithToolTip
|
||||
tooltipPlacement="top-end"
|
||||
onClick={onClickSettings}
|
||||
text="Configure Continue"
|
||||
>
|
||||
<Cog6ToothIcon className="h-4 w-4" />
|
||||
</HeaderButtonWithToolTip>
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
// <HeaderButtonWithToolTip
|
||||
// tooltipPlacement="top-end"
|
||||
// text="More"
|
||||
// onClick={onClickMore}
|
||||
// >
|
||||
// <EllipsisHorizontalCircleIcon className="h-4 w-4" />
|
||||
// </HeaderButtonWithToolTip>
|
||||
|
||||
// {/* <HeaderButtonWithToolTip
|
||||
// tooltipPlacement="top-end"
|
||||
// onClick={onClickSettings}
|
||||
// text="Configure Continue"
|
||||
// >
|
||||
// <Cog6ToothIcon className="h-4 w-4" />
|
||||
// </HeaderButtonWithToolTip> */}
|
||||
// </div>
|
||||
// </footer>
|
||||
// );
|
||||
}
|
||||
|
||||
export default Footer;
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ const Layout = () => {
|
|||
);
|
||||
|
||||
useWebviewListener("openSettings", async () => {
|
||||
ideMessenger.post("openConfigJson", undefined);
|
||||
ideMessenger.post("openConfig", undefined);
|
||||
});
|
||||
|
||||
useWebviewListener(
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ function FreeTrialProgressBar({ completed, total }: FreeTrialProgressBarProps) {
|
|||
return (
|
||||
<>
|
||||
<div
|
||||
className="flex cursor-default items-center gap-1"
|
||||
className="flex flex-1 cursor-default select-none items-center justify-center gap-1"
|
||||
data-tooltip-id="usage_progress_bar"
|
||||
>
|
||||
<ExclamationCircleIcon width="18px" height="18px" color="red" />
|
||||
|
|
@ -54,21 +54,14 @@ function FreeTrialProgressBar({ completed, total }: FreeTrialProgressBarProps) {
|
|||
return (
|
||||
<>
|
||||
<div
|
||||
className="flex cursor-pointer flex-col text-[10px] text-gray-400"
|
||||
className="flex flex-1 cursor-pointer flex-row items-center gap-2 text-[10px] text-gray-400 sm:gap-3"
|
||||
data-tooltip-id="usage_progress_bar"
|
||||
onClick={onClick}
|
||||
>
|
||||
<div className="xs:flex mb-0 hidden justify-between">
|
||||
<span>
|
||||
Free trial <span className="hidden sm:inline">requests</span>
|
||||
</span>
|
||||
|
||||
<span>
|
||||
{completed} / {total}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div className="my-1.5 flex h-1.5 w-[40vw] rounded-md border border-solid border-gray-400">
|
||||
<span>
|
||||
Free trial <span className="hidden sm:inline">requests</span>
|
||||
</span>
|
||||
<div className="flex h-1.5 flex-1 rounded-md border border-solid border-gray-400">
|
||||
<div
|
||||
className={`h-full rounded-lg transition-all duration-200 ease-in-out ${
|
||||
completed / total > 0.75 ? "bg-amber-500" : "bg-stone-500"
|
||||
|
|
@ -78,6 +71,9 @@ function FreeTrialProgressBar({ completed, total }: FreeTrialProgressBarProps) {
|
|||
}}
|
||||
/>
|
||||
</div>
|
||||
<span>
|
||||
{completed} / {total}
|
||||
</span>
|
||||
</div>
|
||||
<ToolTip id="usage_progress_bar" place="top">
|
||||
{`Click to use your own API key or local LLM (required after ${FREE_TRIAL_LIMIT_REQUESTS} inputs)`}
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ function ModelOption({
|
|||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
|
||||
ideMessenger.post("openConfigJson", undefined);
|
||||
ideMessenger.post("openConfig", undefined);
|
||||
}
|
||||
|
||||
function handleOptionClick(e) {
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ function AddModelForm({
|
|||
};
|
||||
|
||||
ideMessenger.post("config/addModel", { model });
|
||||
ideMessenger.post("openConfigJson", undefined);
|
||||
ideMessenger.post("openConfig", undefined);
|
||||
|
||||
dispatch(setDefaultModel({ title: model.title, force: true }));
|
||||
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ function AddNewModel() {
|
|||
className="mt-12"
|
||||
disabled={false}
|
||||
onClick={(e) => {
|
||||
ideMessenger.post("openConfigJson", undefined);
|
||||
ideMessenger.post("openConfig", undefined);
|
||||
}}
|
||||
>
|
||||
<h3 className="my-2 text-center">
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ function IndexingProgress() {
|
|||
}
|
||||
break;
|
||||
case "disabled":
|
||||
ideMessenger.post("openConfigJson", undefined);
|
||||
ideMessenger.post("openConfig", undefined);
|
||||
break;
|
||||
case "done":
|
||||
ideMessenger.post("index/forceReIndex", undefined);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue