Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d419949
chore: Deleted pnpm-lock.yaml and update pnpm and node versions
dloring1988 Jun 25, 2025
7de5851
chore: updated codemirror, cloudflare workers, vitests
dloring1988 Jun 25, 2025
1235143
chore: updated vercel ai sdk
dloring1988 Jun 25, 2025
1545d7c
chore: updated scss to resolve warnings
dloring1988 Jun 25, 2025
96063f7
chore: Updated @webcontainer/api to 1.6.4-internal.2
dloring1988 Jun 25, 2025
54271b3
chore: updated to latest version of claude sonnet 3.5
dloring1988 Jun 25, 2025
e7df496
Create dependabot.yml
dustinwloring1988 Jun 25, 2025
905e38d
chore: updated vite, react-toastify, react-resizeable-panels, isbot, …
dloring1988 Jun 25, 2025
e5b717f
chore: updated date-fns, framer-motion, unocss/reset, is-ci, remix-utils
dloring1988 Jun 25, 2025
075f90d
chore: updated shiki, unocss, types/diff
dloring1988 Jun 25, 2025
5699cf1
chore: updated react-hotkeys-hook, vite-plugin-node-polyfills, nanost…
dloring1988 Jun 25, 2025
4842c73
chore: updated @blitz/eslint-plugin, diff
dloring1988 Jun 25, 2025
45c1cdf
chore: updated jose
dloring1988 Jun 25, 2025
ba92f03
chore: updated vite-tsconfig-paths, nanostores/react
dloring1988 Jun 25, 2025
92d9581
chore: updated @types/react, @types/react-dom, react, react-markdown,…
dloring1988 Jun 25, 2025
6cb2c55
changed icon as it was not visiable
dloring1988 Jun 25, 2025
24053b7
chore: fix for previous change
dloring1988 Jun 25, 2025
a9048e5
chore: fixed typecheck warnings
dloring1988 Jun 25, 2025
28ce8bd
chore: lint warnings fixed
dloring1988 Jun 25, 2025
9c1002b
chore: more lint warnings fixed
dloring1988 Jun 25, 2025
f6d2fd7
chore fixed typecheck
dloring1988 Jun 25, 2025
61dcecb
chore: fixed all lint errors
dloring1988 Jun 25, 2025
f17cefb
chore: update vite.config.ts
dustinwloring1988 Jun 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
nodejs 20.15.1
pnpm 9.4.0
nodejs 22.14.0
pnpm 10.12.3
9 changes: 4 additions & 5 deletions app/components/chat/BaseChat.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import type { Message } from 'ai';
import React, { type RefCallback } from 'react';
import { ClientOnly } from 'remix-utils/client-only';
import styles from './BaseChat.module.scss';
import { Messages } from './Messages.client';
import { SendButton } from './SendButton.client';
import { Menu } from '~/components/sidebar/Menu.client';
import { IconButton } from '~/components/ui/IconButton';
import { Workbench } from '~/components/workbench/Workbench.client';
import { classNames } from '~/utils/classNames';
import { Messages } from './Messages.client';
import { SendButton } from './SendButton.client';

import styles from './BaseChat.module.scss';

interface BaseChatProps {
textareaRef?: React.RefObject<HTMLTextAreaElement> | undefined;
textareaRef?: React.RefObject<HTMLTextAreaElement | null> | undefined;
messageRef?: RefCallback<HTMLDivElement> | undefined;
scrollRef?: RefCallback<HTMLDivElement> | undefined;
showChat?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion app/components/chat/Chat.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import { useChat } from 'ai/react';
import { useAnimate } from 'framer-motion';
import { memo, useEffect, useRef, useState } from 'react';
import { cssTransition, toast, ToastContainer } from 'react-toastify';
import { BaseChat } from './BaseChat';
import { useMessageParser, usePromptEnhancer, useShortcuts, useSnapScroll } from '~/lib/hooks';
import { useChatHistory } from '~/lib/persistence';
import { chatStore } from '~/lib/stores/chat';
import { workbenchStore } from '~/lib/stores/workbench';
import { fileModificationsToHTML } from '~/utils/diff';
import { cubicEasingFn } from '~/utils/easings';
import { createScopedLogger, renderLogger } from '~/utils/logger';
import { BaseChat } from './BaseChat';

const toastAnimation = cssTransition({
enter: 'animated fadeInRight',
Expand Down
3 changes: 1 addition & 2 deletions app/components/chat/CodeBlock.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { memo, useEffect, useState } from 'react';
import { bundledLanguages, codeToHtml, isSpecialLang, type BundledLanguage, type SpecialLanguage } from 'shiki';
import styles from './CodeBlock.module.scss';
import { classNames } from '~/utils/classNames';
import { createScopedLogger } from '~/utils/logger';

import styles from './CodeBlock.module.scss';

const logger = createScopedLogger('CodeBlock');

interface CodeBlockProps {
Expand Down
23 changes: 12 additions & 11 deletions app/components/chat/Markdown.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { memo, useMemo } from 'react';
import ReactMarkdown, { type Components } from 'react-markdown';
import type { BundledLanguage } from 'shiki';
import { createScopedLogger } from '~/utils/logger';
import { rehypePlugins, remarkPlugins, allowedHTMLElements } from '~/utils/markdown';
import { Artifact } from './Artifact';
import { CodeBlock } from './CodeBlock';

import styles from './Markdown.module.scss';
import { createScopedLogger } from '~/utils/logger';
import { rehypePlugins, remarkPlugins, allowedHTMLElements } from '~/utils/markdown';

const logger = createScopedLogger('MarkdownComponent');

Expand Down Expand Up @@ -61,14 +61,15 @@ export const Markdown = memo(({ children, html = false, limitedMarkdown = false
}, []);

return (
<ReactMarkdown
allowedElements={allowedHTMLElements}
className={styles.MarkdownContent}
components={components}
remarkPlugins={remarkPlugins(limitedMarkdown)}
rehypePlugins={rehypePlugins(html)}
>
{children}
</ReactMarkdown>
<div className={styles.MarkdownContent}>
<ReactMarkdown
allowedElements={allowedHTMLElements}
components={components}
remarkPlugins={remarkPlugins(limitedMarkdown)}
rehypePlugins={rehypePlugins(html)}
>
{children}
</ReactMarkdown>
</div>
);
});
2 changes: 1 addition & 1 deletion app/components/chat/Messages.client.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Message } from 'ai';
import React from 'react';
import { classNames } from '~/utils/classNames';
import { AssistantMessage } from './AssistantMessage';
import { UserMessage } from './UserMessage';
import { classNames } from '~/utils/classNames';

interface MessagesProps {
id?: string;
Expand Down
2 changes: 1 addition & 1 deletion app/components/chat/UserMessage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { modificationsRegex } from '~/utils/diff';
import { Markdown } from './Markdown';
import { modificationsRegex } from '~/utils/diff';

interface UserMessageProps {
content: string;
Expand Down
20 changes: 10 additions & 10 deletions app/components/editor/codemirror/CodeMirrorEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ import {
type Tooltip,
} from '@codemirror/view';
import { memo, useEffect, useRef, useState, type MutableRefObject } from 'react';
import type { Theme } from '~/types/theme';
import { classNames } from '~/utils/classNames';
import { debounce } from '~/utils/debounce';
import { createScopedLogger, renderLogger } from '~/utils/logger';
import { BinaryContent } from './BinaryContent';
import { getTheme, reconfigureTheme } from './cm-theme';
import { indentKeyBinding } from './indent';
import { getLanguage } from './languages';
import type { Theme } from '~/types/theme';
import { classNames } from '~/utils/classNames';
import { debounce } from '~/utils/debounce';
import { createScopedLogger, renderLogger } from '~/utils/logger';

const logger = createScopedLogger('CodeMirrorEditor');

Expand Down Expand Up @@ -135,10 +135,10 @@ export const CodeMirrorEditor = memo(
const [languageCompartment] = useState(new Compartment());

const containerRef = useRef<HTMLDivElement | null>(null);
const viewRef = useRef<EditorView>();
const themeRef = useRef<Theme>();
const docRef = useRef<EditorDocument>();
const editorStatesRef = useRef<EditorStates>();
const viewRef = useRef<EditorView | null>(null);
const themeRef = useRef<Theme | null>(null);
const docRef = useRef<EditorDocument | null>(null);
const editorStatesRef = useRef<EditorStates | null>(null);
const onScrollRef = useRef(onScroll);
const onChangeRef = useRef(onChange);
const onSaveRef = useRef(onSave);
Expand All @@ -151,7 +151,7 @@ export const CodeMirrorEditor = memo(
onScrollRef.current = onScroll;
onChangeRef.current = onChange;
onSaveRef.current = onSave;
docRef.current = doc;
docRef.current = doc ?? null;
themeRef.current = theme;
});

Expand Down Expand Up @@ -188,7 +188,7 @@ export const CodeMirrorEditor = memo(

return () => {
viewRef.current?.destroy();
viewRef.current = undefined;
viewRef.current = null;
};
}, []);

Expand Down
2 changes: 1 addition & 1 deletion app/components/editor/codemirror/cm-theme.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Compartment, type Extension } from '@codemirror/state';
import { EditorView } from '@codemirror/view';
import { vscodeDark, vscodeLight } from '@uiw/codemirror-theme-vscode';
import type { Theme } from '~/types/theme.js';
import type { EditorSettings } from './CodeMirrorEditor.js';
import type { Theme } from '~/types/theme.js';

export const darkTheme = EditorView.theme({}, { dark: true });
export const themeSelection = new Compartment();
Expand Down
4 changes: 2 additions & 2 deletions app/components/header/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useStore } from '@nanostores/react';
import { ClientOnly } from 'remix-utils/client-only';
import { chatStore } from '~/lib/stores/chat';
import { classNames } from '~/utils/classNames';
import { HeaderActionButtons } from './HeaderActionButtons.client';
import { ChatDescription } from '~/lib/persistence/ChatDescription.client';
import { chatStore } from '~/lib/stores/chat';
import { classNames } from '~/utils/classNames';

export function Header() {
const chat = useStore(chatStore);
Expand Down
2 changes: 1 addition & 1 deletion app/components/header/HeaderActionButtons.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function HeaderActionButtons({}: HeaderActionButtonsProps) {
}
}}
>
<div className="i-bolt:chat text-sm" />
<div className="i-ph:chat-text-bold" />
</Button>
<div className="w-[1px] bg-bolt-elements-borderColor" />
<Button
Expand Down
5 changes: 2 additions & 3 deletions app/components/sidebar/Menu.client.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { motion, type Variants } from 'framer-motion';
import { useCallback, useEffect, useRef, useState } from 'react';
import { toast } from 'react-toastify';
import { HistoryItem } from './HistoryItem';
import { binDates } from './date-binning';
import { Dialog, DialogButton, DialogDescription, DialogRoot, DialogTitle } from '~/components/ui/Dialog';
import { IconButton } from '~/components/ui/IconButton';
import { ThemeSwitch } from '~/components/ui/ThemeSwitch';
import { db, deleteById, getAll, chatId, type ChatHistoryItem } from '~/lib/persistence';
import { cubicEasingFn } from '~/utils/easings';
import { logger } from '~/utils/logger';
import { HistoryItem } from './HistoryItem';
import { binDates } from './date-binning';

const menuVariants = {
closed: {
Expand Down
2 changes: 1 addition & 1 deletion app/components/ui/Dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as RadixDialog from '@radix-ui/react-dialog';
import { motion, type Variants } from 'framer-motion';
import React, { memo, type ReactNode } from 'react';
import { IconButton } from './IconButton';
import { classNames } from '~/utils/classNames';
import { cubicEasingFn } from '~/utils/easings';
import { IconButton } from './IconButton';

export { Close as DialogClose, Root as DialogRoot } from '@radix-ui/react-dialog';

Expand Down
3 changes: 2 additions & 1 deletion app/components/ui/IconButton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as React from 'react';
import { memo } from 'react';
import { classNames } from '~/utils/classNames';

Expand All @@ -20,7 +21,7 @@ type IconButtonWithoutChildrenProps = {

type IconButtonWithChildrenProps = {
icon?: undefined;
children: string | JSX.Element | JSX.Element[];
children: string | React.ReactElement | React.ReactElement[];
} & BaseIconButtonProps;

type IconButtonProps = IconButtonWithoutChildrenProps | IconButtonWithChildrenProps;
Expand Down
3 changes: 2 additions & 1 deletion app/components/ui/PanelHeaderButton.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import * as React from 'react';
import { memo } from 'react';
import { classNames } from '~/utils/classNames';

interface PanelHeaderButtonProps {
className?: string;
disabledClassName?: string;
disabled?: boolean;
children: string | JSX.Element | Array<JSX.Element | string>;
children: string | React.ReactElement | Array<React.ReactElement | string>;
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
}

Expand Down
3 changes: 2 additions & 1 deletion app/components/ui/Slider.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { motion } from 'framer-motion';
import * as React from 'react';
import { memo } from 'react';
import { classNames } from '~/utils/classNames';
import { cubicEasingFn } from '~/utils/easings';
Expand Down Expand Up @@ -37,7 +38,7 @@ export const Slider = genericMemo(<T,>({ selected, options, setSelected }: Slide

interface SliderButtonProps {
selected: boolean;
children: string | JSX.Element | Array<JSX.Element | string>;
children: string | React.ReactElement | Array<React.ReactElement | string>;
setSelected: () => void;
}

Expand Down
2 changes: 1 addition & 1 deletion app/components/ui/ThemeSwitch.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useStore } from '@nanostores/react';
import { memo, useEffect, useState } from 'react';
import { themeStore, toggleTheme } from '~/lib/stores/theme';
import { IconButton } from './IconButton';
import { themeStore, toggleTheme } from '~/lib/stores/theme';

interface ThemeSwitchProps {
className?: string;
Expand Down
6 changes: 3 additions & 3 deletions app/components/workbench/EditorPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { useStore } from '@nanostores/react';
import { memo, useEffect, useMemo, useRef, useState } from 'react';
import { Panel, PanelGroup, PanelResizeHandle, type ImperativePanelHandle } from 'react-resizable-panels';
import { FileBreadcrumb } from './FileBreadcrumb';
import { FileTree } from './FileTree';
import { Terminal, type TerminalRef } from './terminal/Terminal';
import {
CodeMirrorEditor,
type EditorDocument,
Expand All @@ -20,9 +23,6 @@ import { classNames } from '~/utils/classNames';
import { WORK_DIR } from '~/utils/constants';
import { renderLogger } from '~/utils/logger';
import { isMobile } from '~/utils/mobile';
import { FileBreadcrumb } from './FileBreadcrumb';
import { FileTree } from './FileTree';
import { Terminal, type TerminalRef } from './terminal/Terminal';

interface EditorPanelProps {
files?: FileMap;
Expand Down
6 changes: 4 additions & 2 deletions app/components/workbench/FileBreadcrumb.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
import { AnimatePresence, motion, type Variants } from 'framer-motion';
import { memo, useEffect, useRef, useState } from 'react';
import FileTree from './FileTree';
import type { FileMap } from '~/lib/stores/files';
import { classNames } from '~/utils/classNames';
import { WORK_DIR } from '~/utils/constants';
import { cubicEasingFn } from '~/utils/easings';
import { renderLogger } from '~/utils/logger';
import FileTree from './FileTree';

const WORK_DIR_REGEX = new RegExp(`^${WORK_DIR.split('/').slice(0, -1).join('/').replaceAll('/', '\\/')}/`);

Expand Down Expand Up @@ -87,7 +87,9 @@ export const FileBreadcrumb = memo<FileBreadcrumbProps>(({ files, pathSegments =
<DropdownMenu.Root open={isActive} modal={false}>
<DropdownMenu.Trigger asChild>
<span
ref={(ref) => (segmentRefs.current[index] = ref)}
ref={(ref) => {
segmentRefs.current[index] = ref;
}}
className={classNames('flex items-center gap-1.5 cursor-pointer shrink-0', {
'text-bolt-elements-textTertiary hover:text-bolt-elements-textPrimary': !isActive,
'text-bolt-elements-textPrimary underline': isActive,
Expand Down
2 changes: 1 addition & 1 deletion app/components/workbench/Preview.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useStore } from '@nanostores/react';
import { memo, useCallback, useEffect, useRef, useState } from 'react';
import { PortDropdown } from './PortDropdown';
import { IconButton } from '~/components/ui/IconButton';
import { workbenchStore } from '~/lib/stores/workbench';
import { PortDropdown } from './PortDropdown';

export const Preview = memo(() => {
const iframeRef = useRef<HTMLIFrameElement>(null);
Expand Down
7 changes: 4 additions & 3 deletions app/components/workbench/Workbench.client.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { useStore } from '@nanostores/react';
import { motion, type HTMLMotionProps, type Variants } from 'framer-motion';
import { computed } from 'nanostores';
import * as React from 'react';
import { memo, useCallback, useEffect } from 'react';
import { toast } from 'react-toastify';
import { EditorPanel } from './EditorPanel';
import { Preview } from './Preview';
import {
type OnChangeCallback as OnEditorChange,
type OnScrollCallback as OnEditorScroll,
Expand All @@ -14,8 +17,6 @@ import { workbenchStore, type WorkbenchViewType } from '~/lib/stores/workbench';
import { classNames } from '~/utils/classNames';
import { cubicEasingFn } from '~/utils/easings';
import { renderLogger } from '~/utils/logger';
import { EditorPanel } from './EditorPanel';
import { Preview } from './Preview';

interface WorkspaceProps {
chatStarted?: boolean;
Expand Down Expand Up @@ -175,7 +176,7 @@ export const Workbench = memo(({ chatStarted, isStreaming }: WorkspaceProps) =>
});

interface ViewProps extends HTMLMotionProps<'div'> {
children: JSX.Element;
children: React.ReactElement;
}

const View = memo(({ children, ...props }: ViewProps) => {
Expand Down
4 changes: 2 additions & 2 deletions app/components/workbench/terminal/Terminal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { FitAddon } from '@xterm/addon-fit';
import { WebLinksAddon } from '@xterm/addon-web-links';
import { Terminal as XTerm } from '@xterm/xterm';
import { forwardRef, memo, useEffect, useImperativeHandle, useRef } from 'react';
import { getTerminalTheme } from './theme';
import type { Theme } from '~/lib/stores/theme';
import { createScopedLogger } from '~/utils/logger';
import { getTerminalTheme } from './theme';

const logger = createScopedLogger('Terminal');

Expand All @@ -23,7 +23,7 @@ export interface TerminalProps {
export const Terminal = memo(
forwardRef<TerminalRef, TerminalProps>(({ className, theme, readonly, onTerminalReady, onTerminalResize }, ref) => {
const terminalElementRef = useRef<HTMLDivElement>(null);
const terminalRef = useRef<XTerm>();
const terminalRef = useRef<XTerm | null>(null);

useEffect(() => {
const element = terminalElementRef.current!;
Expand Down
2 changes: 1 addition & 1 deletion app/lib/.server/llm/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ export function getAnthropicModel(apiKey: string) {
apiKey,
});

return anthropic('claude-3-5-sonnet-20240620');
return anthropic('claude-3-5-sonnet-20241022');
}
Loading
Loading