From fdbc629877b67bfce6a5a104635955aec4faa8b7 Mon Sep 17 00:00:00 2001 From: xudan Date: Mon, 21 Jul 2025 17:02:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BC=80=E5=90=AFclaude=20=E6=97=A0?= =?UTF-8?q?=E9=99=90=E5=88=B6=E6=A8=A1=E5=BC=8F=EF=BC=8C=E6=9B=B4=E6=96=B0?= =?UTF-8?q?claude=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/settings.local.json | 5 +++-- CLAUDE.md | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 CLAUDE.md diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 8888b5f..d5b8e71 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -1,5 +1,6 @@ { "permissions": { + "defaultMode": "bypassPermissions", "allow": [ "Bash(npm install:*)", "Bash(mkdir -p:*)", @@ -9,6 +10,6 @@ "Bash(npm uninstall react-native-paper react-native-paper-dropdown --legacy-peer-deps)", "Bash(npx react-native start --reset-cache)" ], - "deny": [] + "deny": ["WebSearch"] } -} \ No newline at end of file +} diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..6554b0f --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,27 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Commands + +- **Start Metro bundler**: `npm start` +- **Run on Android**: `npm run android` +- **Run on iOS**: `npm run ios` + - Before running on iOS for the first time, or after updating native dependencies, you need to install CocoaPods dependencies: + - `bundle install` + - `bundle exec pod install` +- **Run tests**: `npm test` +- **Lint files**: `npm run lint` + +## Architecture + +This is a React Native application for task management. + +- **Navigation**: The app uses `react-navigation`. The main navigator is a bottom tab navigator (`AppNavigator.tsx`) with four tabs: "主页" (Home), "运行" (Run), "编辑" (Edit), and "设置" (Settings). The "主页" tab contains a stack navigator for the task list and task editing screens. +- **State Management**: Task data is managed globally using React Context (`src/context/TasksContext.tsx`). The `TasksProvider` provides tasks and functions to interact with them (`getTaskById`, `updateTask`, `runTask`). +- **Data**: Mock task data is used for development, located in `src/data/mockData.ts`. +- **Components**: Reusable components are located in `src/components`. +- **Screens**: Each screen of the application is a separate component in the `src/screens` directory. +- **Types**: TypeScript types, like the `Task` type, are defined in the `src/types` directory. + +The root component of the application is `App.tsx`, which sets up the `ThemeProvider`, `TasksProvider`, and `NavigationContainer`.