From 5be5b4812f226fbd85ebcce275d46c85712b91f9 Mon Sep 17 00:00:00 2001 From: Astrian Zheng Date: Wed, 4 Jun 2025 22:15:06 +1000 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=20CLAUDE.md=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BB=A3=E7=A0=81=E9=A3=8E=E6=A0=BC=E5=92=8C?= =?UTF-8?q?=E9=9A=8F=E6=9C=BA=E6=92=AD=E6=94=BE=E9=80=BB=E8=BE=91=E8=AF=B4?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加项目使用 Tab 缩进的说明 - 添加随机播放模式的详细逻辑说明 - 说明 shuffleList 和 currentIndex 的关系 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- CLAUDE.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 6d746b5..d72ce3f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -83,6 +83,12 @@ npm run qc # Alias for quality-check - **URL Refresh Logic**: Checks resource availability before playback/preload - **Cache Invalidation**: Automatic cleanup when resource URLs change +### Shuffle/Random Play Logic +- **shuffleList**: Array storing the shuffled order of original list indices +- **currentIndex**: In shuffle mode, this is the index within shuffleList +- **Accessing current song**: `list[shuffleList[currentIndex]]` in shuffle mode +- **getNextIndex**: Returns the actual list index of the next song to play + ## File Structure Notes ### `/src/utils/` @@ -99,6 +105,13 @@ npm run qc # Alias for quality-check - **content.js**: Injects the Vue app into target websites - **background.js**: Extension background script +## Code Style and Formatting + +### Indentation +- **This project uses Tab indentation (not spaces)** +- Ensure all code edits maintain consistent Tab indentation +- When editing files, preserve the existing Tab character formatting + ## Development Considerations ### Extension Context