Thanks to visit codestin.com
Credit goes to github.com

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
12 changes: 6 additions & 6 deletions staged/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
import { onMount, onDestroy } from 'svelte';
import { getCurrentWindow } from '@tauri-apps/api/window';
import TopBar from './lib/TopBar.svelte';
import ProjectHome from './lib/ProjectHome.svelte';
import SessionLauncher from './lib/SessionLauncher.svelte';
import AgentSetupModal from './lib/AgentSetupModal.svelte';
import { preferences, initPreferences } from './lib/stores/preferences.svelte';
import { agentState, refreshProviders } from './lib/stores/agent.svelte';
import { refreshSqAvailability } from './lib/stores/sq.svelte';
import ProjectHome from './lib/features/projects/ProjectHome.svelte';
import SessionLauncher from './lib/features/sessions/SessionLauncher.svelte';
import AgentSetupModal from './lib/features/agents/AgentSetupModal.svelte';
import { preferences, initPreferences } from './lib/features/settings/preferences.svelte';
import { agentState, refreshProviders } from './lib/features/agents/agent.svelte';
import { refreshSqAvailability } from './lib/features/settings/sq.svelte';

let showSessionLab = $state(false);
let showAgentSetup = $state(false);
Expand Down
4 changes: 2 additions & 2 deletions staged/src/lib/TopBar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<script lang="ts">
import { Palette, Plus, Bot } from 'lucide-svelte';
import { getCurrentWindow } from '@tauri-apps/api/window';
import ThemeSelectorModal from './ThemeSelectorModal.svelte';
import AgentDropdown from './AgentDropdown.svelte';
import ThemeSelectorModal from './features/settings/ThemeSelectorModal.svelte';
import AgentDropdown from './features/agents/AgentDropdown.svelte';

let showThemeModal = $state(false);
let showAgentDropdown = $state(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,17 @@
<script lang="ts">
import { onMount, onDestroy, tick } from 'svelte';
import { X, AlertCircle, CircleStop, CheckCircle, XCircle } from 'lucide-svelte';
import Spinner from './Spinner.svelte';
import Spinner from '../../shared/Spinner.svelte';
import Convert from 'ansi-to-html';
import { sanitize } from './sanitize';
import type {
ActionStatusEvent,
ActionOutputEvent,
OutputChunk,
ActionStatus,
} from './services/actions';
import { sanitize } from '../../shared/sanitize';
import type { ActionStatusEvent, ActionOutputEvent, OutputChunk, ActionStatus } from './actions';
import {
getActionOutputBuffer,
stopBranchAction,
clearActionExecution,
listenToActionOutput,
listenToActionStatus,
} from './services/actions';
} from './actions';

interface Props {
executionId: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
-->
<script lang="ts">
import { Check, ExternalLink, RefreshCw } from 'lucide-svelte';
import Spinner from './Spinner.svelte';
import { agentState, refreshProviders, KNOWN_AGENTS } from './stores/agent.svelte';
import { setAiAgent, getPreferredAgent } from './stores/preferences.svelte';
import { openUrl } from './commands';
import Spinner from '../../shared/Spinner.svelte';
import { agentState, refreshProviders, KNOWN_AGENTS } from './agent.svelte';
import { setAiAgent, getPreferredAgent } from '../settings/preferences.svelte';
import { openUrl } from '../../commands';

interface Props {
onClose: () => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<script lang="ts">
import { onMount, onDestroy } from 'svelte';
import { ChevronDown, Check, Bot } from 'lucide-svelte';
import { agentState, REMOTE_AGENTS } from './stores/agent.svelte';
import { setAiAgent, getPreferredAgent } from './stores/preferences.svelte';
import { agentState, REMOTE_AGENTS } from './agent.svelte';
import { setAiAgent, getPreferredAgent } from '../settings/preferences.svelte';

interface Props {
disabled?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
-->
<script lang="ts">
import { RefreshCw, ExternalLink, Bot, X } from 'lucide-svelte';
import Spinner from './Spinner.svelte';
import { agentState, refreshProviders, KNOWN_AGENTS } from './stores/agent.svelte';
import { openUrl } from './commands';
import Spinner from '../../shared/Spinner.svelte';
import { agentState, refreshProviders, KNOWN_AGENTS } from './agent.svelte';
import { openUrl } from '../../commands';

interface Props {
onClose: () => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* the registry of supported agent IDs and CLI commands.
*/

import { discoverAcpProviders, type AcpProviderInfo } from '../commands';
import { discoverAcpProviders, type AcpProviderInfo } from '../../commands';

// =============================================================================
// Known agent metadata (display-only — the backend owns the real registry)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,26 @@
MoreVertical,
ExternalLink,
} from 'lucide-svelte';
import Spinner from './Spinner.svelte';
import Spinner from '../../shared/Spinner.svelte';
import { listen, type UnlistenFn } from '@tauri-apps/api/event';
import type { Branch, BranchTimeline as BranchTimelineData, BranchSessionType } from './types';
import * as commands from './commands';
import type { ProjectAction } from './commands';
import BranchTimeline from './BranchTimeline.svelte';
import DiffModal from './DiffModal.svelte';
import SessionModal from './SessionModal.svelte';
import NewSessionModal from './NewSessionModal.svelte';
import NoteModal from './NoteModal.svelte';
import ConfirmDialog from './ConfirmDialog.svelte';
import ActionOutputModal from './ActionOutputModal.svelte';
import { runBranchAction, type ActionStatusEvent } from './services/actions';
import {
getAvailableOpeners,
openInApp,
copyPathToClipboard,
type OpenerApp,
} from './services/branch';
import { getPreferredAgent } from './stores/preferences.svelte';
import { agentState, REMOTE_AGENTS } from './stores/agent.svelte';
import type {
Branch,
BranchTimeline as BranchTimelineData,
BranchSessionType,
} from '../../types';
import * as commands from '../../commands';
import type { ProjectAction } from '../../commands';
import BranchTimeline from '../timeline/BranchTimeline.svelte';
import DiffModal from '../diff/DiffModal.svelte';
import SessionModal from '../sessions/SessionModal.svelte';
import NewSessionModal from '../sessions/NewSessionModal.svelte';
import NoteModal from '../notes/NoteModal.svelte';
import ConfirmDialog from '../../shared/ConfirmDialog.svelte';
import ActionOutputModal from '../actions/ActionOutputModal.svelte';
import { runBranchAction, type ActionStatusEvent } from '../actions/actions';
import { getAvailableOpeners, openInApp, copyPathToClipboard, type OpenerApp } from './branch';
import { getPreferredAgent } from '../settings/preferences.svelte';
import { agentState, REMOTE_AGENTS } from '../agents/agent.svelte';

interface Props {
branch: Branch;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
GitPullRequest,
CircleDot,
} from 'lucide-svelte';
import Spinner from './Spinner.svelte';
import type { Branch, BranchRef, Project, BranchType, PullRequest, Issue } from './types';
import * as commands from './commands';
import { sqState } from './stores/sq.svelte';
import Spinner from '../../shared/Spinner.svelte';
import type { Branch, BranchRef, Project, BranchType, PullRequest, Issue } from '../../types';
import * as commands from '../../commands';
import { sqState } from '../settings/sq.svelte';

interface Props {
project: Project;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@
StickyNote,
} from 'lucide-svelte';
import { listen, type UnlistenFn } from '@tauri-apps/api/event';
import Spinner from './Spinner.svelte';
import Spinner from '../../shared/Spinner.svelte';
import type {
Branch,
BranchTimeline as BranchTimelineData,
BranchSessionType,
WorkspaceStatus,
} from './types';
import * as commands from './commands';
import BranchTimeline from './BranchTimeline.svelte';
import DropdownMenu, { type MenuItem } from './DropdownMenu.svelte';
import SessionModal from './SessionModal.svelte';
import NewSessionModal from './NewSessionModal.svelte';
import NoteModal from './NoteModal.svelte';
import ConfirmDialog from './ConfirmDialog.svelte';
} from '../../types';
import * as commands from '../../commands';
import BranchTimeline from '../timeline/BranchTimeline.svelte';
import DropdownMenu, { type MenuItem } from '../../shared/DropdownMenu.svelte';
import SessionModal from '../sessions/SessionModal.svelte';
import NewSessionModal from '../sessions/NewSessionModal.svelte';
import NoteModal from '../notes/NoteModal.svelte';
import ConfirmDialog from '../../shared/ConfirmDialog.svelte';

interface Props {
branch: Branch;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
by holding down the 'A' key.
-->
<script lang="ts">
import type { SmartDiffAnnotation } from './types';
import type { SmartDiffAnnotation } from '../../types';

interface Props {
annotation: SmartDiffAnnotation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
was doing. Uses the before_description field from annotations.
-->
<script lang="ts">
import type { SmartDiffAnnotation } from './types';
import type { SmartDiffAnnotation } from '../../types';

interface Props {
annotation: SmartDiffAnnotation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-->
<script lang="ts">
import { Trash2 } from 'lucide-svelte';
import type { Comment } from './types';
import type { Comment } from '../../types';

interface Props {
/** Position relative to the viewer container */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
CircleMinus,
CircleArrowUp,
} from 'lucide-svelte';
import Spinner from './Spinner.svelte';
import Spinner from '../../shared/Spinner.svelte';
import DiffViewer from './DiffViewer.svelte';
import { createDiffViewerState, fileSummaryPath } from './stores/diffViewerState.svelte';
import { createReviewState } from './stores/reviewState.svelte';
import type { Span, FileDiffSummary, Comment } from './types';
import { createDiffViewerState, fileSummaryPath } from './diffViewerState.svelte';
import { createReviewState } from './reviewState.svelte';
import type { Span, FileDiffSummary, Comment } from '../../types';

// ==========================================================================
// Props
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,18 @@
import { onMount } from 'svelte';
import { MessageSquarePlus, MessageSquare, X, FileText, Code } from 'lucide-svelte';
import { marked } from 'marked';
import { sanitize } from './sanitize';
import type { FileDiff, Alignment, Comment, Span, SmartDiffAnnotation } from './types';
import { sanitize } from '../../shared/sanitize';
import type { FileDiff, Alignment, Comment, Span, SmartDiffAnnotation } from '../../types';
import {
initHighlighter,
highlightLines,
detectLanguage,
prepareLanguage,
type Token,
} from './services/highlighter';
import { createScrollController } from './services/scrollController.svelte';
import { setupMarkdownScrollSync } from './services/markdownScrollSync';
import {
ConnectorRendererCanvas,
type CommentHighlightInfo,
} from './services/connectorRendererCanvas';
} from './highlighter';
import { createScrollController } from './scrollController.svelte';
import { setupMarkdownScrollSync } from './markdownScrollSync';
import { ConnectorRendererCanvas, type CommentHighlightInfo } from './connectorRendererCanvas';
import {
getLineBoundary,
getLanguageFromDiff,
Expand All @@ -44,8 +41,8 @@
import CommentEditor from './CommentEditor.svelte';
import AnnotationOverlay from './AnnotationOverlay.svelte';
import BeforeAnnotationOverlay from './BeforeAnnotationOverlay.svelte';
import Scrollbar from './Scrollbar.svelte';
import HorizontalScrollbar from './HorizontalScrollbar.svelte';
import Scrollbar from '../../shared/Scrollbar.svelte';
import HorizontalScrollbar from '../../shared/HorizontalScrollbar.svelte';

// ==========================================================================
// Props
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* - Comment highlights rendered as simple rects
*/

import type { Alignment, Span, Comment } from '../types';
import type { Alignment, Span, Comment } from '../../types';

// ============================================================================
// Types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Uses plain DOM event listeners (no external keyboard service dependency).
*/

import type { Alignment } from './types';
import type { Alignment } from '../../types';

export interface DiffNavConfig {
scrollAmount: number; // pixels per keypress for smooth scroll
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Pure helper functions for diff display.
*/

import type { FileDiff, Alignment, FileContent } from './types';
import type { FileDiff, Alignment, FileContent } from '../../types';

/**
* Get display path from a FileDiff, handling renames.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
* This is a factory — each DiffModal creates its own instance.
*/

import * as commands from '../commands';
import type { FileDiffSummary, FileDiff } from '../types';
import * as commands from '../../commands';
import type { FileDiffSummary, FileDiff } from '../../types';

// =============================================================================
// Type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

import { createHighlighter, type Highlighter, type ThemedToken, type BundledLanguage } from 'shiki';
import { luminance } from '../theme';
import { luminance } from '../../theme';

// Simple token type that doesn't leak Shiki internals
export interface Token {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* This is a factory — each DiffModal creates its own instance.
*/

import * as commands from '../commands';
import type { Comment, Span, Review, FileContent } from '../types';
import * as commands from '../../commands';
import type { Comment, Span, Review, FileContent } from '../../types';

// =============================================================================
// Type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* - Momentum scrolling support
*/

import type { Alignment, Span } from '../types';
import type { Alignment, Span } from '../../types';

/** Anchor point as fraction of viewport height (1/3 from top keeps context visible) */
const SCROLL_ANCHOR_FRACTION = 1 / 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script lang="ts">
import { X } from 'lucide-svelte';
import { marked } from 'marked';
import { sanitize } from './sanitize';
import { sanitize } from '../../shared/sanitize';

marked.setOptions({ breaks: true, gfm: true });

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
<script lang="ts">
import { onMount } from 'svelte';
import { Folder, X, ChevronRight, Home, Search, GitBranch } from 'lucide-svelte';
import Spinner from './Spinner.svelte';
import Spinner from '../../shared/Spinner.svelte';
import {
listDirectory,
getHomeDir,
searchDirectories,
findRecentRepos,
type DirEntry,
type RecentRepo,
} from './services/files';
} from '../../shared/files';

interface Props {
onSelect: (path: string) => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
-->
<script lang="ts">
import { X, GitBranch, Folder } from 'lucide-svelte';
import type { Project } from './types';
import * as commands from './commands';
import type { Project } from '../../types';
import * as commands from '../../commands';
import FolderPickerModal from './FolderPickerModal.svelte';
import { detectProjectActions } from './services/actions';
import { listDirectory, type DirEntry } from './services/files';
import { detectProjectActions } from '../actions/actions';
import { listDirectory, type DirEntry } from '../../shared/files';

interface Props {
onCreated: (project: Project) => void;
Expand Down
Loading