You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*Note: The project locks `targetSdk = 28` intentionally to allow PRoot execution (W^X policy bypass on Android 10+).*
101
95
@@ -106,12 +100,14 @@ The application is structured using a feature-based architecture with Domain-Dri
106
100
### Key Components
107
101
108
102
-**App Core:**`AIEditorApp` initializes core services like `FileLogger`, `TerminalKeepaliveService`, and `McpManager`.
103
+
-**Core Module:**`app/src/main/java/com/aicode/core/` hosts cross-feature infrastructure: `FileLogger`, `db/MigrationLoader.kt`, etc.
109
104
-**Feature Modules:** Code is organized by feature under `app/src/main/java/com/aicode/feature/`:
110
105
-`agent`: The core AI agent system. Includes prompt management, MCP (Model Context Protocol) integration, tool registry (file tools, shell execution, etc.), permission handling, and adapters for different AI providers (Anthropic, OpenAI).
111
106
-`git`: Git integration and operations.
112
107
-`settings`: Application configuration, including AI provider setup, logging, and keepalive settings.
113
-
-`terminal`: Terminal emulation and session management, leveraging Termux components (`terminal-emulator`, `terminal-view`) and PRoot via `LinuxContainerEngine`.
114
-
-`workspace`: Workspace and document provider management.
108
+
-`terminal`: Terminal emulation and session management. Local mode leverages Termux components (`terminal-emulator`, `terminal-view`) and PRoot via `LinuxContainerEngine`; remote SSH mode uses sshj (`SshShellBackend`, `RemoteTerminalSessionManager`).
109
+
-`workspace`: Workspace and document provider management. Remote SSH file access via `RemoteSftpFileAccess`.
@@ -121,7 +117,7 @@ The app uses Room for local database storage, primarily found in `feature/agent/
121
117
We use a custom, lightweight file-based migration system (`MigrationLoader.kt`).
122
118
To update the database schema:
123
119
1. Increment the database version in `AgentDatabase.kt`.
124
-
2. Create a new SQL file in `app/src/main/assets/migrations/` named `{VERSION}_description.sql` (e.g., `8_add_new_table.sql`).
120
+
2. Create a new SQL file in `app/src/main/assets/migrations/` named `{VERSION}_description.sql` (e.g., `8_add_remote_servers.sql`、`26_add_session_last_input_tokens.sql`).
125
121
3. Add the necessary DDL/SQL statements to this file. The system will automatically execute it on startup and record it in the `migration_history` table.
AiCode 是一款在 Android 手机上运行的 AI 编程工具(Android IDE / mobile coding assistant),将大语言模型与本地 Linux 开发环境深度集成。它内置 Alpine Linux 容器和终端模拟器,让 AI 能直接读写文件、执行 Shell 命令、运行构建工具;同时支持远程 SSH 服务器作为执行后端,把手机变成远程项目的移动工作站。
38
+
39
+
**English**: AiCode is an AI-powered coding assistant that runs natively on Android. It integrates LLMs with a built-in Linux terminal (PRoot + Alpine) and a tool-calling agent system — the AI can read/write files, execute shell commands, and manage Git, all from your phone. It also supports remote SSH servers as the execution backend, turning your phone into a mobile workstation for remote projects.
0 commit comments