Skip to content

Latest commit

 

History

History
54 lines (50 loc) · 2.82 KB

File metadata and controls

54 lines (50 loc) · 2.82 KB

项目结构


iOSForClaw/
├── iOSForClaw.xcodeproj/          ← Xcode 项目 (可直接打开)
├── project.yml                     ← XcodeGen 配置 (备选)
├── README.md
├── CLAUDE.md
└── iOSForClaw/
    ├── App/                        ← 应用入口
    │   └── iOSForClawApp.swift
    ├── Agent/                      ← 核心 Agent 运行时
    │   ├── AgentLoop.swift         ← 核心执行循环 (对齐 AndroidForClaw)
    │   ├── ContextBuilder.swift    ← 系统提示词构建 (OpenClaw 22-part)
    │   └── SessionManager.swift    ← JSONL Session 管理
    ├── Provider/                   ← LLM 接入
    │   ├── LLMProvider.swift       ← 统一 LLM Provider (Anthropic/OpenAI)
    │   └── ApiAdapter.swift        ← 多 API 格式适配
    ├── Tools/                      ← 工具系统 (7 个工具)
    │   ├── Tool.swift              ← Tool 协议
    │   ├── ToolRegistry.swift      ← 工具注册表
    │   ├── ReadFileTool.swift      ← 读文件
    │   ├── WriteFileTool.swift     ← 写文件
    │   ├── EditFileTool.swift      ← 编辑文件
    │   ├── ListDirTool.swift       ← 列目录
    │   ├── WebFetchTool.swift      ← HTTP 请求
    │   ├── JavaScriptTool.swift    ← JS 执行 (JavaScriptCore)
    │   └── StopTool.swift          ← 停止执行
    ├── Skills/                     ← Skills 系统
    │   ├── SkillDocument.swift     ← Skill 解析器 (YAML front matter)
    │   └── SkillsLoader.swift      ← 多级加载 (bundled/managed/workspace)
    ├── Config/                     ← 配置系统
    │   ├── OpenClawConfig.swift    ← 配置数据模型 (对齐 openclaw.json)
    │   └── ConfigLoader.swift      ← 配置加载 + 环境变量替换
    ├── Models/                     ← 数据模型
    │   ├── Message.swift           ← 消息类型 (OpenAI 格式)
    │   └── LLMResponse.swift       ← LLM 响应 + ToolDefinition
    ├── UI/                         ← SwiftUI 界面
    │   ├── ContentView.swift       ← 主入口 + Onboarding
    │   ├── ChatView.swift          ← 聊天界面
    │   ├── ChatViewModel.swift     ← 聊天 ViewModel
    │   ├── MessageBubble.swift     ← 消息气泡组件
    │   └── SettingsView.swift      ← 设置界面 (模型/Skills/JSON 编辑)
    ├── Utils/
    │   ├── Logger.swift            ← os.log 封装
    │   └── FileHelper.swift        ← 文件路径管理
    └── Resources/
        ├── Assets.xcassets/
        ├── Info.plist
        └── skills/mobile-operations/SKILL.md