diff --git a/gui/index.html b/gui/index.html index 017e27848..f54eae839 100644 --- a/gui/index.html +++ b/gui/index.html @@ -1,4 +1,4 @@ - + diff --git a/gui/postcss.config.cjs b/gui/postcss.config.cjs index 33ad091d2..12a703d90 100644 --- a/gui/postcss.config.cjs +++ b/gui/postcss.config.cjs @@ -3,4 +3,4 @@ module.exports = { tailwindcss: {}, autoprefixer: {}, }, -} +}; diff --git a/gui/src/components/AddModelButtonSubtext.tsx b/gui/src/components/AddModelButtonSubtext.tsx index 8ff095926..4a5744e7d 100644 --- a/gui/src/components/AddModelButtonSubtext.tsx +++ b/gui/src/components/AddModelButtonSubtext.tsx @@ -9,7 +9,7 @@ function AddModelButtonSubtext() { This will update your{" "} ideMessenger.post("openConfigJson", undefined)} > config file diff --git a/gui/src/components/ButtonWithTooltip.tsx b/gui/src/components/ButtonWithTooltip.tsx index cf3cb9275..2e2c13aac 100644 --- a/gui/src/components/ButtonWithTooltip.tsx +++ b/gui/src/components/ButtonWithTooltip.tsx @@ -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; diff --git a/gui/src/components/InfoHover.tsx b/gui/src/components/InfoHover.tsx index d51e90fdb..aa6541c5b 100644 --- a/gui/src/components/InfoHover.tsx +++ b/gui/src/components/InfoHover.tsx @@ -8,7 +8,7 @@ const InfoHover = ({ msg }: { msg: string }) => { <> diff --git a/gui/src/components/OnboardingCard/OnboardingCard.tsx b/gui/src/components/OnboardingCard/OnboardingCard.tsx index aba23e14a..14a840456 100644 --- a/gui/src/components/OnboardingCard/OnboardingCard.tsx +++ b/gui/src/components/OnboardingCard/OnboardingCard.tsx @@ -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 ( - + - +
{renderTabContent()}
diff --git a/gui/src/components/OnboardingCard/components/OllamaCompletedStep.tsx b/gui/src/components/OnboardingCard/components/OllamaCompletedStep.tsx index 44c5c5caa..1b2cbea0a 100644 --- a/gui/src/components/OnboardingCard/components/OllamaCompletedStep.tsx +++ b/gui/src/components/OnboardingCard/components/OllamaCompletedStep.tsx @@ -6,8 +6,8 @@ interface OllamaCompletedStepProps { function OllamaCompletedStep({ text }: OllamaCompletedStepProps) { return ( -
-

{text}

+
+

{text}

); diff --git a/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx b/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx index d44524cb5..fa76279d2 100644 --- a/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx +++ b/gui/src/components/OnboardingCard/components/OnboardingCardTabs.tsx @@ -71,7 +71,7 @@ export function OnboardingCardTabs({ }: OnboardingCardTabsProps) { return (
-
+
{Object.entries(TabTitles).map(([tabType, titles]) => { if (hasPassedFTL() && tabType === "Quickstart") { @@ -80,21 +80,21 @@ export function OnboardingCardTabs({ return ( onTabClick(tabType as TabTitle)} > -

+

{titles.default}

-

{titles.md}

+

{titles.md}

); })}
-
+
onTabClick(e.target.value as TabTitle)} diff --git a/gui/src/components/OnboardingCard/tabs/OnboardingBestTab.tsx b/gui/src/components/OnboardingCard/tabs/OnboardingBestTab.tsx index d5b372245..f4c02cefd 100644 --- a/gui/src/components/OnboardingCard/tabs/OnboardingBestTab.tsx +++ b/gui/src/components/OnboardingCard/tabs/OnboardingBestTab.tsx @@ -7,7 +7,7 @@ function OnboardingBestTab() { return (
-
+
diff --git a/gui/src/components/OnboardingCard/tabs/OnboardingQuickstartTab.tsx b/gui/src/components/OnboardingCard/tabs/OnboardingQuickstartTab.tsx index ff77e18e8..3d9cd204c 100644 --- a/gui/src/components/OnboardingCard/tabs/OnboardingQuickstartTab.tsx +++ b/gui/src/components/OnboardingCard/tabs/OnboardingQuickstartTab.tsx @@ -3,18 +3,18 @@ import QuickStartSubmitButton from "../components/QuickStartSubmitButton"; function OnboardingQuickstartTab() { return ( -
-
-
+
+
+
-

+

Quickly get up and running using our API keys. After this trial, we'll help you set up your own models.

-

+

To prevent abuse, we'll ask you to sign in to GitHub.

diff --git a/gui/src/components/gui/Alert.tsx b/gui/src/components/gui/Alert.tsx index 1e72e6386..e7546ffc7 100644 --- a/gui/src/components/gui/Alert.tsx +++ b/gui/src/components/gui/Alert.tsx @@ -39,10 +39,10 @@ function Alert({ children, type = "info" }: AlertProps) { const { Icon } = ALERT_CONFIGS[type]; return ( -
+
diff --git a/gui/src/components/gui/StepContainer.tsx b/gui/src/components/gui/StepContainer.tsx index c90d6c9c7..1208fea7d 100644 --- a/gui/src/components/gui/StepContainer.tsx +++ b/gui/src/components/gui/StepContainer.tsx @@ -83,9 +83,10 @@ function StepContainer(props: StepContainerProps) { }; return ( -
{uiConfig?.displayRawMarkdown ? (
             {stripImages(props.item.message.content)}
@@ -107,10 +108,11 @@ function StepContainer(props: StepContainerProps) {
           />
         )}
       
-      
{truncatedEarly && ( @@ -145,7 +147,9 @@ function StepContainer(props: StepContainerProps) { tabIndex={-1} onClick={() => sendFeedback(true)} > - + sendFeedback(false)} > - +
diff --git a/gui/src/components/loaders/FreeTrialProgressBar.tsx b/gui/src/components/loaders/FreeTrialProgressBar.tsx index 81c7a0477..99a2d9b69 100644 --- a/gui/src/components/loaders/FreeTrialProgressBar.tsx +++ b/gui/src/components/loaders/FreeTrialProgressBar.tsx @@ -37,7 +37,7 @@ function FreeTrialProgressBar({ completed, total }: FreeTrialProgressBarProps) { return ( <>
@@ -54,11 +54,11 @@ function FreeTrialProgressBar({ completed, total }: FreeTrialProgressBarProps) { return ( <>
-
+
Free trial requests @@ -68,9 +68,9 @@ function FreeTrialProgressBar({ completed, total }: FreeTrialProgressBarProps) {
-
+
0.75 ? "bg-amber-500" : "bg-stone-500" }`} style={{ diff --git a/gui/src/components/loaders/RingLoader.tsx b/gui/src/components/loaders/RingLoader.tsx index 687d2990e..c72b70a30 100644 --- a/gui/src/components/loaders/RingLoader.tsx +++ b/gui/src/components/loaders/RingLoader.tsx @@ -46,7 +46,7 @@ const RingLoader = (props: { return (
({ 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({ tr.insertText( this.options.suggestion.char || "", pos, - pos + node.nodeSize + pos + node.nodeSize, ); return false; diff --git a/gui/src/components/mainInput/ContextItemsPeek.tsx b/gui/src/components/mainInput/ContextItemsPeek.tsx index 2d7409b26..3ae178abf 100644 --- a/gui/src/components/mainInput/ContextItemsPeek.tsx +++ b/gui/src/components/mainInput/ContextItemsPeek.tsx @@ -52,7 +52,7 @@ function ContextItemsPeekItem({ contextItem }: ContextItemsPeekItemProps) { if (contextItem.icon) { return ( +
@@ -96,16 +96,16 @@ function ContextItemsPeekItem({ contextItem }: ContextItemsPeekItemProps) { return (
-
+
{getContextItemIcon()}
-
+
{contextItem.name}
{contextItem.uri?.type === "file" ? getBasename(contextItem.description) @@ -134,18 +134,18 @@ function ContextItemsPeek({ return (
setOpen((prev) => !prev)} > -
+
diff --git a/gui/src/components/mainInput/resolveInput.ts b/gui/src/components/mainInput/resolveInput.ts index 4b2d606d6..64acba85a 100644 --- a/gui/src/components/mainInput/resolveInput.ts +++ b/gui/src/components/mainInput/resolveInput.ts @@ -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```"; diff --git a/gui/src/components/markdown/FilenameLink.tsx b/gui/src/components/markdown/FilenameLink.tsx index 6eea1ae73..58b764136 100644 --- a/gui/src/components/markdown/FilenameLink.tsx +++ b/gui/src/components/markdown/FilenameLink.tsx @@ -21,11 +21,11 @@ function FilenameLink({ rif }: FilenameLinkProps) { return (
- + {getBasename(rif.filepath)}
diff --git a/gui/src/components/markdown/StyledMarkdownPreview.tsx b/gui/src/components/markdown/StyledMarkdownPreview.tsx index a744b371d..084ae961a 100644 --- a/gui/src/components/markdown/StyledMarkdownPreview.tsx +++ b/gui/src/components/markdown/StyledMarkdownPreview.tsx @@ -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; diff --git a/gui/src/components/modelSelection/ModelCard.tsx b/gui/src/components/modelSelection/ModelCard.tsx index 8f9d7b16b..7c61659e0 100644 --- a/gui/src/components/modelSelection/ModelCard.tsx +++ b/gui/src/components/modelSelection/ModelCard.tsx @@ -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) {

{props.title}

- {props.tags?.map((tag, i) => ( - - ))} + {props.tags?.map((tag, i) => )}

{props.description}

@@ -179,7 +177,7 @@ function ModelCard(props: ModelCardProps) {
-

{dimension.name}

+

{dimension.name}

{Object.keys(dimension.options).map((key) => { @@ -204,7 +202,7 @@ function ModelCard(props: ModelCardProps) { ); })} {props.providerOptions?.length && ( -
+
-
+
{props.providerOptions?.map((option, i) => { const info = providers[option]; if (!info) { @@ -221,7 +219,7 @@ function ModelCard(props: ModelCardProps) { return ( ` background-color: ${({ selected }) => @@ -121,7 +121,7 @@ function ModelSelectionListbox({ {window.vscMediaUrl && selectedProvider.icon && ( )} {selectedProvider.title} @@ -150,13 +150,13 @@ function ModelSelectionListbox({ {({ selected }) => ( <> {option.title === "Autodetect" ? ( - + ) : ( window.vscMediaUrl && option.icon && ( ) )} diff --git a/gui/src/hooks/useAppendedString.ts b/gui/src/hooks/useAppendedString.ts index 18eb08217..54d1c5f71 100644 --- a/gui/src/hooks/useAppendedString.ts +++ b/gui/src/hooks/useAppendedString.ts @@ -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([]); diff --git a/gui/src/hooks/useHistory.tsx b/gui/src/hooks/useHistory.tsx index ea9e0668b..c539df7ec 100644 --- a/gui/src/hooks/useHistory.tsx +++ b/gui/src/hooks/useHistory.tsx @@ -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, diff --git a/gui/src/hooks/useSetup.ts b/gui/src/hooks/useSetup.ts index f7c9fdf10..2fed805da 100644 --- a/gui/src/hooks/useSetup.ts +++ b/gui/src/hooks/useSetup.ts @@ -88,9 +88,13 @@ function useSetup(dispatch: Dispatch) { // 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()); diff --git a/gui/src/index.css b/gui/src/index.css index 090ee88fc..8511531f3 100644 --- a/gui/src/index.css +++ b/gui/src/index.css @@ -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 { diff --git a/gui/src/pages/AddNewModel/AddNewModel.tsx b/gui/src/pages/AddNewModel/AddNewModel.tsx index ed06ccdce..b361732c7 100644 --- a/gui/src/pages/AddNewModel/AddNewModel.tsx +++ b/gui/src/pages/AddNewModel/AddNewModel.tsx @@ -63,9 +63,9 @@ function AddNewModel() { const [providersSelected, setProvidersSelected] = React.useState(true); return ( -
+
navigate("/")} - className="inline-block ml-4 cursor-pointer" + className="ml-4 inline-block cursor-pointer" /> -

Add a new model

+

Add a new model


@@ -113,7 +113,7 @@ function AddNewModel() { {providersSelected ? ( <> -
+

Providers

Select a provider below, or configure your own in{" "} @@ -142,7 +142,7 @@ function AddNewModel() { ) : ( <> -

+

Models

Select a model from the most popular options below, or configure @@ -152,8 +152,8 @@ function AddNewModel() { {Object.entries(modelsByProvider).map( ([providerTitle, modelConfigsByProviderTitle]) => ( -

-
+
+

{providerTitle}


-

- +

+ Open config.json

diff --git a/gui/src/pages/AddNewModel/ConfigureProvider.tsx b/gui/src/pages/AddNewModel/ConfigureProvider.tsx index e5c301aac..55342b51d 100644 --- a/gui/src/pages/AddNewModel/ConfigureProvider.tsx +++ b/gui/src/pages/AddNewModel/ConfigureProvider.tsx @@ -86,7 +86,7 @@ function ConfigureProvider() {
navigate("/addModel")} - className="inline-block ml-4 cursor-pointer" + className="ml-4 inline-block cursor-pointer" /> -

+

Configure provider

@@ -139,7 +139,7 @@ function ConfigureProvider() { -
+
+
{update.status !== "loading" && ( diff --git a/gui/src/pages/More/IndexingProgress/IndexingProgressBar.tsx b/gui/src/pages/More/IndexingProgress/IndexingProgressBar.tsx index f8e395468..5de74fb3f 100644 --- a/gui/src/pages/More/IndexingProgress/IndexingProgressBar.tsx +++ b/gui/src/pages/More/IndexingProgress/IndexingProgressBar.tsx @@ -9,9 +9,9 @@ function IndexingProgressBar({ update }: IndexingProgressBarProps) { const progressPercentage = getProgressPercentage(update.progress); return ( -
+
https://docs.continue.dev/walkthroughs/codebase-embeddings#embeddings-providers diff --git a/gui/src/pages/More/IndexingProgress/IndexingProgressIndicator.tsx b/gui/src/pages/More/IndexingProgress/IndexingProgressIndicator.tsx index 852cdf845..944fdc917 100644 --- a/gui/src/pages/More/IndexingProgress/IndexingProgressIndicator.tsx +++ b/gui/src/pages/More/IndexingProgress/IndexingProgressIndicator.tsx @@ -27,13 +27,16 @@ function IndexingProgressIndicator({ update }: IndexingProgressIndicatorProps) { return (
- {showProgress && {progressPercentage.toFixed(0)}%} + {showProgress && ( + {progressPercentage.toFixed(0)}% + )} {Icon && (
)} diff --git a/gui/src/pages/More/IndexingProgress/IndexingProgressSubtext.tsx b/gui/src/pages/More/IndexingProgress/IndexingProgressSubtext.tsx index 67ba96054..6c07babb0 100644 --- a/gui/src/pages/More/IndexingProgress/IndexingProgressSubtext.tsx +++ b/gui/src/pages/More/IndexingProgress/IndexingProgressSubtext.tsx @@ -26,7 +26,7 @@ function IndexingProgressSubtext({ return (
{showIndexingDesc && ( - + {update.desc} )} diff --git a/gui/src/pages/More/More.tsx b/gui/src/pages/More/More.tsx index 4e6f3cd0f..4824c9535 100644 --- a/gui/src/pages/More/More.tsx +++ b/gui/src/pages/More/More.tsx @@ -31,7 +31,10 @@ function MorePage() { backgroundColor: vscBackground, }} > -
navigate("/")}> +
navigate("/")} + > Chat
diff --git a/gui/src/pages/config-error/index.tsx b/gui/src/pages/config-error/index.tsx index 230a45204..aa0e22f22 100644 --- a/gui/src/pages/config-error/index.tsx +++ b/gui/src/pages/config-error/index.tsx @@ -20,37 +20,37 @@ export default function ConfigErrorPage() {
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, }} > - - Chat + + Chat
-
+
-

Config Errors

-

+

Config Errors

+

Please resolve the following errors in your config.json file.

{sortedErrors.length > 0 ? ( -
    +
      {sortedErrors.map((error, index) => (
    • {error.fatal ? ( - + ) : ( - + )}

      @@ -62,7 +62,7 @@ export default function ConfigErrorPage() { ))}

    ) : ( -

    +

    No configuration errors found.

    )} diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx index 27e9be2cd..9c14c4bd2 100644 --- a/gui/src/pages/gui/Chat.tsx +++ b/gui/src/pages/gui/Chat.tsx @@ -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={() => {}} > { }} + onUserInput={(input: string) => {}} item={item} - onReverse={() => { }} + onReverse={() => {}} onRetry={() => { streamResponse( state.history[index - 1].editorState, state.history[index - 1].modifiers ?? - defaultInputModifiers, + defaultInputModifiers, ideMessenger, index - 1, ); diff --git a/gui/src/pages/history/HistoryHeader.tsx b/gui/src/pages/history/HistoryHeader.tsx index e93a68520..4dbdf90bb 100644 --- a/gui/src/pages/history/HistoryHeader.tsx +++ b/gui/src/pages/history/HistoryHeader.tsx @@ -19,7 +19,10 @@ export const HistoryHeader = () => { borderBottom: `0.5px solid ${lightGray}`, }} > -
    navigate("/")}> +
    navigate("/")} + >
    -

    Settings

    +

    Settings

    { ideMessenger.post("showFile", { @@ -191,7 +191,7 @@ function Settings() { predictable.`} />

-
+

0

-
+
{ navigate("/");