문서로 돌아가기
데스크톱

데스크톱 앱 내부

Tauri v2 셸, Rust 명령 레이어, PTY 세션, UI 상태 관리.

14분 읽기

데스크톱 앱은 React UI를 실행하는 Tauri v2 셸(버전 2.9.1)입니다. Rust 서비스는 워크플로우, 터미널 세션, 구성을 위한 명령을 노출하면서 상태를 SQLite에 로컬로 영속합니다. 기능 기반 권한 모델은 파일 시스템 액세스, HTTP 요청, 셸 실행, 시스템 알림에 대한 세분화된 보안 제어를 제공합니다.

데스크톱 셸 개요

계획 편집기, 터미널 탭, 작업 상태 사이드바를 보여주는 스크린샷.

PlanToCode 데스크톱 셸
Click to expand
구현 계획 패널과 사이드바를 보여주는 데스크톱 앱.

React UI와 표면 영역

React UI는 작업 설명 편집기, 계획 뷰어, 터미널 패널을 렌더링합니다:

Tauri 명령

desktop/src-tauri/src/commands/의 명령은 Rust 기능을 React UI에 노출합니다. 주요 모듈은 다음과 같습니다:

Key command modules:

  • workflow_commands.rs - Workflow orchestration
  • job_commands.rs - Job status and management
  • terminal_commands.rs - PTY session control
  • session_commands.rs - Session CRUD operations
  • implementation_plan_commands.rs - Plan generation
  • audio_commands.rs - Voice transcription
  • video_analysis_commands.rs - Video processing
  • device_commands.rs - Mobile device linking

작업 프로세서와 워크플로우

desktop/src-tauri/src/jobs/의 작업 처리 아키텍처:

Job system components:

  • queue.rs - Priority queue with 8 concurrent workers
  • dispatcher.rs - Job execution dispatcher
  • registry.rs - Processor registration
  • workflow_orchestrator/ - Multi-stage workflow engine
  • processors/ - 12+ job type processors
  • streaming_handler.rs - LLM response streaming

로컬 영속

desktop/src-tauri/migrations/consolidated_schema.sql의 SQLite 저장소:

Core tables:

  • sessions - Project context and preferences
  • background_jobs - Job records with prompts/responses
  • terminal_sessions - PTY output logs
  • task_description_history - Task version history
  • file_selection_history - File selection tracking
  • project_system_prompts - Per-project overrides
  • key_value_store - Application settings

터미널 세션

PTY 터미널 구현:

작업 설명 안정성

작업 설명 편집기에는 커서 점프를 방지하는 안전장치가 포함되어 있습니다:

  • 원격 업데이트는 사용자가 입력하는 동안 대기열에 추가되고 유휴 상태 또는 블러 시 플러시됩니다.
  • 선택 상태는 추적되고 React 리렌더링 후 복원됩니다.
  • 백그라운드 라이터는 sessionActions.updateCurrentSessionFields를 호출하여 업데이트를 조정합니다.
  • 멀티 디바이스 동기화는 충돌 해결을 위해 sequence_number와 version 필드를 사용합니다.

Explore related internals

The background jobs and data model docs explain how the desktop app persists and processes work.