chore: prettier bulk apply in gui

This commit is contained in:
Test 2024-11-10 21:45:13 -08:00
parent cc0e7c280d
commit c4e2d4bf1d
39 changed files with 179 additions and 145 deletions

View file

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />

View file

@ -3,4 +3,4 @@ module.exports = {
tailwindcss: {},
autoprefixer: {},
},
}
};

View file

@ -9,7 +9,7 @@ function AddModelButtonSubtext() {
<ButtonSubtext>
This will update your{" "}
<span
className="underline cursor-pointer"
className="cursor-pointer underline"
onClick={() => ideMessenger.post("openConfigJson", undefined)}
>
config file

View file

@ -2,7 +2,7 @@ import React from "react";
import { type PlacesType } from "react-tooltip";
import { HeaderButton } from ".";
import { v4 as uuidv4 } from "uuid";
import { ToolTip } from "./gui/Tooltip";
import { ToolTip } from "./gui/Tooltip";
interface HeaderButtonWithTextProps {
text: string | undefined;

View file

@ -8,7 +8,7 @@ const InfoHover = ({ msg }: { msg: string }) => {
<>
<InformationCircleIcon
data-tooltip-id={id}
className="h-5 w-5 text-gray-500 cursor-help"
className="h-5 w-5 cursor-help text-gray-500"
/>
<ToolTip id={id} place="bottom">

View file

@ -10,7 +10,8 @@ const StyledCard = styled.div`
margin: auto;
border-radius: ${defaultBorderRadius};
background-color: ${vscInputBackground};
box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1),
box-shadow:
0 20px 25px -5px rgb(0 0 0 / 0.1),
0 8px 10px -6px rgb(0 0 0 / 0.1);
`;
@ -42,13 +43,13 @@ export function OnboardingCard(props: OnboardingCardProps) {
}
return (
<StyledCard className="relative px-2 py-3 xs:py-4 xs:px-4">
<StyledCard className="xs:py-4 xs:px-4 relative px-2 py-3">
<OnboardingCardTabs
activeTab={onboardingCard.activeTab}
onTabClick={onboardingCard.setActiveTab}
/>
<CloseButton onClick={onboardingCard.close}>
<XMarkIcon className="h-5 w-5 hidden sm:flex" />
<XMarkIcon className="hidden h-5 w-5 sm:flex" />
</CloseButton>
<div className="content py-4">{renderTabContent()}</div>
</StyledCard>

View file

@ -6,8 +6,8 @@ interface OllamaCompletedStepProps {
function OllamaCompletedStep({ text }: OllamaCompletedStepProps) {
return (
<div className="flex justify-between items-center">
<p className="text-sm w-3/4 font-mono truncate mr-1">{text}</p>
<div className="flex items-center justify-between">
<p className="mr-1 w-3/4 truncate font-mono text-sm">{text}</p>
<CheckCircleIcon width={24} height={24} className="text-emerald-600" />
</div>
);

View file

@ -71,7 +71,7 @@ export function OnboardingCardTabs({
}: OnboardingCardTabsProps) {
return (
<div>
<div className="hidden xs:block">
<div className="xs:block hidden">
<TabList>
{Object.entries(TabTitles).map(([tabType, titles]) => {
if (hasPassedFTL() && tabType === "Quickstart") {
@ -80,21 +80,21 @@ export function OnboardingCardTabs({
return (
<TabButton
className="px-6 py-2 xs:py-2 xs:px-3 sm:px-5"
className="xs:py-2 xs:px-3 px-6 py-2 sm:px-5"
key={tabType}
isActive={activeTab === tabType}
onClick={() => onTabClick(tabType as TabTitle)}
>
<p className="hidden md:block m-0 font-medium">
<p className="m-0 hidden font-medium md:block">
{titles.default}
</p>
<p className="block md:hidden m-0 font-medium">{titles.md}</p>
<p className="m-0 block font-medium md:hidden">{titles.md}</p>
</TabButton>
);
})}
</TabList>
</div>
<div className="block xs:hidden">
<div className="xs:hidden block">
<StyledSelect
value={activeTab}
onChange={(e) => onTabClick(e.target.value as TabTitle)}

View file

@ -7,7 +7,7 @@ function OnboardingBestTab() {
return (
<div className="flex flex-col gap-8">
<div className="hidden xs:flex w-full">
<div className="xs:flex hidden w-full">
<ProviderAlert />
</div>
<BestExperienceConfigForm onComplete={submitOnboarding} />

View file

@ -3,18 +3,18 @@ import QuickStartSubmitButton from "../components/QuickStartSubmitButton";
function OnboardingQuickstartTab() {
return (
<div className="flex justify-center items-center w-full h-full">
<div className="flex flex-col items-center justify-center w-full max-w-full px-4 xs:px-0 text-center">
<div className="hidden xs:flex">
<div className="flex h-full w-full items-center justify-center">
<div className="xs:px-0 flex w-full max-w-full flex-col items-center justify-center px-4 text-center">
<div className="xs:flex hidden">
<ContinueLogo height={75} />
</div>
<p className="text-sm w-full xs:w-3/4">
<p className="xs:w-3/4 w-full text-sm">
Quickly get up and running using our API keys. After this trial, we'll
help you set up your own models.
</p>
<p className="text-sm w-full xs:w-3/4">
<p className="xs:w-3/4 w-full text-sm">
To prevent abuse, we'll ask you to sign in to GitHub.
</p>

View file

@ -39,10 +39,10 @@ function Alert({ children, type = "info" }: AlertProps) {
const { Icon } = ALERT_CONFIGS[type];
return (
<div className="p-4 rounded-lg shadow-none border-l-4 bg-[color:var(--vscode-editor-foreground)] opacity-70">
<div className="rounded-lg border-l-4 bg-[color:var(--vscode-editor-foreground)] p-4 opacity-70 shadow-none">
<div className="flex items-start">
<Icon
className="w-6 min-w-5 h-6 min-h-5"
className="h-6 min-h-5 w-6 min-w-5"
style={{ color: vscBackground }}
/>

View file

@ -83,9 +83,10 @@ function StepContainer(props: StepContainerProps) {
};
return (
<div className="relative"
<div
className="relative"
style={{
minHeight: props.isLast ? "50vh" : 0
minHeight: props.isLast ? "50vh" : 0,
}}
>
<ContentDiv
@ -95,7 +96,7 @@ function StepContainer(props: StepContainerProps) {
>
{uiConfig?.displayRawMarkdown ? (
<pre
className="whitespace-pre-wrap break-words p-4 max-w-full overflow-x-auto"
className="max-w-full overflow-x-auto whitespace-pre-wrap break-words p-4"
style={{ fontSize: getFontSize() - 2 }}
>
{stripImages(props.item.message.content)}
@ -107,10 +108,11 @@ function StepContainer(props: StepContainerProps) {
/>
)}
</ContentDiv>
<div className="h-7 mb-2 mx-2 flex items-center justify-end gap-0.5 xs:flex text-xs text-gray-400 pb-0 cursor-default"
<div
className="xs:flex mx-2 mb-2 flex h-7 cursor-default items-center justify-end gap-0.5 pb-0 text-xs text-gray-400"
style={{
opacity: shouldRenderActions ? 1 : 0,
pointerEvents: shouldRenderActions ? "auto" : "none"
pointerEvents: shouldRenderActions ? "auto" : "none",
}}
>
{truncatedEarly && (
@ -145,7 +147,9 @@ function StepContainer(props: StepContainerProps) {
tabIndex={-1}
onClick={() => sendFeedback(true)}
>
<HandThumbUpIcon className={`h-3.5 w-3.5 mx-0.5 ${feedback === true ? 'text-green-400' : 'text-gray-500'}`} />
<HandThumbUpIcon
className={`mx-0.5 h-3.5 w-3.5 ${feedback === true ? "text-green-400" : "text-gray-500"}`}
/>
</ButtonWithTooltip>
<ButtonWithTooltip
@ -153,7 +157,9 @@ function StepContainer(props: StepContainerProps) {
tabIndex={-1}
onClick={() => sendFeedback(false)}
>
<HandThumbDownIcon className={`h-3.5 w-3.5 ${feedback === false ? 'text-red-400' : 'text-gray-500'}`} />
<HandThumbDownIcon
className={`h-3.5 w-3.5 ${feedback === false ? "text-red-400" : "text-gray-500"}`}
/>
</ButtonWithTooltip>
</div>
</div>

View file

@ -37,7 +37,7 @@ function FreeTrialProgressBar({ completed, total }: FreeTrialProgressBarProps) {
return (
<>
<div
className="flex items-center gap-1 cursor-default"
className="flex cursor-default items-center gap-1"
data-tooltip-id="usage_progress_bar"
>
<ExclamationCircleIcon width="18px" height="18px" color="red" />
@ -54,11 +54,11 @@ function FreeTrialProgressBar({ completed, total }: FreeTrialProgressBarProps) {
return (
<>
<div
className="flex flex-col cursor-pointer text-gray-400 text-[10px]"
className="flex cursor-pointer flex-col text-[10px] text-gray-400"
data-tooltip-id="usage_progress_bar"
onClick={onClick}
>
<div className="hidden xs:flex justify-between mb-0">
<div className="xs:flex mb-0 hidden justify-between">
<span>
Free trial <span className="hidden sm:inline">requests</span>
</span>
@ -68,9 +68,9 @@ function FreeTrialProgressBar({ completed, total }: FreeTrialProgressBarProps) {
</span>
</div>
<div className="w-[40vw] h-1.5 rounded-md border border-gray-400 border-solid my-1.5 flex">
<div className="my-1.5 flex h-1.5 w-[40vw] rounded-md border border-solid border-gray-400">
<div
className={`transition-all duration-200 ease-in-out h-full rounded-lg ${
className={`h-full rounded-lg transition-all duration-200 ease-in-out ${
completed / total > 0.75 ? "bg-amber-500" : "bg-stone-500"
}`}
style={{

View file

@ -46,7 +46,7 @@ const RingLoader = (props: {
return (
<div
className={
"m-auto text-center mt-2" +
"m-auto mt-2 text-center" +
(props.wFull === false ? "" : " w-full") +
" " +
props.className

View file

@ -121,7 +121,7 @@ export const SlashCommand = Node.create<SlashCommandOptions>({
mergeAttributes(
{ "data-type": this.name },
this.options.HTMLAttributes,
HTMLAttributes
HTMLAttributes,
),
this.options.renderText({
options: this.options,
@ -155,7 +155,7 @@ export const SlashCommand = Node.create<SlashCommandOptions>({
tr.insertText(
this.options.suggestion.char || "",
pos,
pos + node.nodeSize
pos + node.nodeSize,
);
return false;

View file

@ -52,7 +52,7 @@ function ContextItemsPeekItem({ contextItem }: ContextItemsPeekItemProps) {
if (contextItem.icon) {
return (
<SafeImg
className="flex-shrink-0 mr-2 rounded-md p-1"
className="mr-2 flex-shrink-0 rounded-md p-1"
src={contextItem.icon}
height={dimensions}
width={dimensions}
@ -66,7 +66,7 @@ function ContextItemsPeekItem({ contextItem }: ContextItemsPeekItemProps) {
if (shouldShowFileIcon) {
return (
<div className="flex-shrink-0 mr-2">
<div className="mr-2 flex-shrink-0">
<FileIcon
filename={
contextItem.description.split(" ").shift()?.split("#").shift() ||
@ -86,7 +86,7 @@ function ContextItemsPeekItem({ contextItem }: ContextItemsPeekItemProps) {
return (
<ProviderIcon
className="flex-shrink-0 mr-2"
className="mr-2 flex-shrink-0"
height={dimensions}
width={dimensions}
/>
@ -96,16 +96,16 @@ function ContextItemsPeekItem({ contextItem }: ContextItemsPeekItemProps) {
return (
<div
onClick={openContextItem}
className="text-xs cursor-pointer px-1.5 py-1 flex items-center rounded hover:bg-white/10 overflow-hidden whitespace-nowrap text-ellipsis mr-2"
className="mr-2 flex cursor-pointer items-center overflow-hidden text-ellipsis whitespace-nowrap rounded px-1.5 py-1 text-xs hover:bg-white/10"
>
<div className="flex items-center w-full">
<div className="flex w-full items-center">
{getContextItemIcon()}
<div className="flex min-w-0 flex-1 gap-2 text-xs">
<div className="truncate max-w-[50%] flex-shrink-0">
<div className="max-w-[50%] flex-shrink-0 truncate">
{contextItem.name}
</div>
<div
className={`text-xs text-gray-400 overflow-hidden truncate whitespace-nowrap text-xs flex-1 min-w-0`}
className={`min-w-0 flex-1 overflow-hidden truncate whitespace-nowrap text-xs text-gray-400`}
>
{contextItem.uri?.type === "file"
? getBasename(contextItem.description)
@ -134,18 +134,18 @@ function ContextItemsPeek({
return (
<div className={`pl-2 pt-2 bg-[${vscBackground}]`}>
<div
className="text-gray-300 cursor-pointer flex justify-start items-center text-xs"
className="flex cursor-pointer items-center justify-start text-xs text-gray-300"
onClick={() => setOpen((prev) => !prev)}
>
<div className="relative w-4 h-4 mr-1">
<div className="relative mr-1 h-4 w-4">
<ChevronRightIcon
className={`absolute h-4 w-4 transition-all duration-200 ease-in-out text-[${lightGray}] ${
open ? "opacity-0 rotate-90" : "opacity-100 rotate-0"
open ? "rotate-90 opacity-0" : "rotate-0 opacity-100"
}`}
/>
<ChevronDownIcon
className={`absolute h-4 w-4 transition-all duration-200 ease-in-out text-[${lightGray}] ${
open ? "opacity-100 rotate-0" : "opacity-0 -rotate-90"
open ? "rotate-0 opacity-100" : "-rotate-90 opacity-0"
}`}
/>
</div>

View file

@ -62,7 +62,10 @@ async function resolveEditorContent(
let extName = relativePath.split(".").slice(-1)[0];
const text =
"\n\n" +
"```" + extName + " " + p.attrs.item.description +
"```" +
extName +
" " +
p.attrs.item.description +
"\n" +
p.attrs.item.content +
"\n```";

View file

@ -21,11 +21,11 @@ function FilenameLink({ rif }: FilenameLinkProps) {
return (
<div
className="inline-flex items-center align-middle hover:bg-stone-800 rounded-md py-0.5 pl-0 pr-1 mb-0.5 cursor-pointer gap-0.5"
className="mb-0.5 inline-flex cursor-pointer items-center gap-0.5 rounded-md py-0.5 pl-0 pr-1 align-middle hover:bg-stone-800"
onClick={onClick}
>
<FileIcon filename={rif.filepath} height="20px" width="20px" />
<span className="align-middle underline underline-offset-2 decoration-gray-600">
<span className="align-middle underline decoration-gray-600 underline-offset-2">
{getBasename(rif.filepath)}
</span>
</div>

View file

@ -53,9 +53,19 @@ const StyledMarkdown = styled.div<{
}
background-color: ${vscBackground};
font-family: var(--vscode-font-family), system-ui, -apple-system,
BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
"Open Sans", "Helvetica Neue", sans-serif;
font-family:
var(--vscode-font-family),
system-ui,
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
Roboto,
Oxygen,
Ubuntu,
Cantarell,
"Open Sans",
"Helvetica Neue",
sans-serif;
font-size: ${(props) => props.fontSize || getFontSize()}px;
padding-left: 8px;
padding-right: 8px;

View file

@ -43,11 +43,11 @@ const Div = styled.div<{ color: string; disabled: boolean; hovered: boolean }>`
opacity: 0.5;
`
: props.hovered
? `
? `
border: 1px solid ${props.color};
background-color: ${props.color}22;
cursor: pointer;`
: ""}
: ""}
`;
const DimensionsDiv = styled.div`
@ -148,9 +148,7 @@ function ModelCard(props: ModelCardProps) {
<h3>{props.title}</h3>
</div>
{props.tags?.map((tag, i) => (
<ModelProviderTag key={i} tag={tag} />
))}
{props.tags?.map((tag, i) => <ModelProviderTag key={i} tag={tag} />)}
<p>{props.description}</p>
@ -179,7 +177,7 @@ function ModelCard(props: ModelCardProps) {
<div className="flex items-center justify-between">
<div className="flex items-center">
<InfoHover msg={dimension.description} />
<p className="mx-2 text-sm my-0 py-0">{dimension.name}</p>
<p className="mx-2 my-0 py-0 text-sm">{dimension.name}</p>
</div>
<div className="flex items-center">
{Object.keys(dimension.options).map((key) => {
@ -204,7 +202,7 @@ function ModelCard(props: ModelCardProps) {
);
})}
{props.providerOptions?.length && (
<div className="flex items-center flex-wrap justify-end rtl">
<div className="rtl flex flex-wrap items-center justify-end">
<div className="flex items-center">
<InfoHover
msg={
@ -212,7 +210,7 @@ function ModelCard(props: ModelCardProps) {
}
/>
</div>
<div className="flex items-center flex-wrap justify-end rtl">
<div className="rtl flex flex-wrap items-center justify-end">
{props.providerOptions?.map((option, i) => {
const info = providers[option];
if (!info) {
@ -221,7 +219,7 @@ function ModelCard(props: ModelCardProps) {
return (
<ButtonWithTooltip
text={info.title}
className="p-2 text-center mx-1 items-center"
className="mx-1 items-center p-2 text-center"
style={{
backgroundColor:
(i === 0 &&

View file

@ -79,7 +79,7 @@ export const StyledListboxOptions = styled(Listbox.Options)`
}
`;
export const StyledListboxOption = styled(Listbox.Option) <{
export const StyledListboxOption = styled(Listbox.Option)<{
selected: boolean;
}>`
background-color: ${({ selected }) =>
@ -121,7 +121,7 @@ function ModelSelectionListbox({
{window.vscMediaUrl && selectedProvider.icon && (
<img
src={`${window.vscMediaUrl}/logos/${selectedProvider.icon}`}
className="object-contain w-4 h-4 object-center mr-3"
className="mr-3 h-4 w-4 object-contain object-center"
/>
)}
<span className="text-xs">{selectedProvider.title}</span>
@ -150,13 +150,13 @@ function ModelSelectionListbox({
{({ selected }) => (
<>
{option.title === "Autodetect" ? (
<CubeIcon className="mr-2 w-4 h-4 text-gray-400" />
<CubeIcon className="mr-2 h-4 w-4 text-gray-400" />
) : (
window.vscMediaUrl &&
option.icon && (
<img
src={`${window.vscMediaUrl}/logos/${option.icon}`}
className="object-contain w-4 h-4 object-center mr-1"
className="mr-1 h-4 w-4 object-contain object-center"
/>
)
)}

View file

@ -2,7 +2,7 @@ import { useEffect, useRef, useState } from "react";
export function useAppendedString(
fullString: string,
append: (chunk: string, lineCount: number) => void
append: (chunk: string, lineCount: number) => void,
) {
// Queue of fullString updated versions to be processed atomically
const [updateQueue, setUpdateQueue] = useState<string[]>([]);

View file

@ -54,7 +54,7 @@ function useHistory(dispatch: Dispatch) {
if (state.history.length === 0) return;
const stateCopy = { ...state };
if (open_new_session){
if (open_new_session) {
dispatch(newSession());
updateLastSessionId(stateCopy.sessionId);
}
@ -89,8 +89,8 @@ function useHistory(dispatch: Dispatch) {
MAX_TITLE_LENGTH,
)
: stateCopy.title?.length > 0
? stateCopy.title
: (await getSession(stateCopy.sessionId)).title; // to ensure titles are synced with updates from history page.
? stateCopy.title
: (await getSession(stateCopy.sessionId)).title; // to ensure titles are synced with updates from history page.
const sessionInfo: PersistedSessionInfo = {
history: stateCopy.history,

View file

@ -88,9 +88,13 @@ function useSetup(dispatch: Dispatch<any>) {
// IDE event listeners
const history = useSelector((store: RootState) => store.state.history);
useWebviewListener("getWebviewHistoryLength", async () => {
return history.length;
}, [history]);
useWebviewListener(
"getWebviewHistoryLength",
async () => {
return history.length;
},
[history],
);
useWebviewListener("setInactive", async () => {
dispatch(setInactive());

View file

@ -19,8 +19,18 @@ body,
#root {
height: 100%;
background-color: var(--vscode-editor-background);
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
font-family:
system-ui,
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
Roboto,
Oxygen,
Ubuntu,
Cantarell,
"Open Sans",
"Helvetica Neue",
sans-serif;
}
body {

View file

@ -63,9 +63,9 @@ function AddNewModel() {
const [providersSelected, setProvidersSelected] = React.useState(true);
return (
<div className="overflow-y-scroll mb-6">
<div className="mb-6 overflow-y-scroll">
<div
className="items-center flex m-0 p-0 sticky top-0"
className="sticky top-0 m-0 flex items-center p-0"
style={{
borderBottom: `0.5px solid ${lightGray}`,
backgroundColor: vscBackground,
@ -76,9 +76,9 @@ function AddNewModel() {
width="1.2em"
height="1.2em"
onClick={() => navigate("/")}
className="inline-block ml-4 cursor-pointer"
className="ml-4 inline-block cursor-pointer"
/>
<h3 className="text-lg font-bold m-2 inline-block">Add a new model</h3>
<h3 className="m-2 inline-block text-lg font-bold">Add a new model</h3>
</div>
<br />
<div className="px-6">
@ -113,7 +113,7 @@ function AddNewModel() {
{providersSelected ? (
<>
<div className="text-center leading-relaxed col-span-full mb-8">
<div className="col-span-full mb-8 text-center leading-relaxed">
<h2 className="mb-0">Providers</h2>
<p className="mt-2">
Select a provider below, or configure your own in{" "}
@ -142,7 +142,7 @@ function AddNewModel() {
</>
) : (
<>
<div className="text-center leading-relaxed col-span-full">
<div className="col-span-full text-center leading-relaxed">
<h2 className="mb-0">Models</h2>
<p className="mt-2">
Select a model from the most popular options below, or configure
@ -152,8 +152,8 @@ function AddNewModel() {
{Object.entries(modelsByProvider).map(
([providerTitle, modelConfigsByProviderTitle]) => (
<div className="flex flex-col mb-6">
<div className="w-full items-center mb-4">
<div className="mb-6 flex flex-col">
<div className="mb-4 w-full items-center">
<h3 className="">{providerTitle}</h3>
<hr
style={{
@ -214,8 +214,8 @@ function AddNewModel() {
ideMessenger.post("openConfigJson", undefined);
}}
>
<h3 className="text-center my-2">
<Cog6ToothIcon className="inline-block h-5 w-5 align-middle px-4" />
<h3 className="my-2 text-center">
<Cog6ToothIcon className="inline-block h-5 w-5 px-4 align-middle" />
Open config.json
</h3>
</CustomModelButton>

View file

@ -86,7 +86,7 @@ function ConfigureProvider() {
<FormProvider {...formMethods}>
<div className="overflow-y-scroll">
<div
className="items-center flex m-0 p-0 sticky top-0"
className="sticky top-0 m-0 flex items-center p-0"
style={{
borderBottom: `0.5px solid ${lightGray}`,
backgroundColor: vscBackground,
@ -97,9 +97,9 @@ function ConfigureProvider() {
width="1.2em"
height="1.2em"
onClick={() => navigate("/addModel")}
className="inline-block ml-4 cursor-pointer"
className="ml-4 inline-block cursor-pointer"
/>
<h3 className="text-lg font-bold m-2 inline-block">
<h3 className="m-2 inline-block text-lg font-bold">
Configure provider
</h3>
</div>
@ -139,7 +139,7 @@ function ConfigureProvider() {
<Input
type={d.inputType}
id={d.key}
className="border-2 border-gray-200 rounded-md p-2 m-2"
className="m-2 rounded-md border-2 border-gray-200 p-2"
placeholder={d.placeholder ?? d.label}
defaultValue={d.defaultValue}
min={d.min}
@ -169,7 +169,7 @@ function ConfigureProvider() {
<Input
type={d.inputType}
id={d.key}
className="border-2 border-gray-200 rounded-md p-2 m-2"
className="m-2 rounded-md border-2 border-gray-200 p-2"
placeholder={d.placeholder ?? d.label}
defaultValue={d.defaultValue}
min={d.min}

View file

@ -356,8 +356,10 @@ Select the \`GPT-4o\` model below to complete your provider configuration, but n
title: "xAI",
provider: "xAI",
icon: "xAI.png",
description: "xAI is a company working on building artificial intelligence to accelerate human scientific discovery",
longDescription: "To get started with xAI, obtain an API key from their [console](https://console.x.ai/).",
description:
"xAI is a company working on building artificial intelligence to accelerate human scientific discovery",
longDescription:
"To get started with xAI, obtain an API key from their [console](https://console.x.ai/).",
tags: [ModelProviderTags.RequiresApiKey, ModelProviderTags.OpenSource],
collectInputFor: [
{
@ -368,9 +370,7 @@ Select the \`GPT-4o\` model below to complete your provider configuration, but n
required: true,
},
],
packages: [
models.grokBeta,
],
packages: [models.grokBeta],
apiKeyUrl: "https://console.x.ai/",
},
lmstudio: {
@ -657,8 +657,7 @@ To get started, [register](https://dataplatform.cloud.ibm.com/registration/stepo
packages: [
models.VertexGemini15Pro,
models.VertexGemini15Flash,
models.mistralLarge
models.mistralLarge,
],
collectInputFor: [
{

View file

@ -108,8 +108,8 @@ function IndexingProgress() {
}
return (
<div className="flex flex-col mt-6">
<div className="flex justify-between mb-0 text-sm">
<div className="mt-6 flex flex-col">
<div className="mb-0 flex justify-between text-sm">
<IndexingProgressTitleText update={update} />
{update.status !== "loading" && (
<IndexingProgressIndicator update={update} />

View file

@ -9,9 +9,9 @@ function IndexingProgressBar({ update }: IndexingProgressBarProps) {
const progressPercentage = getProgressPercentage(update.progress);
return (
<div className="w-full h-1.5 rounded-md border border-gray-400 border-solid my-2">
<div className="my-2 h-1.5 w-full rounded-md border border-solid border-gray-400">
<div
className={`transition-all duration-200 ease-in-out h-full rounded-lg ${
className={`h-full rounded-lg transition-all duration-200 ease-in-out ${
update.status === "failed" ? "bg-red-600" : "bg-stone-500"
}`}
style={{

View file

@ -30,7 +30,7 @@ function IndexingProgressErrorText({ update }: IndexingProgressErrorTextProps) {
<a
href="https://docs.continue.dev/walkthroughs/codebase-embeddings#embeddings-providers"
target="_blank"
className="text-inherit underline cursor-pointer hover:text-inherit"
className="cursor-pointer text-inherit underline hover:text-inherit"
>
https://docs.continue.dev/walkthroughs/codebase-embeddings#embeddings-providers
</a>

View file

@ -27,13 +27,16 @@ function IndexingProgressIndicator({ update }: IndexingProgressIndicatorProps) {
return (
<div className="flex items-center justify-between gap-1 text-stone-500">
{showProgress && <span className="text-xs">{progressPercentage.toFixed(0)}%</span>}
{showProgress && (
<span className="text-xs">{progressPercentage.toFixed(0)}%</span>
)}
{Icon && (
<div className="flex items-center">
<Icon
className={`h-4 w-4 inline-block align-top text-stone-500 ${animateIcon ? "animate-spin-slow" : ""
}`}
className={`inline-block h-4 w-4 align-top text-stone-500 ${
animateIcon ? "animate-spin-slow" : ""
}`}
></Icon>
</div>
)}

View file

@ -26,7 +26,7 @@ function IndexingProgressSubtext({
return (
<div className="flex justify-between">
<span
className={`text-xs text-stone-500 underline cursor-pointer text-stone-500 ${
className={`cursor-pointer text-xs text-stone-500 underline ${
showIndexingDesc ? "w-1/3" : "w-full"
}`}
onClick={onClick}
@ -35,7 +35,7 @@ function IndexingProgressSubtext({
</span>
{showIndexingDesc && (
<span className="text-xs text-stone-500 truncate w-2/3 text-right">
<span className="w-2/3 truncate text-right text-xs text-stone-500">
{update.desc}
</span>
)}

View file

@ -31,7 +31,10 @@ function MorePage() {
backgroundColor: vscBackground,
}}
>
<div className="cursor-pointer hover:text-zinc-100 transition-colors duration-200" onClick={() => navigate("/")}>
<div
className="cursor-pointer transition-colors duration-200 hover:text-zinc-100"
onClick={() => navigate("/")}
>
<ArrowLeftIcon className="ml-3 inline-block h-3 w-3" />
<span className="m-2 inline-block text-base font-bold">Chat</span>
</div>

View file

@ -20,37 +20,37 @@ export default function ConfigErrorPage() {
<div className="overflow-y-scroll">
<div
onClick={() => navigate(ROUTES.HOME)}
className="items-center flex m-0 p-0 sticky top-0 cursor-pointer border-0 border-b border-solid border-b-zinc-700 bg-inherit"
className="sticky top-0 m-0 flex cursor-pointer items-center border-0 border-b border-solid border-b-zinc-700 bg-inherit p-0"
style={{
backgroundColor: vscBackground,
}}
>
<ArrowLeftIcon className="inline-block ml-3 cursor-pointer w-3 h-3" />
<span className="text-sm font-bold m-2 inline-block">Chat</span>
<ArrowLeftIcon className="ml-3 inline-block h-3 w-3 cursor-pointer" />
<span className="m-2 inline-block text-sm font-bold">Chat</span>
</div>
<div className="px-4 divide-y-2 divide-zinc-700 divide-solid divide-x-0 gap-2">
<div className="gap-2 divide-x-0 divide-y-2 divide-solid divide-zinc-700 px-4">
<div className="py-5">
<h3 className="text-xl mb-2 mt-0">Config Errors</h3>
<p className="mb-4 text-md">
<h3 className="mb-2 mt-0 text-xl">Config Errors</h3>
<p className="text-md mb-4">
Please resolve the following errors in your config.json file.
</p>
<div className="flex flex-col gap-5">
{sortedErrors.length > 0 ? (
<ul className="list-none space-y-4 p-0 m-0">
<ul className="m-0 list-none space-y-4 p-0">
{sortedErrors.map((error, index) => (
<li
key={index}
className={`text-sm p-2 rounded-md shadow-md flex items-start ${
className={`flex items-start rounded-md p-2 text-sm shadow-md ${
error.fatal
? "text-red-800 bg-red-100"
: "text-yellow-800 bg-yellow-100"
? "bg-red-100 text-red-800"
: "bg-yellow-100 text-yellow-800"
}`}
>
{error.fatal ? (
<ExclamationCircleIcon className="w-5 h-5 mr-2" />
<ExclamationCircleIcon className="mr-2 h-5 w-5" />
) : (
<ExclamationTriangleIcon className="w-5 h-5 mr-2" />
<ExclamationTriangleIcon className="mr-2 h-5 w-5" />
)}
<p className="m-0">
<strong>
@ -62,7 +62,7 @@ export default function ConfigErrorPage() {
))}
</ul>
) : (
<p className="text-sm text-green-700 bg-green-100 p-4 rounded-md">
<p className="rounded-md bg-green-100 p-4 text-sm text-green-700">
No configuration errors found.
</p>
)}

View file

@ -157,11 +157,11 @@ export function Chat() {
const smoothScrollToBottom = useCallback(async () => {
if (!topGuiDivRef.current) return;
const elem = topGuiDivRef.current
const elem = topGuiDivRef.current;
elem.scrollTo({
top: elem.scrollHeight - elem.clientHeight,
behavior: 'smooth'
})
behavior: "smooth",
});
setIsAtBottom(true);
}, [topGuiDivRef, setIsAtBottom]);
@ -173,7 +173,7 @@ export function Chat() {
useEffect(() => {
setTimeout(() => {
smoothScrollToBottom();
}, 250)
}, 250);
}, [smoothScrollToBottom, state.sessionId]);
useEffect(() => {
@ -299,13 +299,7 @@ export function Chat() {
setLocalStorage("mainTextEntryCounter", 1);
}
},
[
state.history,
state.contextItems,
defaultModel,
state,
streamResponse,
],
[state.history, state.contextItems, defaultModel, state, streamResponse],
);
useWebviewListener(
@ -386,7 +380,7 @@ export function Chat() {
: true
: stepsOpen[index]!
}
onToggle={() => { }}
onToggle={() => {}}
>
<StepContainer
index={index}
@ -398,14 +392,14 @@ export function Chat() {
: stepsOpen[index]!
}
key={index}
onUserInput={(input: string) => { }}
onUserInput={(input: string) => {}}
item={item}
onReverse={() => { }}
onReverse={() => {}}
onRetry={() => {
streamResponse(
state.history[index - 1].editorState,
state.history[index - 1].modifiers ??
defaultInputModifiers,
defaultInputModifiers,
ideMessenger,
index - 1,
);

View file

@ -19,7 +19,10 @@ export const HistoryHeader = () => {
borderBottom: `0.5px solid ${lightGray}`,
}}
>
<div className="flex items-center cursor-pointer hover:text-zinc-100 transition-colors duration-200" onClick={() => navigate("/")}>
<div
className="flex cursor-pointer items-center transition-colors duration-200 hover:text-zinc-100"
onClick={() => navigate("/")}
>
<ArrowLeftIcon
width="1.2em"
height="1.2em"

View file

@ -37,7 +37,7 @@ function EditorFrame(props: EditorFrameProps) {
return (
<div>
<div
className="my-2 px-2 py-1 flex justify-between items-center"
className="my-2 flex items-center justify-between px-2 py-1"
style={{
backgroundColor: vscInputBackground,
}}

View file

@ -140,7 +140,7 @@ function Settings() {
<FormProvider {...formMethods}>
<div className="overflow-y-scroll">
<div
className="items-center flex sticky top-0"
className="sticky top-0 flex items-center"
style={{
borderBottom: `0.5px solid ${lightGray}`,
backgroundColor: vscBackground,
@ -150,9 +150,9 @@ function Settings() {
width="1.2em"
height="1.2em"
onClick={submitAndLeave}
className="inline-block ml-4 cursor-pointer"
className="ml-4 inline-block cursor-pointer"
/>
<h3 className="text-lg font-bold m-2 inline-block">Settings</h3>
<h3 className="m-2 inline-block text-lg font-bold">Settings</h3>
<ConfigJsonButton
onClick={() => {
ideMessenger.post("showFile", {
@ -191,7 +191,7 @@ function Settings() {
predictable.`}
/>
</h3>
<div className="flex justify-between mx-16 gap-1">
<div className="mx-16 flex justify-between gap-1">
<p>0</p>
<Slider
type="range"
@ -272,7 +272,7 @@ function Settings() {
/>
</div>
<div className="flex gap-2 justify-end px-4">
<div className="flex justify-end gap-2 px-4">
<CancelButton
onClick={() => {
navigate("/");