Skip to content

Commit 5f50395

Browse files
committed
refactor: replace relative imports with aliases
1 parent 33516b8 commit 5f50395

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1655
-643
lines changed

src/api/generated.ts

Lines changed: 1452 additions & 484 deletions
Large diffs are not rendered by default.

src/api/posthogClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { buildApiFetcher } from "@api/fetcher";
2+
import { createApiClient, type Schemas } from "@api/generated";
13
import type { RepositoryConfig } from "@shared/types";
2-
import { buildApiFetcher } from "./fetcher";
3-
import { createApiClient, type Schemas } from "./generated";
44

55
export class PostHogAPIClient {
66
private api: ReturnType<typeof createApiClient>;

src/main/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ import dns from "node:dns";
22
import { mkdirSync } from "node:fs";
33
import path from "node:path";
44
import { fileURLToPath } from "node:url";
5+
import { registerAgentIpc, type TaskController } from "@main/services/agent";
6+
import { registerFsIpc } from "@main/services/fs";
7+
import { registerOsIpc } from "@main/services/os";
8+
import { registerPosthogIpc } from "@main/services/posthog";
59
import {
610
app,
711
BrowserWindow,
812
Menu,
913
type MenuItemConstructorOptions,
1014
shell,
1115
} from "electron";
12-
import { registerAgentIpc, type TaskController } from "./services/agent.js";
13-
import { registerFsIpc } from "./services/fs.js";
14-
import { registerOsIpc } from "./services/os.js";
15-
import { registerPosthogIpc } from "./services/posthog.js";
1616

1717
const __filename = fileURLToPath(import.meta.url);
1818
const __dirname = path.dirname(__filename);

src/renderer/App.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Flex, Spinner, Text } from "@radix-ui/themes";
2+
import { AuthScreen } from "@renderer/components/AuthScreen";
3+
import { MainLayout } from "@renderer/components/MainLayout";
4+
import { useAuthStore } from "@renderer/stores/authStore";
25
import { useEffect, useState } from "react";
3-
import { AuthScreen } from "./components/AuthScreen";
4-
import { MainLayout } from "./components/MainLayout";
5-
import { useAuthStore } from "./stores/authStore";
66

77
function App() {
88
const { isAuthenticated, checkAuth } = useAuthStore();

src/renderer/components/AuthScreen.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ import {
99
Text,
1010
TextField,
1111
} from "@radix-ui/themes";
12+
import { AsciiArt } from "@renderer/components/AsciiArt";
13+
import { useAuthStore } from "@renderer/stores/authStore";
1214
import { useMutation } from "@tanstack/react-query";
1315
import type React from "react";
1416
import { useId, useState } from "react";
15-
import { useAuthStore } from "../stores/authStore";
16-
import { AsciiArt } from "./AsciiArt";
1717

1818
export function AuthScreen() {
1919
const apiKeyId = useId();

src/renderer/components/Combobox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { CheckIcon, ChevronDownIcon } from "@radix-ui/react-icons";
22
import { Box, Button, Flex, Popover, Text, TextField } from "@radix-ui/themes";
3+
import { Command } from "@renderer/components/command";
34
import { type ReactNode, useMemo, useState } from "react";
4-
import { Command } from "./command";
55

66
interface ComboboxItem {
77
value: string;

src/renderer/components/FolderPicker.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { Folder } from "@phosphor-icons/react";
22
import { ChevronDownIcon } from "@radix-ui/react-icons";
33
import { Box, Button, Flex, Popover, Text, TextField } from "@radix-ui/themes";
4+
import { Command } from "@renderer/components/command";
5+
import { useFolderPickerStore } from "@renderer/stores/folderPickerStore";
46
import { useEffect, useRef, useState } from "react";
57
import { useHotkeys } from "react-hotkeys-hook";
6-
import { useFolderPickerStore } from "../stores/folderPickerStore";
7-
import { Command } from "./command";
88

99
interface FolderPickerProps {
1010
value: string;

src/renderer/components/LogView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import {
1010
Text,
1111
Tooltip,
1212
} from "@radix-ui/themes";
13+
import { LogEventRenderer } from "@renderer/components/log/LogEventRenderer";
14+
import { TodoGroupView } from "@renderer/components/log/TodoGroupView";
1315
import { useEffect, useMemo, useRef, useState } from "react";
14-
import { LogEventRenderer } from "./log/LogEventRenderer";
15-
import { TodoGroupView } from "./log/TodoGroupView";
1616

1717
interface LogViewProps {
1818
logs: AgentEvent[];

src/renderer/components/MainLayout.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import { Box, Flex } from "@radix-ui/themes";
2+
import { CommandMenu } from "@renderer/components/command";
3+
import { SettingsView } from "@renderer/components/SettingsView";
4+
import { StatusBar } from "@renderer/components/StatusBar";
5+
import { TabBar } from "@renderer/components/TabBar";
6+
import { TaskCreate } from "@renderer/components/TaskCreate";
7+
import { TaskDetail } from "@renderer/components/TaskDetail";
8+
import { TaskList } from "@renderer/components/TaskList";
9+
import { WorkflowForm } from "@renderer/components/WorkflowForm";
10+
import { WorkflowView } from "@renderer/components/WorkflowView";
11+
import { useIntegrations } from "@renderer/hooks/useIntegrations";
12+
import { useTabStore } from "@renderer/stores/tabStore";
213
import type { Task } from "@shared/types";
314
import { useState } from "react";
415
import { useHotkeys } from "react-hotkeys-hook";
5-
import { useIntegrations } from "../hooks/useIntegrations";
6-
import { useTabStore } from "../stores/tabStore";
7-
import { CommandMenu } from "./command";
8-
import { SettingsView } from "./SettingsView";
9-
import { StatusBar } from "./StatusBar";
10-
import { TabBar } from "./TabBar";
11-
import { TaskCreate } from "./TaskCreate";
12-
import { TaskDetail } from "./TaskDetail";
13-
import { TaskList } from "./TaskList";
14-
import { WorkflowForm } from "./WorkflowForm";
15-
import { WorkflowView } from "./WorkflowView";
1616

1717
export function MainLayout() {
1818
const { activeTabId, tabs, createTab, setActiveTab } = useTabStore();

src/renderer/components/RichTextEditor.tsx

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
import { Box } from "@radix-ui/themes";
2+
import {
3+
MentionList,
4+
type MentionListRef,
5+
} from "@renderer/components/FileMentionList";
6+
import { FormattingToolbar } from "@renderer/components/FormattingToolbar";
7+
import {
8+
extractUrlFromMarkdown,
9+
isUrl,
10+
parsePostHogUrl,
11+
} from "@renderer/utils/posthog-url-parser";
12+
import {
13+
markdownToTiptap,
14+
tiptapToMarkdown,
15+
} from "@renderer/utils/tiptap-converter";
216
import type { MentionItem } from "@shared/types";
317
import { Link } from "@tiptap/extension-link";
418
import { Mention } from "@tiptap/extension-mention";
@@ -10,14 +24,6 @@ import StarterKit from "@tiptap/starter-kit";
1024
import type { SuggestionOptions } from "@tiptap/suggestion";
1125
import { useEffect, useRef, useState } from "react";
1226
import { createRoot } from "react-dom/client";
13-
import {
14-
extractUrlFromMarkdown,
15-
isUrl,
16-
parsePostHogUrl,
17-
} from "../utils/posthog-url-parser";
18-
import { markdownToTiptap, tiptapToMarkdown } from "../utils/tiptap-converter";
19-
import { MentionList, type MentionListRef } from "./FileMentionList";
20-
import { FormattingToolbar } from "./FormattingToolbar";
2127

2228
interface RichTextEditorProps {
2329
value: string;

0 commit comments

Comments
 (0)