Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"quickFix.biome": "explicit",
"source.organizeImports.biome": "explicit"
},
}
6 changes: 3 additions & 3 deletions src/components/ai-chat/ai-chat-input-bar.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Send, Square } from "lucide-react";
import { useCallback, useEffect, useRef } from "react";
import { usePersistentSettingsStore } from "../../settings/stores/persistent-settings-store";
import { useAIChatStore } from "../../stores/ai-chat/store";
import { cn } from "../../utils/cn";
import { usePersistentSettingsStore } from "@/settings/stores/persistent-settings-store";
import { useAIChatStore } from "@/stores/ai-chat/store";
import { cn } from "@/utils/cn";
import ModelProviderSelector from "../model-provider-selector";
import Button from "../ui/button";
import { ContextSelector } from "./context-selector";
Expand Down
16 changes: 8 additions & 8 deletions src/components/ai-chat/ai-chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ import { invoke } from "@tauri-apps/api/core";
import { MessageSquare, Plus, Sparkles } from "lucide-react";
import type React from "react";
import { useCallback, useEffect, useRef, useState } from "react";
import { usePersistentSettingsStore } from "../../settings/stores/persistent-settings-store";
import { useAIChatStore } from "../../stores/ai-chat/store";
import { useProjectStore } from "../../stores/project-store";
import { usePersistentSettingsStore } from "@/settings/stores/persistent-settings-store";
import { useAIChatStore } from "@/stores/ai-chat/store";
import { useProjectStore } from "@/stores/project-store";
import {
getAvailableProviders,
getProviderById,
setClaudeCodeAvailability,
} from "../../types/ai-provider";
import type { ClaudeStatus } from "../../types/claude";
import { getChatCompletionStream } from "../../utils/ai-chat";
import { cn } from "../../utils/cn";
import type { ContextInfo } from "../../utils/types";
} from "@/types/ai-provider";
import type { ClaudeStatus } from "@/types/claude";
import { getChatCompletionStream } from "@/utils/ai-chat";
import { cn } from "@/utils/cn";
import type { ContextInfo } from "@/utils/types";
import ApiKeyModal from "../api-key-modal";
import AIChatInputBar from "./ai-chat-input-bar";
import ChatHistoryModal from "./chat-history-modal";
Expand Down
2 changes: 1 addition & 1 deletion src/components/ai-chat/chat-history-modal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { MessageSquare, Search, Trash2, X } from "lucide-react";
import { useState } from "react";
import { cn } from "../../utils/cn";
import { cn } from "@/utils/cn";
import type { ChatHistoryModalProps } from "./types";
import { getRelativeTime } from "./utils";

Expand Down
14 changes: 7 additions & 7 deletions src/components/ai-chat/file-mention-dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Search } from "lucide-react";
import React, { useEffect, useMemo, useRef, useState } from "react";
import { createPortal } from "react-dom";
import { EDITOR_CONSTANTS } from "../../constants/editor-constants";
import FileIcon from "../../file-explorer/views/file.icon";
import { useFileSystemStore } from "../../file-system/controllers/store";
import type { FileEntry } from "../../file-system/models/app";
import { useAIChatStore } from "../../stores/ai-chat/store";
import { useProjectStore } from "../../stores/project-store";
import { cn } from "../../utils/cn";
import { EDITOR_CONSTANTS } from "@/constants/editor-constants";
import FileIcon from "@/file-explorer/views/file.icon";
import { useFileSystemStore } from "@/file-system/controllers/store";
import type { FileEntry } from "@/file-system/models/app";
import { useAIChatStore } from "@/stores/ai-chat/store";
import { useProjectStore } from "@/stores/project-store";
import { cn } from "@/utils/cn";
import { IGNORED_PATTERNS } from "../command/constants/ignored-patterns";

interface FileMentionDropdownProps {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ai-chat/mention-utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { invoke } from "@tauri-apps/api/core";
import type { FileEntry } from "../../file-system/models/app";
import type { FileEntry } from "@/file-system/models/app";

interface MentionedFile {
name: string;
Expand Down
2 changes: 1 addition & 1 deletion src/components/ai-chat/tool-call-display.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
} from "lucide-react";
import type React from "react";
import { useState } from "react";
import { cn } from "../../utils/cn";
import { cn } from "@/utils/cn";
import "./tool-call-display.css";

interface ToolCallDisplayProps {
Expand Down
4 changes: 2 additions & 2 deletions src/components/ai-chat/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type React from "react";
import type { FileEntry } from "../../file-system/models/app";
import type { Buffer } from "../../types/buffer";
import type { FileEntry } from "@/file-system/models/app";
import type { Buffer } from "@/types/buffer";

interface ToolCall {
name: string;
Expand Down
8 changes: 4 additions & 4 deletions src/components/command/components/command-bar.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ClockIcon, File } from "lucide-react";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import { IGNORED_PATTERNS } from "@/components/command/constants/ignored-patterns";
import { useRecentFilesStore } from "../../../file-system/controllers/recent-files-store";
import { useFileSystemStore } from "../../../file-system/controllers/store";
import { useBufferStore } from "../../../stores/buffer-store";
import { useUIState } from "../../../stores/ui-state-store";
import { useRecentFilesStore } from "@/file-system/controllers/recent-files-store";
import { useFileSystemStore } from "@/file-system/controllers/store";
import { useBufferStore } from "@/stores/buffer-store";
import { useUIState } from "@/stores/ui-state-store";
import Command, {
CommandEmpty,
CommandHeader,
Expand Down
4 changes: 2 additions & 2 deletions src/components/command/components/command-palette.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Palette, Settings, Sparkles } from "lucide-react";
import type React from "react";
import { useEffect, useRef, useState } from "react";
import { useAppStore } from "../../../stores/app-store";
import { useUIState } from "../../../stores/ui-state-store";
import { useAppStore } from "@/stores/app-store";
import { useUIState } from "@/stores/ui-state-store";
import Command, {
CommandEmpty,
CommandHeader,
Expand Down
4 changes: 2 additions & 2 deletions src/components/command/components/theme-selector.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Monitor, Moon, Palette, Sun, Upload } from "lucide-react";
import type React from "react";
import { useCallback, useEffect, useRef, useState } from "react";
import { themeRegistry } from "../../../extensions/themes/theme-registry";
import type { ThemeDefinition } from "../../../extensions/themes/types";
import { themeRegistry } from "@/extensions/themes/theme-registry";
import type { ThemeDefinition } from "@/extensions/themes/types";
import Button from "../../ui/button";
import Command, {
CommandEmpty,
Expand Down
2 changes: 1 addition & 1 deletion src/components/diff-viewer/diff-header.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Edit3, Eye, EyeOff, FileIcon, FilePlus, FileX, Hash, X } from "lucide-react";
import { memo } from "react";
import { cn } from "../../utils/cn";
import { cn } from "@/utils/cn";
import { getFileStatus } from "./utils/diff-helpers";
import type { DiffHeaderProps } from "./utils/types";

Expand Down
2 changes: 1 addition & 1 deletion src/components/diff-viewer/diff-hunk-header.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChevronDown, ChevronRight, Copy, Minus, Plus } from "lucide-react";
import { cn } from "../../utils/cn";
import { cn } from "@/utils/cn";
import { copyLineContent, createGitHunk } from "./utils/diff-helpers";
import type { DiffHunkHeaderProps } from "./utils/types";

Expand Down
2 changes: 1 addition & 1 deletion src/components/diff-viewer/diff-line.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Copy } from "lucide-react";
import { memo } from "react";
import { cn } from "../../utils/cn";
import { cn } from "@/utils/cn";
import { copyLineContent } from "./utils/diff-helpers";
import type { DiffLineProps } from "./utils/types";

Expand Down
4 changes: 2 additions & 2 deletions src/components/diff-viewer/diff-viewer.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { RefreshCw, X } from "lucide-react";
import { useCallback, useState } from "react";
import { useBufferStore } from "../../stores/buffer-store";
import { cn } from "../../utils/cn";
import { useBufferStore } from "@/stores/buffer-store";
import { cn } from "@/utils/cn";
import { DiffHeader } from "./diff-header";
import { useDiffData } from "./hooks/useDiffData";
import { useDiffViewState } from "./hooks/useDiffViewState";
Expand Down
8 changes: 4 additions & 4 deletions src/components/diff-viewer/hooks/useDiffData.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useCallback, useEffect, useRef, useState } from "react";
import { useFileSystemStore } from "../../../file-system/controllers/store";
import { useBufferStore } from "../../../stores/buffer-store";
import type { GitDiff } from "../../../utils/git";
import { getFileDiff } from "../../../utils/git";
import { useFileSystemStore } from "@/file-system/controllers/store";
import { useBufferStore } from "@/stores/buffer-store";
import type { GitDiff } from "@/utils/git";
import { getFileDiff } from "@/utils/git";

interface UseDiffDataReturn {
diff: GitDiff | null;
Expand Down
2 changes: 1 addition & 1 deletion src/components/diff-viewer/image-diff-viewer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FileIcon, FilePlus, FileX, Minus, Plus, RotateCcw, X } from "lucide-react";
import { memo, useState } from "react";
import { cn } from "../../utils/cn";
import { cn } from "@/utils/cn";
import Button from "../ui/button";
import { getImgSrc } from "./utils/diff-helpers";
import type { ImageContainerProps, ImageDiffViewerProps } from "./utils/types";
Expand Down
2 changes: 1 addition & 1 deletion src/components/diff-viewer/multi-file-diff-viewer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ChevronDown, ChevronRight, FileIcon, FilePlus, FileText, FileX } from "lucide-react";
import { memo, useCallback, useMemo, useState } from "react";
import type { GitDiff } from "../../utils/git";
import type { GitDiff } from "@/utils/git";
import { DiffHeader } from "./diff-header";
import { ImageDiffViewer } from "./image-diff-viewer";
import { TextDiffViewer } from "./text-diff-viewer";
Expand Down
2 changes: 1 addition & 1 deletion src/components/diff-viewer/text-diff-viewer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FileIcon } from "lucide-react";
import { memo } from "react";
import { cn } from "../../utils/cn";
import { cn } from "@/utils/cn";
import { DiffHunkHeader } from "./diff-hunk-header";
import { DiffLine } from "./diff-line";
import { useDiffViewState } from "./hooks/useDiffViewState";
Expand Down
2 changes: 1 addition & 1 deletion src/components/diff-viewer/utils/diff-helpers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GitDiff, GitDiffLine, GitHunk } from "../../../utils/git";
import type { GitDiff, GitDiffLine, GitHunk } from "@/utils/git";
import type { ParsedHunk } from "./types";

export const createGitHunk = (
Expand Down
2 changes: 1 addition & 1 deletion src/components/diff-viewer/utils/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GitDiff, GitDiffLine, GitHunk } from "../../../utils/git";
import type { GitDiff, GitDiffLine, GitHunk } from "@/utils/git";

export interface DiffViewerProps {
onStageHunk?: (hunk: GitHunk) => void;
Expand Down
14 changes: 7 additions & 7 deletions src/components/editor/breadcrumb.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { ArrowLeft, ChevronRight, Search } from "lucide-react";
import { useEffect, useRef, useState } from "react";
import { createPortal } from "react-dom";
import { EDITOR_CONSTANTS } from "../../constants/editor-constants";
import FileIcon from "../../file-explorer/views/file.icon";
import { readDirectory } from "../../file-system/controllers/platform";
import { useFileSystemStore } from "../../file-system/controllers/store";
import type { FileEntry } from "../../file-system/models/app";
import { useBufferStore } from "../../stores/buffer-store";
import { useUIState } from "../../stores/ui-state-store";
import { EDITOR_CONSTANTS } from "@/constants/editor-constants";
import FileIcon from "@/file-explorer/views/file.icon";
import { readDirectory } from "@/file-system/controllers/platform";
import { useFileSystemStore } from "@/file-system/controllers/store";
import type { FileEntry } from "@/file-system/models/app";
import { useBufferStore } from "@/stores/buffer-store";
import { useUIState } from "@/stores/ui-state-store";

export default function Breadcrumb() {
const buffers = useBufferStore.use.buffers();
Expand Down
24 changes: 12 additions & 12 deletions src/components/editor/code-editor.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import type React from "react";
import { useEffect, useMemo, useRef } from "react";
import { useFileSystemStore } from "../../file-system/controllers/store";
import { useEditorScroll } from "../../hooks/use-editor-scroll";
import { useHover } from "../../hooks/use-hover";
import { LspClient } from "../../lib/lsp/lsp-client";
import { usePersistentSettingsStore } from "../../settings/stores/persistent-settings-store";
import { useAppStore } from "../../stores/app-store";
import { useBufferStore } from "../../stores/buffer-store";
import { useEditorCursorStore } from "../../stores/editor-cursor-store";
import { useEditorInstanceStore } from "../../stores/editor-instance-store";
import { useEditorSearchStore } from "../../stores/editor-search-store";
import { useEditorSettingsStore } from "../../stores/editor-settings-store";
import { useLspStore } from "../../stores/lsp-store";
import { useFileSystemStore } from "@/file-system/controllers/store";
import { useEditorScroll } from "@/hooks/use-editor-scroll";
import { useHover } from "@/hooks/use-hover";
import { LspClient } from "@/lib/lsp/lsp-client";
import { usePersistentSettingsStore } from "@/settings/stores/persistent-settings-store";
import { useAppStore } from "@/stores/app-store";
import { useBufferStore } from "@/stores/buffer-store";
import { useEditorCursorStore } from "@/stores/editor-cursor-store";
import { useEditorInstanceStore } from "@/stores/editor-instance-store";
import { useEditorSearchStore } from "@/stores/editor-search-store";
import { useEditorSettingsStore } from "@/stores/editor-settings-store";
import { useLspStore } from "@/stores/lsp-store";
import FindBar from "../find-bar";
import Breadcrumb from "./breadcrumb";
import { TextEditor } from "./core/text-editor";
Expand Down
2 changes: 1 addition & 1 deletion src/components/editor/core/editor-layers.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type React from "react";
import { createContext, memo, useContext, useMemo } from "react";
import { EDITOR_CONSTANTS } from "../../../constants/editor-constants";
import { EDITOR_CONSTANTS } from "@/constants/editor-constants";

type LayerType = "base" | "decoration" | "selection" | "overlay";

Expand Down
14 changes: 7 additions & 7 deletions src/components/editor/core/line-based-editor.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { memo, useEffect, useRef } from "react";
import { useEditorInteractions } from "../../../hooks/use-editor-interactions";
import { useEditorLayout } from "../../../hooks/use-editor-layout";
import { useEditorLayoutStore } from "../../../stores/editor-layout-store";
import { useEditorSettingsStore } from "../../../stores/editor-settings-store";
import type { Position } from "../../../types/editor-types";
import { useEditorInteractions } from "@/hooks/use-editor-interactions";
import { useEditorLayout } from "@/hooks/use-editor-layout";
import { useEditorLayoutStore } from "@/stores/editor-layout-store";
import { useEditorSettingsStore } from "@/stores/editor-settings-store";
import type { Position } from "@/types/editor-types";
import { Cursor } from "../overlays/cursor";
import { DecorationLayer } from "../overlays/decoration-layer";
import { EditorViewport } from "../rendering/editor-viewport";
import { EditorLayer, EditorLayers } from "./editor-layers";
import "../../../styles/editor-line-based.css";
import "../../../styles/token-theme.css";
import "@/styles/editor-line-based.css";
import "@/styles/token-theme.css";

interface LineBasedEditorProps {
onPositionClick?: (position: Position) => void;
Expand Down
33 changes: 15 additions & 18 deletions src/components/editor/core/text-editor.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
import { readText } from "@tauri-apps/plugin-clipboard-manager";
import { useCallback, useEffect, useRef, useState } from "react";
import { basicEditingExtension } from "../../../extensions/basic-editing-extension";
import { editorAPI } from "../../../extensions/editor-api";
import { extensionManager } from "../../../extensions/extension-manager";
import { basicEditingExtension } from "@/extensions/basic-editing-extension";
import { editorAPI } from "@/extensions/editor-api";
import { extensionManager } from "@/extensions/extension-manager";
import {
setSyntaxHighlightingFilePath,
syntaxHighlightingExtension,
} from "../../../extensions/syntax-highlighting-extension";
import { useEditorLayout } from "../../../hooks/use-editor-layout";
import { useBufferStore } from "../../../stores/buffer-store";
import { useEditorCompletionStore } from "../../../stores/editor-completion-store";
import { useEditorCursorStore } from "../../../stores/editor-cursor-store";
import { useEditorInstanceStore } from "../../../stores/editor-instance-store";
import { useEditorLayoutStore } from "../../../stores/editor-layout-store";
import { useEditorSettingsStore } from "../../../stores/editor-settings-store";
import { useEditorViewStore } from "../../../stores/editor-view-store";
import { useLspStore } from "../../../stores/lsp-store";
import type { Position } from "../../../types/editor-types";
import {
calculateCursorPosition,
calculateOffsetFromPosition,
} from "../../../utils/editor-position";
} from "@/extensions/syntax-highlighting-extension";
import { useEditorLayout } from "@/hooks/use-editor-layout";
import { useBufferStore } from "@/stores/buffer-store";
import { useEditorCompletionStore } from "@/stores/editor-completion-store";
import { useEditorCursorStore } from "@/stores/editor-cursor-store";
import { useEditorInstanceStore } from "@/stores/editor-instance-store";
import { useEditorLayoutStore } from "@/stores/editor-layout-store";
import { useEditorSettingsStore } from "@/stores/editor-settings-store";
import { useEditorViewStore } from "@/stores/editor-view-store";
import { useLspStore } from "@/stores/lsp-store";
import type { Position } from "@/types/editor-types";
import { calculateCursorPosition, calculateOffsetFromPosition } from "@/utils/editor-position";
import { CompletionDropdown } from "../overlays/completion-dropdown";
import EditorContextMenu from "../overlays/editor-context-menu";
import { LineBasedEditor } from "./line-based-editor";
Expand Down
12 changes: 6 additions & 6 deletions src/components/editor/overlays/completion-dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { memo } from "react";
import type { CompletionItem } from "vscode-languageserver-protocol";
import { EDITOR_CONSTANTS } from "../../../constants/editor-constants";
import { useEditorLayout } from "../../../hooks/use-editor-layout";
import { useEditorCompletionStore } from "../../../stores/editor-completion-store";
import { useEditorCursorStore } from "../../../stores/editor-cursor-store";
import { useEditorLayoutStore } from "../../../stores/editor-layout-store";
import { highlightMatches } from "../../../utils/fuzzy-matcher";
import { EDITOR_CONSTANTS } from "@/constants/editor-constants";
import { useEditorLayout } from "@/hooks/use-editor-layout";
import { useEditorCompletionStore } from "@/stores/editor-completion-store";
import { useEditorCursorStore } from "@/stores/editor-cursor-store";
import { useEditorLayoutStore } from "@/stores/editor-layout-store";
import { highlightMatches } from "@/utils/fuzzy-matcher";

interface CompletionDropdownProps {
onApplyCompletion?: (completion: CompletionItem) => void;
Expand Down
6 changes: 3 additions & 3 deletions src/components/editor/overlays/cursor.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useRef } from "react";
import { useEditorLayout } from "../../../hooks/use-editor-layout";
import { useEditorCursorStore } from "../../../stores/editor-cursor-store";
import { useEditorLayoutStore } from "../../../stores/editor-layout-store";
import { useEditorLayout } from "@/hooks/use-editor-layout";
import { useEditorCursorStore } from "@/stores/editor-cursor-store";
import { useEditorLayoutStore } from "@/stores/editor-layout-store";

interface CursorRendererProps {
visible?: boolean;
Expand Down
14 changes: 7 additions & 7 deletions src/components/editor/overlays/decoration-layer.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { useMemo } from "react";
import { useShallow } from "zustand/react/shallow";
import { extensionManager } from "../../../extensions/extension-manager";
import { useEditorLayout } from "../../../hooks/use-editor-layout";
import { useEditorCursorStore } from "../../../stores/editor-cursor-store";
import { useEditorDecorationsStore } from "../../../stores/editor-decorations-store";
import { useEditorLayoutStore } from "../../../stores/editor-layout-store";
import { useEditorViewStore } from "../../../stores/editor-view-store";
import type { Decoration, Position } from "../../../types/editor-types";
import { extensionManager } from "@/extensions/extension-manager";
import { useEditorLayout } from "@/hooks/use-editor-layout";
import { useEditorCursorStore } from "@/stores/editor-cursor-store";
import { useEditorDecorationsStore } from "@/stores/editor-decorations-store";
import { useEditorLayoutStore } from "@/stores/editor-layout-store";
import { useEditorViewStore } from "@/stores/editor-view-store";
import type { Decoration, Position } from "@/types/editor-types";

interface RenderedDecoration {
key: string;
Expand Down
Loading
Loading